Archived

This topic is now archived and is closed to further replies.

clum

Display lists for tiled

Recommended Posts

clum    217
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?

Share this post


Link to post
Share on other sites
falkone    444
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)"

Share this post


Link to post
Share on other sites
clum    217
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.

Share this post


Link to post
Share on other sites
Jumpman    122
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]

Share this post


Link to post
Share on other sites
clum    217
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.

Share this post


Link to post
Share on other sites
clum    217
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.

Share this post


Link to post
Share on other sites
Jumpman    122
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]

Share this post


Link to post
Share on other sites