Display lists for tiled

Started by
7 comments, last by clum 20 years, 7 months ago
In a tile-based game, is it most efficient to: 1) Just redraw the tile every time its needed 2) Use a seperate display list for each tile and just PushMatrix, Translate, CallDisplayList, PopMatrix for each tile or 3) Something in between?
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
Advertisement
Depends what a tile is. If it''s a single quad, then i would say that it''s not worth putting it in a display list.. if it''s a bunch of quads, or there is some geometry on top of it.. then go ahead..


Disclaimer: "I am in no way qualified to present advice on any topic concerning anything and can not be held responsible for any damages that my advice may incurr (due to neither my negligence nor yours)"
Disclaimer: "I am in no way qualified to present advice on any topic concerning anything and can not be held responsible for any damages that my advice may incurr (due to neither my negligence nor yours)"
Its just a textured quad, but I noticed that when I changed from solid colors to texture-mapped the frame rate dropped quite a bit.
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
if you are doing a tile game make sure all your graphic tiles are on the same texture and just use texture coordinates to get the tile texture you want.

changing the texture (not the texture cords) for every tile will impact the speed greatly.

I dont think it is worth it to create display lists for tiles.. you are not drawing enough of them to warrent the use of lists..


Jumpman - Under Construction

[edited by - Jumpman on August 31, 2003 12:48:07 AM]
quote:Original post by Jumpman
if you are doing a tile game make sure all your graphic tiles are on the same texture and just use texture coordinates to get the tile texture you want.

changing the texture (not the texture cords) for every tile will impact the speed greatly.

[edited by - Jumpman on August 31, 2003 12:48:07 AM]


Are you sure about this? Maybe this doesn''t apply on all video cards? When I converted my game to textures my FPS fell dramatically (from around 90 to around 50) but when I switched to only about 15 BindTexture()s per frame instead of about 50, it didn''t noticably speed up.
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
what graphics card are you using?
Sort the tiles by texture, then draw each texture type.
------------------------"If it says it loves me, how can it be a virus?"
nfz: GeForce2 32Mb with nVidia''s Linux drivers.
pplante: That''s what I did to reduce the number of BindTexture''s and it didn''t noticeable speed up.
Zorx (a Puzzle Bobble clone)Discontinuity (an animation system for POV-Ray)
well the actual call to change the texture isn't slow..

its what happens when the video card has to move the texture from its video ram accross the AGP bus..

if you have a small game will lots of small textures then the chances are the you will be able to load them all into video ram. so when you change textures it's already there..

if you have a lot of textures (and large ones) which you start getting into when you do full on menus and stuff then you may fill up the video memory.. the texture will then be stored in conventional ram.. if you select a texture which is in ram .. then it needs to be copyied accross (and another moved out) which is the bit that takes the time..

for instance.. I have severial 1024x1024 32 bit textures in jumpman for all the main menu stuff (made up out of lots of graphic elements).. each one takes up 4meg.. add to that, stencil buffers, main display buffers (2 of them), the Z buffer.. you start cutting into the available memory a video card has.. if you have (like you do) a 32meg card then its all ok.. if somebody is playing on a old tnt2 with 16meg then you will run into the problem of having to swap the textures..

hope that makes sence..



Jumpman - Under Construction

[edited by - Jumpman on September 21, 2003 3:07:05 AM]

This topic is closed to new replies.

Advertisement