Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / I've got an idea for a really irritating game

Author
Message
Ultimate Newbie
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location:
Posted: 28th Jan 2006 17:06
What I need to know is, is it possible to measure the speed at which the user moves the mouse cursor over the screen so that my game can react to it?
It probably sounds like a stupid question, but the whole point of the game is reacting to the mouse movement.
thanks
smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 28th Jan 2006 18:46
mousemovex() and mousemovey() works fine for that

life's one big game
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 28th Jan 2006 21:06 Edited at: 28th Jan 2006 21:06
Just be aware that mousemovex() and mousemovey() works once per sync. If you read it once, you get the value. If you read it twice in between syncs, the second time it will be 0. The best thing to do is copy it to a variable first.

Image All
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: Home
Posted: 29th Jan 2006 15:31
Maybe every frame, you can compare the current mouse position with the last one (which was saved in a varaible) and calculate how fast the player is moving the mouse every [framerate here]th of a second...

Login to post a reply

Server time is: 2024-09-24 15:29:35
Your offset time is: 2024-09-24 15:29:35