Advantages of Tiled Maps over Normal Maps

Hey,

Can someone briefly explain to me the advantages and disadvantages of tiled maps. I am creating a game with a player controlled submarine destroys ships on the surface. The camera will be centered on the player and he will be free to explore a small underwater map. So it won’t just scroll from left to right. My gut feeling is that “normal” maps would be better?
Thanks heaps [import]uid: 26289 topic_id: 11576 reply_id: 311576[/import]

Warning: Excessive use of quotations below. Please be advised.

I’m not quite sure what you mean by “normal” map as there are so many different ways to create a game “map”. A “Tile Map” is simply a game “map” created using a set of pre-made “tiles” which are just square images (just like a tiled floor). So you create “tiles” (square images) using an image editor and then use those to create your “map”. Usually the “tiles” are made so that they fit together similarly to puzzle pieces but with multiple pieces that can match up together in order to create a variety of different backgrounds with the same set of “tiles”.
“”"""""""“End excessive use of quotations”"""""""""

It was origanlly developed as a way to use memory as efficiently as possible since computers didn’t used to have multiple gigabytes (or even megabytes) of memory. There aren’t really any disadvantages to using tile maps. From how you describe your game it sounds like you could use a tile map or just one large image as a background and place smaller images on top to create the maps/levels. [import]uid: 27965 topic_id: 11576 reply_id: 42103[/import]

Warning: Excessive lack of knowledge below. Please be advised.

Ha thanks. I was looking to be quoted and you didn’t fail to deliver. Plus you answered my question!

By “normal” I suppose I was referring to one large image. I knew it wasn’t the right word because it isn’t any more “normal” than using tiled but none the less it served it’s purpose. What concerns me about using one large image is memory. Is it better to use a tiled map for my game? A lot of objects could be onscreen at the same time, boats will be destroyed and the player will be exploring the map. Would using a tiled map free up memory for other things, such as particles? Thus improving the overall game.

I guess I just want to head down the correct path to begin with, so it doesn’t bite me in the ass later on.

Cheers

“”"""""""“End Lack Of Knowledge”""""""""" [import]uid: 26289 topic_id: 11576 reply_id: 42219[/import]

You really don’t have to worry about memory usage unless you’re trying to use a lot of large images (or hundreds of small ones). To calculate texture memory usage take the resolution of an image and round it up to the nearest power of 2 (unless it’s already a power of 2). So 150x150 would be rounded up to 256x256, 72x72 would be rounded up to 128x128. Multiply the rounded up resolution and then multiply the result by 4. Example:

256 x 256 x 4 = 262,144 bytes (about 256KB)
512 x 512 x 4 = 1,048,576 bytes (about 1MB)
1024 x 1024 x 4 = 4,194,304 bytes (about 4MB)

Most devices will allow for between 24MB and 32MB of texture memory so large images can eat up all your texture memory in a hurry. If you only load images when needed and remove them when not needed anymore then you should be able to keep memory usage under control. Check out the docs for info about using and managing display objects (such as images) here:
http://developer.anscamobile.com/content/application-programming-guide-graphics-and-drawing
[import]uid: 27965 topic_id: 11576 reply_id: 42230[/import]