Skip to main content
GameDev.net gamedev.net
🔒 Locked

Windows mouse input without DirectX?

Started by Zorodius Oct 27, 2002 at 3:35 PM 4 replies 200+ views
Original Post
Zorodius
Zorodius
I''d like to get mouse input for my game, which I hope to have run on as many Windows platforms as possible, and most certainly on mine, which is 98. With this in mind, is there a way to get mouse input without using DirectX? I know I can use WM_MOUSEMOVE, and that would be just fine if I only wanted the mouse''s position, but sadly what I need are relative coordinates, as in "the user moved the mouse five pixels left and two pixels down since the last update." I know I could just subtract the last position from the current position, but this still won''t work, since it will screw up if the user''s cursor is at the edge of the screen and they''re still moving the mouse in that direction. Any suggestions?
You don't need to vote for the "lesser of two evils"! Learn about Instant Runoff Voting, the simple cure for a broken democracy!
niyaw
niyaw
you need directx for that. 98, if you didn''t know, comes with dx6.x i believe.

and what''s wrong with installing dx8.1 on your computer and using that? win98 is still a supported operating system.
EAX
EAX
Is there a way to make windows reposition the mouse?

EAX
EAX
niyaw
niyaw
SetCursorPos
Dark_Icer
Dark_Icer
Why don''t you try to have the movement lock on to the direction the user moves the mouse if and when the user pushes the mouse button. Then when the user release the mouse button the character/object movement halts. I don''t know exactly how to do this yet but I have see this done on RPG Maker 95.

Just because some one is new to something does not me that they shoud not try to do something big with it, after all trail and error is what build experence and experence built is experence gain.
Signed - Tne Nevermelting Icer - Dark Icer
Zorodius
Zorodius
quote:
Original post by Dark_Icer
Why don''t you try to have the movement lock on to the direction the user moves the mouse if and when the user pushes the mouse button. Then when the user release the mouse button the character/object movement halts.



Because that isn''t the kind of control scheme that would work for my game. I''m making a 3D Asteroids-like space shooter, not a third-person RPG.

quote:
Original post by niyaw and what''s wrong with installing dx8.1 on your computer and using that?


Nothing''s wrong with it, I already have DirectX 8.1 installed on my computer, I just don''t want to have to ask the users to do the same.

quote:
Original post by EAX Is there a way to make windows reposition the mouse?


Thanks, that''s a good idea!
You don't need to vote for the "lesser of two evils"! Learn about Instant Runoff Voting, the simple cure for a broken democracy!

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.