Sunday, October 13, 2013

Level Manager

Today I completed the cleaning and polishing routines for the level manager.

The level manager is in it's infancy now, but basically it's a class that - among many things - creates transition tiles and buildings from level data.
The transition tiles are the tiles between different land tiles that help to mask the tile grid.
The buildings include the building walls and ceilings, which are constructed from floor tiles.
So, I need only to provide basic land tiles and floor tiles (with doors for buildings), and the level generator takes care of the rest.
This also allows me to save levels in a 'compressed' format, and let the level manager 'decompress' the levels using the polishing routines.
I don't necessarily 'need' to save the levels in a compressed format, but I may do so just to get over a pesky xbox 360 bug with lists longer than 9000 items.

Here is an example of a compressed or barebones level:



Here is what that level looks like decompressed:



It's a difference of about a 1,000 sprites: compressed @5k, decompressed @6k.

Game objects have an ID now, so they can be grouped together and used in different ways.
For example, ceilings are grouped according to building now, so players only see into the building they occupy:



I'm really excited about the separation of polishing and cleaning a level from generating a level, because that means I only need to write routines to generate bare bones levels, then I can pass the bare bones level to the polishing routines.

//Grak

No comments:

Post a Comment