Note: You must be registered in order to post a reply.
|
Daru |
Posted - Jan 22 2006 : 8:29:08 PM Hello Everyone,
I am working on a 2D tile-based game engine that i started with Mirage Source Engine.
I am currently optimizing the way the game handles its graphics. Currently, it loads the entire tile sheet, sprite sheet, and item sheet into memory at the game's start.
I am working at changing this. I want to load the graphics onto the DX surface as I need them. I have already created the file format and have a general idea of how I will do this.
Is it possible to dynamicly change a DirectDraw 7 surface's size without destroying the data that's on it?
I want to be able to make a collection of tiles, and have the collection hold their location on this DD surface. If I need a tile at a particular time, and it isnt already on the surface, it will add it. If I don't need a tile at a particualr time, it will unload creating a free spot in the surface for a different tile. The reason I need to dynamicly change the size of the surface is because: What if the surface is too small to hold all the tiles?
I was thinking of alternitives to this, and they include A) creating the DD surface the size of all the tiles that could possible be on the map (the maps are 12x15 tiles, with 4 layers) and B) creating a seperate surface for each tile that is loaded
I see both of these as wasteful, so if there is a better way... please share!
Thank you for your time! Daru~
|
VBBR |
Posted - Jan 31 2006 : 06:00:01 AM Yeah, not really a problem to me since I have a 256 |
Eric Coleman |
Posted - Jan 30 2006 : 5:19:21 PM Well, most video cards these days have at least 128 MB of memory
I'll put up a new poll asking people how much video memory you have. |
VBBR |
Posted - Jan 30 2006 : 05:15:14 AM Unless you're doing a ridiculously gigantic map and loading it all at once would take 100MB or something |
Eric Coleman |
Posted - Jan 29 2006 : 3:33:50 PM Such a thing is not possible.
Why do you want to load tiles as you need them? It is much faster to load all the tiles in a set instead of loading them as you need them. |
|
|
VBGamer |
© |
|
|
|
|