• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Jessie Blair

Members
  • Content count

    2
  • Joined

  • Last visited

Community Reputation

106 Neutral

About Jessie Blair

  • Rank
    Newbie
  1. @SHilbert I was playing around with hardware instancing before occlusion, but ran into an issue with depth between differing textures. For instance, if I had an instance draw for grass, then for dirt, even if the dirt was occluded by grass, because I called the instance draw second it would draw on top of the grass. So I moved on to occlusion culling. The idea was to use the bounding box (supposedly simpler than the texture cube) to check whether occlusion was still necessary every few frames, but only after assuming at first that the object is visible, then the actual occlusion would have a latency of 1 frame. I modeled my code after NVidia's example from GPU Gems 3. I have also considered doing ray-casting from camera to each block, but hoped occlusion queries would be faster because it is native to XNA. Also, I didn't really know where to start with ray-casting. I am interested in your suggestion for batching multiple cubes in one draw call, but I have found that hard to do using a model. Would it be wiser to just use primitives since I'm only using simple cubes? @japro Indeed it does mean I have 15k cubes. It pretty much varies from 10k to 20k with Simplex noise, usually I'm seeing closer to 15k-16k blocks in a 32x32x32 chunk. I am limiting the draw calls to what is visible in the viewing frustum, but with my current method, I'm far from ever achieving the complexity I would like to have, seeing as a single chunk makes the game nearly unplayable. [Edit] As an aside, I did move my query begin and end inside the frustum culling, and changed it from checking bounding box to the actual cube and definitely got better results on the accuracy of occlusion. And the framerate is now back up to 60fps when not looking at the chunk, but it's down to 4fps when looking at the entire chunk. Any advice on instance/batching, or possibly meshing? And do you think ray-casting would be worth a shot?
  2. Greetings! I'm having trouble getting Occlusion Queries to work properly in XNA. I can't tell if it's because of the sheer number of potential queries, or if I'm doing something incorrectly. A typical scene in my current tests includes around 15k cubes. With occlusion queries off, and using only frustum culling, I can get 60fps (limited by v-sync) when looking away from the scene, and about 12 fps when viewing all cubes at once. When I start using occlusion queries in addition to frustum culling, my max fps is about 10fps no matter what is on the screen currently, and I have the additional problem of cubes disappearing permanently once they are occluded. If I sort the models by distance, the fps drops to about 5. My Draw phase is as below: [source lang="csharp"] //models.Sort(delegate(BasicModel m1, BasicModel m2) { return m1.Distance.CompareTo(m2.Distance); }); modelsDrawn = 0; occluded = 0; culled = 0; lastOcclusionCheck++; foreach (BasicModel m in models) { if (!firstDraw && m.Query.IsComplete) m.IsOccluded = (m.Query.PixelCount == 0); m.Query.Begin(); if (Game1.camera.IsInView(m.BoundingBox) && m.Distance < 65536) { m.IsCulled = false; if (!m.IsOccluded) { GraphicsDevice.BlendState = BlendState.Opaque; if (m.IsTranslucent) GraphicsDevice.DepthStencilState = DepthStencilState.DepthRead; else GraphicsDevice.DepthStencilState = DepthStencilState.Default; m.Draw(Game1.camera); modelsDrawn++; } else { if (lastOcclusionCheck > 2) { lastOcclusionCheck = 0; DrawTest(m.PrimitiveList); } occluded++; } } else { m.IsCulled = true; m.IsOccluded = false; culled++; } m.Query.End(); } if (firstDraw) firstDraw = false;[/source] The DrawTest() Method is this: [source lang="csharp"] void DrawTest(VertexPositionColor[] primitiveList) { GraphicsDevice.BlendState = blendState; GraphicsDevice.DepthStencilState = DepthStencilState.DepthRead; lineEffect.World = Matrix.Identity; lineEffect.View = Game1.camera.View; lineEffect.Projection = Game1.camera.Projection; lineEffect.TextureEnabled = false; foreach (EffectPass pass in lineEffect.CurrentTechnique.Passes) { pass.Apply(); this.GraphicsDevice.DrawUserIndexedPrimitives(PrimitiveType.LineList, primitiveList, 0, 8, boundingBoxIndices, 0, 12); } }[/source] I have been failing at fixing this problem for over a week now, though I have managed to improve it. Previously, I was at a max FPS of 2, which makes me cry inside. My hardware is 2.8GHz i7, 16GB ram, radeon 6700 series 1GB vram. Thank you for any help in advance.