DukeSoft
Member
Hey'all!
I have this top-down game, in which I render the floor and the walls with specific textures, to make it look snappy. All works well - room is split up in square surfaces (say, 2048x2048) and on that I render the map once.
Then when its rendered, I draw those surfaces on the floor of the game, if needed. Works great!
Allthough - once I start getting big maps (say, 20.000 x 20.000) I'll have 10X10 of those surfaces. Not an issue persé because I give the player the opportunity to scale the surfaces, so you'll have 10x10 1024x1024 surfaces - BUT, it seems like these surfaces get stored in the GPU's ram (allthough the general memory usage of the game goes up as well? Don't know how all that is calculated, but okay).
Once GM goes over the limit of my videocard's memory (2GB), surface_create() hangs for a long time, then continues, and the surface ends up not existing.
I know its crazy to have 100 2000x2000 surfaces in memory at all times, so I was wondering, can I store them somewhere else?
Rendering takes up quite a bit of time - and rendering once the player is near is not an option, as this will result in framedrops.
Storing the surface on the disk is also not a good idea, because of disk IO times being very slow.
So, my idea was - store all non-drawn surfaces in RAM, and get them into the GPU once i need to draw them (ie, the view is near).
Is this.. possible? Did anyone here have similar problems which they tackled? I have no idea how to work on this and make the game support 20.000x20.000 maps with high-quality surfaces.
I have this top-down game, in which I render the floor and the walls with specific textures, to make it look snappy. All works well - room is split up in square surfaces (say, 2048x2048) and on that I render the map once.
Then when its rendered, I draw those surfaces on the floor of the game, if needed. Works great!
Allthough - once I start getting big maps (say, 20.000 x 20.000) I'll have 10X10 of those surfaces. Not an issue persé because I give the player the opportunity to scale the surfaces, so you'll have 10x10 1024x1024 surfaces - BUT, it seems like these surfaces get stored in the GPU's ram (allthough the general memory usage of the game goes up as well? Don't know how all that is calculated, but okay).
Once GM goes over the limit of my videocard's memory (2GB), surface_create() hangs for a long time, then continues, and the surface ends up not existing.
I know its crazy to have 100 2000x2000 surfaces in memory at all times, so I was wondering, can I store them somewhere else?
Rendering takes up quite a bit of time - and rendering once the player is near is not an option, as this will result in framedrops.
Storing the surface on the disk is also not a good idea, because of disk IO times being very slow.
So, my idea was - store all non-drawn surfaces in RAM, and get them into the GPU once i need to draw them (ie, the view is near).
Is this.. possible? Did anyone here have similar problems which they tackled? I have no idea how to work on this and make the game support 20.000x20.000 maps with high-quality surfaces.