🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Tile based maps for shooters

Started by
9 comments, last by Qoy 24 years, 6 months ago
You blit one tile extra around the screen edges for use with smooth scrolling.

Check out this link for more detail.

William Reiach - Human Extrodinaire

Marlene and Me


Advertisement
To make it so only part of the tile shows you have to clip it to the screen. This is done pretty easily by checking if what you are writing is outside the bounds of video memory, and if it is, not drawing that pixel.


Gary

And how would I check if it's outside of video memory?
For the first question, I would recommend not to use tiles at all. 10000x640 level (640x480 is your resolution?) takes only 12 megs of memory if you have 16-bit graphics. Everybody has 32 megs these days! And if you save it as a jpeg, it makes your game quite small to download also (say, 500kb per level).

This way you can also make destroyable walls.

Are you sure that's a realistic solution though? Im trying to get experience that will help me get a job later on...
Yes, it's a realistic approach. Some good commercial examples that do not use tiles: The Reap (a game like yours), Baldur's Gate.

Tiles are dying like 8-bit gfxs. Except in strategy games where the engine itself needs the map to be tile-based (for AI). Close Combats don't use tiles also..

Non-tile games are easier to do also.

Tiles aren't dead. There are a lot of effects that are still easier using tile-based engines. And they make randomly generating maps a whole lot easier. But if you do use a bitmap based map, don't use jpeg. Jpeg is a lossy compression, so there will be strange visual artifacts on your level that you may not like.
I agree, JPGs don't look all that good. Plus, even if I could compress a picture, and make the levels 500kb, then, with 10 levels, thats gonna be 5mb in itself, plus all the rest of the data and binaries. With tiles, each tileset will probably end up being about 100 k at most, and with 5 tilesets, then I have 500 kb for all the level graphics, and the level file will probably end up being about 1 mb or more at most, so that's about 1/5 the size of the jpg idea.
I don't see how tiles can be beat. A large background like that won't fit into video memory (on most systems), and you won't get any hardware blitting, which is already a big hit. Using tiles, you can easily store most of the heavily used tiles in video mem. There will also be lots of paging when accessing that monster in system memory, which is a fairly big hit. It just breaks all the spatial locality rules.

How can a 12Meg image be compressed into 500K? Without cranking the lossy-ness, that seems very unrealistic (to me).

Rock

I am working on a top view flying shooter, like Raptor: Call of Shadows, and Drone. I was thinking that for my tile maps, I could either have a relativly small number of large tiles on the map, or a large number of small tiles. What do you people suggest? Also, how would I blit the tiles at the top of the screen so that only the bottom area I need shows?

------------------
http://qoy.tripod.com

This topic is closed to new replies.

Advertisement