View Single Post
Old 15 July 2004, 23:02   #8
2 contact me: email only!

Codetapper's Avatar
Join Date: May 2001
Location: Auckland / New Zealand
Posts: 3,139
It sounds like you are doing something majorly wrong if you are running out of memory for this task. The graphics file for the tiles should be pretty small and the map itself should just contain an index to a particular tile you want to draw on the screen.

For example, if the tiles are say 16x16 and you have 64 screens which are 320x256 pixels each then you need 20 tiles wide x 16 tiles high for each screen x 64 screens which would be 20480 tile pointers - if these are stored as words (ie. each tile is 16 bits) then you should only need 40k to store the entire map for each level.

I would check your code and make sure you aren't trying to allocate memory all in one hit for an enormous bitmap which happens to be big enough to display the entire level.
Codetapper is offline  
Page generated in 0.03902 seconds with 10 queries