Original Post
🔒 Locked
TBackGroundSprite
Advertisement
Hi Agoth,
Don't "Create" your tbackground object in DXtimer, that's suicide.
You only need to create them once.
Set it up in your form's OnCreate event or something, then assign all of you images to your map / tiles.
You will usually only use engine.draw and engine.move in dxtimer for map manipulation.
Then when your game level is complete and want to go to the next level, procedure out to re-assign a new set of tiles to your map.. again whatever suits your needs, then
it's back in the main loop.
I usually re-use all my previously created tiles, i remove or add them as i need to. I just re-assign images / propreties to them.
Just to give you an example, in my full game i have a 20,000 x 20,000(approx) pixel world using 128x128 TBackground tiles and i get a rock solid 75 fps/vsync on.. With tons of other crap moving around/ fireing... etc
vsync off i get 400 fps, soo i know i still have loads of CPU overhead to add other functionnality.
I'm running a p2 350.
Hope this helps.
Gunner
Edited by - Gunner on July 7, 2000 9:02:22 AM
Don't "Create" your tbackground object in DXtimer, that's suicide.
You only need to create them once.
Set it up in your form's OnCreate event or something, then assign all of you images to your map / tiles.
You will usually only use engine.draw and engine.move in dxtimer for map manipulation.
Then when your game level is complete and want to go to the next level, procedure out to re-assign a new set of tiles to your map.. again whatever suits your needs, then
it's back in the main loop.
I usually re-use all my previously created tiles, i remove or add them as i need to. I just re-assign images / propreties to them.
Just to give you an example, in my full game i have a 20,000 x 20,000(approx) pixel world using 128x128 TBackground tiles and i get a rock solid 75 fps/vsync on.. With tons of other crap moving around/ fireing... etc
vsync off i get 400 fps, soo i know i still have loads of CPU overhead to add other functionnality.
I'm running a p2 350.
Hope this helps.
Gunner
Edited by - Gunner on July 7, 2000 9:02:22 AM
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement