Since my last post I have continued working on little ‘cat herding’ game as a way of learning about how a simple 2D game engine works. It quickly became apparent to me however that I was going to need a tool to help me define levels for the game as manually typing out the level definition (several large int arrays) was becoming very tedious.
A ‘World Builder’ application is quite a different puzzle to building a game, because the world builder not only needs to be able to render the level to the screen, but it also needs to be able to update the level in a fast and elegant way. These constraints are directly contradictory when you are trying to decide on the data structure to represent your world, and it took me several different attempts to get it right. What I eventually settled on can be seen above, and you can download the source here. Read on for an explanation of how it works.
Note: All of the tile assets used in this demo (and my previous one) have been borrowed from the application RPG Maker XP. It’s an awesome piece of software!