Larger than tile map sprites.

Started by
0 comments, last by Shadwdrak 23 years, 10 months ago
I am in the process of designing a tile based engine. Just so you know I am using non isometric tiles. The problem I have run into is that I would like to be able to have things on the map, in this case some crashed planes and cars. I obviously dont want the plane or cars to be as small as a single tile, so my question is " How can I encorporate large sprites onto a tile based map?" I have thought about just splitting the image into smaller tile sized sprites, but is there a better way? Would it be faster to have the entire plane as one sprite and anchor a corner to a tile? If anyone has encountered this problem let me know what you came up with... -Shadwdrak
Advertisement
Yup you have about 3 or 4 options, let''s see how many I can list for you:
1.) Divide up bigger objects into smaller tile sized pieces. This options seems to only be used amoungst begginers and is good for learning but not practical. If let''s say you want one byte to represent each tile in a map, you run out of tile''s quikly and for one object to count a 9 or 16 tiles isn''t worth it, and 2 bytes per tiles *is* used but doubles the size of your maps and halfes your games access speed to map files and map during game play... Wouldn''t suggest this as a permanent solution, maybe just for playing around...

2.) Next you can have a larger set of sprites which have what you called an "anchored" corner. So an image 128x128 on a map of 32x32 tiles would have it''s upper left corner aligned to the tile it was "placed" on. Works.. but costs you in collision detection, speed and transparent object over varrying terrain..

3.) You could have another layer above the ground whcih cannot display ground tile''s but rather add more obejcts on top of the already paint ground. This method *was* used by commercial games, and is still great for hobbyist gamer makers.. Cathc is you have to double your tiling procedure, so it''s not the speediest but it''s ok...

4.) The best, and hardest to implement, is a list (maybe linked list) of objects to go on top of the ground, this way you never cycle thorugh more objects than you have and is fast to check collisions.. You simply treat these objects (crashed plane, car, etc..) like you would a building or unit in a game. It has a height width x, and y positions, and of course a sprite, sometimes it may be animated too! (Maybe a burning plane). This is the best way I can think of, but also harder to implement.

Hope this helps!
See ya,
Ben
__________________________Mencken's Law:"For every human problem, there is a neat, simple solution; and it's always wrong."
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949

This topic is closed to new replies.

Advertisement