Jump to content
  • Advertisement

Archived

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

xg0blin

Best/Fastest graphical file types

This topic is 5857 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I made a little tile engine, where I read in a bunch of 1''s and 0''s and whatnot from a file, and according to what''s where in your array, it draws a 32x32 tiled block in that spot. My problem is, the program runs really, really fast when I don''t have the textures on it, but as soon as I texture my quads, it slows to a crawl. Between scrolling a half an inch, I can go to the bathroom, make a sandwich, and watch a couple of tv shows. It isn''t my computer, because I can run regular games, like dungeon siege and such. It''s just a bunch of damned squares, why would it be so slow? I''m using .BMP files. Is there a faster way to go about this? BTW, I''m also using glaux and auxRGBimagerec whatever. Any ideas?

Share this post


Link to post
Share on other sites
Advertisement
You might have hardware incompatibilities. How big are your textures? What texture parameters are you using? What video card do you have? Is NeHe''s texturing code also slow?

Share this post


Link to post
Share on other sites
I have a voodoo 4 vid card, my textures are 32 x 32 bmp''s, I''m in 1024 x 768 resolution, although it''s not much help to go lower. I haven''t tried nehe''s code, I have been using the stuff off of gametutorials.com

Share this post


Link to post
Share on other sites
No, I''m not loading them each frame, I have an init function that loads them when the program starts, before anything is ever displayed, and a deinit that destroys them at the end of the program

Share this post


Link to post
Share on other sites
quote:
Original post by xg0blin
No, I''m not loading them each frame, I have an init function that loads them when the program starts, before anything is ever displayed, and a deinit that destroys them at the end of the program


Therefore the file type is irrelevant.

Are you recreating the textures each frame ? (glTexImage)
Do you have one texture per tile, or one large texture, with individual tile textures defined by the coordinates used ?
In the former case, are you grouping the tiles by texture to minimize the number of texture switches ?

And glaux is still deprecated


Documents [ GDNet | MSDN | STL | OpenGL | Formats | RTFM | Asking Smart Questions ]
C++ Stuff [ MinGW | Loki | SDL | Boost. | STLport | FLTK | ACCU Recommended Books ]

Share this post


Link to post
Share on other sites
This isn''t exactly help for your problem, but if you want an easy way to load image files (so you can get rid of glaux and get Fruny of your back ) check out DevIL.

Share this post


Link to post
Share on other sites
quote:
Original post by Dactylos
..so you can get rid of glaux...

... which is de-pre-ca-ted

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
how many tiles are you using?
you might wanna try some clipping if you know what i mean
and you say quads ? use TriStrips (much faster).

check for any expensive gl calls as well, like glTexImage2d
or glReadPixels, a particularly tricky bitch is the glBindTexture
you might want to sort your tiles according to texture, eg.

1 = grass, 2 = dirt, map = 1121211122212122, try a bubble sort algo so it comes out to #11111111#22222222 where ''#'' is glBindTexture (this can speed things up sooooo much it aint funny).

also if your using multitextureing (standard) watch out for glDepthMask and glDepthTest, or look into the GL_ARB_multitexture extension which is heavly supported.

BTW, get a new Vid Card, V4500 sux0rs, GFx ///aLL^tHe^MuTH*R^F*CkN^WhEy^bIArTcH///*

hope this helps,
silvermace ..:: SiLV3rMaC3 ::...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
BTW. why would you make a sandwich in the bathroom?
silvermace ..:: SiLv3RMaC3 ::..

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!