Wednesday, 23 April 2014
Level Manager
Finally got some time to work on this. I've added the level manager, so now I can have huge sprawling levels without killing the CPU with trying to render loads of off-screen sprites. I ended up implementing it as a set of configurable culling grids that sit at a given depth in the world. Because the game is largely 2D, I can split the scene into discrete slices and add a culling grid for that slice.
Each cell in the grid holds a list of sprites that cover that cell. I then just find which grid cells are visible using a sort of simplified frustum cull - as far as OpenGL is concerned the game is 3D.
I also created a simple level setup tool that I can use to quickly layout a level. This is on the PC and will not be part of the final game.
Next step is to add the actual elements you can grapple...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment