Smooth animations using 2D directxgraphics

Mithrandel
02-25-2002, 07:56 PM
Alright! I've set up directX, displayed my sprites...

But now I've come up to yet another interesting question. Just how does one move sprites smoothly from position to position?

And, as an add-on to this, is there a way to make sure that the sprites move at the same speed, regardless of system power (i.e., a scene which looks just fine on a P2 400 will just flicker by on a P4 2Ghz)?

Squirm
02-26-2002, 01:54 AM
As for your second question, look here (http://www.rookscape.com/vbgaming/tutAQ.php)

As for the sprite movement, you first calculate the X and Y distance between the two points (upper-left corner of sprite) in pxels then divide this by the amount of time you want it to take in seconds. You then plan to move the sprite that far per second. The exact distance moved per frame will depend on the system, if you click on the link above you'll see how to implement this.

Mithrandel
02-26-2002, 09:55 AM
Squirm to the rescue once more! =P

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum