jerky update till I move mouse?

Miscellaneous Forums/General Discussion/jerky update till I move mouse?

Hi,

When I turn hw acceleration off using the troubleshoot tab, the window is jerky to update.

However if I wiggle the mouse around, the contents update smoothly. It is using SDL, but I am sure its a phenomenon someone has come across?

What hacks / ideas do you have to make it stay smooth short of the user wiggling the mouse all the time?

Heh, I know this doesn't help but I had this before when running DOS games in windows, I had to POKE the ram at the keyboard buffer, it emulated keyboard activity apparently and gave a smooth DOS screen update :-)


I've seen the above in max too, not sure what to do.

However if I wiggle the mouse around, the contents update smoothly.
Sounds like an event queue issue.

It seems to happen on all examples I try using SDL as well as my own. I'm hoping someone will notice this thread and offer some clues.

As a workaround, perhaps you can just "PositionMouse" every frame? :)

I had this problem with SDL examples and I dealt with it. Only problem is that I can't remember how I did it! Let me have a dig in the old grey cells...

IndiePath,

Don't you think my idea would work? ;)

Hi Cygnus,

Personally I advise against that as it makes the windowed version of your game a nightmare to use - you can never get your pointer back :(

Oh, err. yeah. Didn't think of that :-)

You could get the windows global mouse coords using WinAPI and set *that* though :-)

My game uses mouse controls...

Any wracked brains, Tim? :)


My game uses mouse controls...



I know. The idea was to get, then immediately set, the mouse co-ords to the gotten position. Might need a little more work though :P Also wont work with standard max code.

Hey Cygnus, I tried your idea and I liked the results - of course it worked... however sdl has this quirk of keeping mouse coords within the window bounds and this keeps the user from moving the mouse out of the game area. It also glitches slightly... ARRRGH!

Thinking - what else would could fix this problem?