Page 1 of 1

[15 Feb 2006] slow motion

Posted: Sat Jun 13, 2020 5:31 pm
by lazi
Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 15 Feb 2006 22:28:47 +0100

Hello!

I would like to move a single sprite with very slow speed. If I set the speed to 1, there is 1 pixel movement per refresh. But how can I make an even slower movement?

[15 Feb 2006] Re: slow motion

Posted: Sat Jun 13, 2020 5:31 pm
by PEB
Note: This is an archived post that was originally sent to the Hollywood mailing list on Wed, 15 Feb 2006 13:44:29 -0800 (PST)

Have you tried using SetInterval() to accomplish this?

[16 Feb 2006] Re: slow motion

Posted: Sat Jun 13, 2020 5:31 pm
by GMKai
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 16 Feb 2006 07:57:49 +0100

Use a loop and within the loop check an interval, as i don't have the documentation here that is all for the moment that i can say about that

[16 Feb 2006] RE: slow motion

Posted: Sat Jun 13, 2020 5:31 pm
by SamuraiCrow
Note: This is an archived post that was originally sent to the Hollywood mailing list on Thu, 16 Feb 2006 09:51:16 -0600

Divide the fine coordinates by the course increment you want to happen on the screen.

For example if you want to move 3/16 of a pixel in the x direction then

Code: Select all

x=x+3
position=x/16