Tile Blitting Question
As for me, generally I'm storing my bitmaps / tiles / animations / particles etc. in separate files - I find it easier to edit them, add new ones and find pictures that I want. HTH :-)
If neither method is efficient enough then you could try a relatively complex hybrid method instead.
If you blit the whole map onto one large surface for the entire map, you're just wasting valuable memory space. The blitting process is extremely fast and you shouldn't have to worry about blitting every tile, unless of course your tiles are single pixel sized.
Making a tile engine is a huge step, but can easily be accomplished with little work. You'll need a tile class, a map class and way to store a two-dimensional dynamic array (you can use my Multi-Dimensional Vector Class Wrappers if you want). Make up a function that will read in a text file and spit out a tilemap class. Everytime you draw the map, you'll have to offset by a camera object. It seems like a lot of work, but once you get it working, the opportunities are endless [wink].
it's quite simple but a bit to large to describe it here so i'll just point you to the source so that you can examine it yourself. it's quite commented so you should be able to find your way around. in case you have any questions feel free to mail me.
http://piotr.monsmontis.net/queeneng.html
hope the link works. last time i linked to something it was broke
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.