Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Sprites (yes, again) ;)

Author
Message
Scouseknight
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 24th Mar 2004 01:12
I have a quick question on sprites in Darkbasic Professional.

I have been looking into reasons why my game which uses images and sprites in a loop runs great on my super powered laptop at home, yet has poor frame rates on my laptop at work (which granted has only a Celeron chip with the usual Thinkpad graphics card).

How much of a performance hit is it if I don't use animated sprites, and instead use the Set Sprite Image command to control which image the sprite is using?

I went through my code and instead of using Sprite n,x,y,i when putting the sprites on the screen, I changed it so all the sprites are defined at the beginning, and used the Set Sprite Image command to set the image, and used Paste Sprite, Hide Sprite and Show Sprite to control whether the sprites were visible, and where they were to be displayed.

Would this second method offer any performance increase by taking out the part that allocates the sprite from the loop?

I already have the backsave off from earlier attempts to get this running on lower specified PCs.

I don't understand why a program displaying a maximum of seven moving sprites on the screen, with no real deep and meaningful logic, runs so slow on this laptop at work - unless it IS all about the graphics chip.

The laptop at work is running Windows XP Professional, and has the DirectX 9 Windows Update applied.

Jadelion
21
Years of Service
User Offline
Joined: 14th Jan 2003
Location:
Posted: 24th Mar 2004 10:25
I don't know if changing all your code would actually increase your speed, (it might, there are some problems with animated sprites) but to check if it is just the other computer you could try adding somthing like this. This should let you check how much ram and video ram is avalible while the game is running. You might also try dodwnloading the "SPRITE SPEED DEMO" in the showcase and see how fast that goes.



...that move was indeed...Bold.
Scouseknight
20
Years of Service
User Offline
Joined: 15th Mar 2004
Location: Bootle, Merseyside, UK
Posted: 24th Mar 2004 20:35
Ah yes good thinking I will try the demo - cheers.

Login to post a reply

Server time is: 2024-09-22 02:27:53
Your offset time is: 2024-09-22 02:27:53