[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame standard mouse



I'm using Windows XP, python 2.4.4, and pygame 171. The problem is: during fullscreen the mouse pointer moves slower for a given mouse input than in windowed mode. This happens on all the games I downloaded from pygame.org. The most i tried is Jack Whitham's 20,000 Light-Years Into Space. Try the game out, in its main menu there is a fullscreen or windowed mode option, so you can quickly compare between the two (you have to restart the game for the change to take effect). Also, change the game resolution to match your desktop resolution. It's more noticable that way.

I would like at least the mouse speed in fullscreen is as fast as in windowed mode, though having the mouse moves twice or three times as fast would be nicer still. I like fast mice :)

The code I wrote uses pygame surface in place of the pointer and use the pygame.mouse.get_rel() to move the pointer_rect. By multiplying the returned value of get_rel() I can set the pointer speed as fast as I want. And actually, I got it to work just now. But it still means using resources I should not have to and handling the blits and rects for display.update() more difficult, a potential problem in the future. I'd still use pygame's mouse if possible.

Wahid



On 4/19/07, Brian Fisher <brian@xxxxxxxxxxxxxxxxxxx> wrote:
On 4/18/07, Wahid Marditama <wahid.marditama@xxxxxxxxx> wrote:
> I find the standard mouse in pygame is slow when display is set to
> fullscreen.
>
What do you mean when you say "the standard mouse in pygame is slow" -
do you maybe mean that the cursor seemed to have choppy movement? Do
you mean that the cursor doesn't move as far as you expect when you
move the mouse? Or do you mean that the cursor seems to "lag" behind
where you expect it to be? (like it's moving through water)

Also, what OS are you using?


> Or, is there a good 'virtual' mouse code? I
> tried writing one but it does not work as expected.
>
What exactly did you try writing, and how did it not work as expected?