Hello all:

I've reached a point in my screensaver experementation where I need some advice. I've managed to get multiple images to work and play well with each other, scrolling back and forth across the screen. However, I've run into a fairly nasty limitation. If I want the animation to appear smooth I need to move the image the same number of bits every "frame", but I can only move it so far without blurring.

So, if I want to move at a rate of say 250 pixels per second, but I don't want to move more than 6 pixels per frame, I need to run at a rate of about 42 frames per second (41.66666...). So, I set a timer for 24 mSec.

That's fine, if I want to move everything at the same speed, but I have several objects, moving at different speeds. Since everything must move the same number of pixels per frame, I only have 6 possible speeds to work with.

My question is, is there a better way to handle objects moving across the screen?

I need a technique that produces constant speeds, without jerkiness, and can move an object at a wide range of speeds without blurring.

I've attached my latest test build, so you can see where I am so far. Just make sure all the images are in the same directory as the screensaver before you run it (it contains my habitual lack of error checking).
Posted on 2002-03-11 12:54:29 by The Worrier King
Worrier King,

Your source (attachment) doesn't show up with your post. You need to repost it.

BTW, did you fall into the same trap I did, the first time I posted? That is, did you select the file to attach, previewed, then clicked post? Doing things in that order results in no attachment being added. You need to do things in the following order: Preview, Attach, then Post.

Oh, I wish this could be fixed somehow... But then, maybe you just forgot to add it?
Posted on 2002-03-11 13:25:21 by Lysic

Yeah, that's what happened. Here's the file.
Posted on 2002-03-11 14:17:28 by The Worrier King
Hi !

The timer settings wouldn't synchronize with the refresh rate of your videocard/monitor-settings ... so the blurring apears !

Use direct-x with double-buffering. There's also a function to check wether the buffer displayed changes (in order). With this you should get rid of it !

Greetings, CALEB
Posted on 2002-03-11 19:03:46 by Caleb
That's good advice to combat "shearing" and other problems that I planned to address in the future, but it won't help with the timing problems I originally asked about.

I'm sure this is a common problem. What solutions have people seen, or used, in the past?
Posted on 2002-03-11 19:20:35 by The Worrier King