Advertisement

Loading a map into a....

Started by January 11, 2000 01:11 AM
4 comments, last by Phorisc 25 years, 1 month ago
Is it possible to create a direct draw surface which can then be used to draw an ENTIRE map into it? say like 51200x51200 pixels? if so how would i go about giving the surface a size? Thanks
51200!!

Oh my! First consider the memory requirement:
51200x51200 x 16bpp is around 5 Gigabytes!
That is a mind boggeling amount
No home user has that much memory.

Only draw what part of the map you need to show on screen.
800x600 x 16bbp = 960 Kb - a reasonble amount for even low end computers

Edited by - Atavist on 1/11/00 1:31:05 AM
Just because the church was wrong doesn't mean Galileo wasn't a heretic.It just means he was a heretic who was right.
Advertisement
well what im trying to do is figure out how to scroll like 4 pixels a time. i was figuring i could just load my map into a DDSURFACE and then blit to my back buffer useing a destination rect to specify where in the surface to get a hunk of the screen to display it on the back buffer and then just move that destination rect along. But it seems i cant load something that enormous into a DDSURFACE.
Alright, I''m not an expert at map engines like this.
But...

It''s still easier to render just what you need.
I''m assuming your using tiles. So all you need to do is draw all the tiles offset a bit. You check all the tiles that might be only partially showing along the edges, then lpdds->Blt() them using a source and destination RECT.
Just because the church was wrong doesn't mean Galileo wasn't a heretic.It just means he was a heretic who was right.
I think he just wants to use a big bitmap for his board.
William Reiach - Human Extrodinaire

Marlene and Me


Um, you may want to try holding a map camera position, for where it is in the corner. To draw the map, divide it by [tile_size] to get your start drawing position from the map array. (Get my game to see this in action.)

altair
altair734@yahoo.com
crawlegend.iwarp.com


altairaltair734@yahoo.comwww.geocities.com/altair734

This topic is closed to new replies.

Advertisement