Help to optimize

Advanced game related topics
lethalpolux
Enthusiast
Enthusiast
Posts: 171
Joined: Sun Jun 08, 2003 10:50 pm
Location: France
Contact:

Post by lethalpolux »

I'm sad... My game turn perfectly on my machine but seems to hang on another one ( with a smaller video card for example )... It seems to be the sprite3D... I've two solutions: i restart the code at zero and i pass my game to the 640*480 ( it's on 800*600 now.. it seems that in 640*480 or in 800*600*32 it don't hang )...
or i let the choice to the user ( full details with full sprite3D or normal with less ).
Pol.
Intel Core2Duo 6600 - 3Gb DDR2 - Geforce8800Gts - Vista Home Premium 32bits
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

I guess the optional choice is the best ! No need to restart from scratch and good GFX owners will be happier with high resolution and nice effects.
lethalpolux
Enthusiast
Enthusiast
Posts: 171
Joined: Sun Jun 08, 2003 10:50 pm
Location: France
Contact:

Post by lethalpolux »

It turns good for you? When it's critical ( megabomb, phoenix, enemy ships, asteros... )?
no hang? With what kind of machine ? ( because i can't test it on a slower machine.... :( )
I'm scarry with second level ( lot of sinus waves for the water and other effects )... The sprite engine ( not 3D ) : does it support many MANY larger SPRITES without problems ( i need to know before continue ).. if yes, it's SPRITES 3D For sure..
Pol.
Intel Core2Duo 6600 - 3Gb DDR2 - Geforce8800Gts - Vista Home Premium 32bits
Dreamflower
User
User
Posts: 10
Joined: Thu May 29, 2003 4:33 am

Post by Dreamflower »

another optimazion would be using the squares of values if you have to calculate distance because calculating with dist^2 is worlds faster than calculating many dist=sqr(X^2 + y^2) ...

means

use dist=X^2+Y^2 instead of dist=sqr(x^2+y^2) but ^2 all other distance values too which you need to compare ...

one thing to sprite 3D: use them only in 2^x X 2^x width and heights because otherwise many cards won't show them, for example 256x256 or 128x128
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

3D sprites use a lot of GFX card power so if you use too much, it will be slow for sure. I suggest to do 2 modes switchable at start, one for lowend config and another one for high end, so everyone is happy..
lethalpolux
Enthusiast
Enthusiast
Posts: 171
Joined: Sun Jun 08, 2003 10:50 pm
Location: France
Contact:

Post by lethalpolux »

Thanx fred, but i've found a little trick to optimize and now the game runs perfectly on a little machine with full details!!! :D i'm happy!!! but tired... 8)
Pol.
Intel Core2Duo 6600 - 3Gb DDR2 - Geforce8800Gts - Vista Home Premium 32bits
Post Reply