Map Format

Started by
1 comment, last by Sevans 16 years, 9 months ago
Hi all, I just have a quick question about map format. In the past, I have created maps that use a static size of memory. IE; map = new char[MAP_WIDTH * MAP_HEIGHT]; So, map memory footprints are the same each time. I have also read a few articles on map file format, including this one: http://www.gamedev.net/reference/articles/article739.asp which discusses loading portions of the map from a file on demand. I like the idea because it allows for large maps, but the file format required sounds almost too rigid. My question is, does/has anyone actually done this? Is the file IO actually a bottleneck? Found any workarounds for the rigidness? Also, what are your standard outdoor map sizes (tile sizes would be relevant also)? Because using the static format I first mentioned, a map of 1024x1024 has a mem usage of 1byte*1024*1024=1Gig (or am I doing that wrong)? Thanks, -Sevans
-Sevans
Advertisement
Sorry no info on your map format, but this might help..
1byte*1024*1024=1 Meg
my blog contains ramblings and what I am up to programming wise.
/slaps forehead.

Thanks, I thought something was wrong with my math. I should have just looked it up online. Just another reason why I hate 'concept only' taught courses. I should know that off the top of my head without looking it up....

I am going to bail on the loading map on demand. It just doesn't seem necessary and will place more restrictions on the map format than I am willing to allow.

Thanks again,

-Sevans

EDIT: Hours later I still can't believe I did that...

[Edited by - Sevans on July 11, 2007 11:16:49 AM]
-Sevans

This topic is closed to new replies.

Advertisement