thala
02-27-2008, 11:27 PM
Hi everybody,
currently I am planning to programm a small roguelike game. I want to use OGL for several reasons and wonder how to render the world efficiently.
The problem is, that one game screen is composed of 80 x 25 small tiles (like a standard console) each containing a character. The characters are taken from a big texture(with alpha) and every tile has a fore- and backgroundcolor which could change every frame.
Since the single tiles stay where they are the whole time and just the textures and colors change, I decided to use a vertex buffer to render everything. The geometry is pretty static, the color and texturecoord array is rebuild every frame. There's only one small improvement: if I know from the gamelogic that nothing has changed in between 2 frames I don't recalculate the arrays and use the old ones.
I would really appreciate some comments on this and perhaps you know some tricks to improve performance or you would render it completely different?
currently I am planning to programm a small roguelike game. I want to use OGL for several reasons and wonder how to render the world efficiently.
The problem is, that one game screen is composed of 80 x 25 small tiles (like a standard console) each containing a character. The characters are taken from a big texture(with alpha) and every tile has a fore- and backgroundcolor which could change every frame.
Since the single tiles stay where they are the whole time and just the textures and colors change, I decided to use a vertex buffer to render everything. The geometry is pretty static, the color and texturecoord array is rebuild every frame. There's only one small improvement: if I know from the gamelogic that nothing has changed in between 2 frames I don't recalculate the arrays and use the old ones.
I would really appreciate some comments on this and perhaps you know some tricks to improve performance or you would render it completely different?