Tile Engine Considerations

BlitzMax Forums/BlitzMax Programming/Tile Engine Considerations

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I had a similar problem with my game. In my case it was more troublesome because I wanted to be able to change the layer an object was on so I could get effects like particles orbiting around a sprite. I debated using the depth buffer, but that's a little much for just sorting rectangles.

In any tile based game(that I can think of at the moment) all the layers are just images. Each location can only have one set of data / logic so I separate the two. When I update I think of the tiles as a 1 layer 2d array and when I render the screen I think of the map as just a huge pool of objects that are sorted by some Z value.

If this makes some kind of sense and you want me to go into the details let me know.