Pages: 1
Topic closed
I ran into this solution working on my current project, I hope it's helpful.
If you have a fast computer compared to other scratchers, you may make animations/movement that runs well on your computer- but others complain that it's slow.
http://scratch.mit.edu/projects/AddOne/866265
Hold the mouse button to draw many lines at once.
The top cat uses the usual method for movement. It moves 4 spaces in a loop.
When you hold the mouse button, frames take longer to draw, so the top cat slows down.
Even though it skips frames, the bottom cat stays moving at the same rate because it is using the timer to determine how far it should move.
This method will allow you to make many types of animation work at the same speed on fast and slow computers, online or off.
Skipping frames instead of slowing down is not a new idea. It happens in modern games and video players when the system bogs down.
There are probably much better ways of doing this. But the idea is that the animation is based off the timer instead of incrementing the same amount each frame.
Feel free to run with this idea.
Just please leave me a comment and let me know how it works out for you.
And let me know if you have questions.
Last edited by AddZero (2010-01-30 03:19:06)
Offline
Nice. That would be useful if timing is crucial.
My site Offline
You could also implement this into games... I think...
Offline
juststickman wrote:
You could also implement this into games... I think...
Yes, I haven't worked it into sprites with velocity well yet, but I think it can be done. For linear movement and animation it's easy to add and works well.
btw though, if you do use this for more than one sprite, the [spf = lastTimer - timer] [lastTimer = timer] should only be in one place, in it's own loop somewhere.
Offline
Topic closed
Pages: 1