Strazdas said:
StreamerDarkly said:
CrystalShadow said:
For instance, since I have one in front of me right now, there are several properties of it that stand out.
2. the distance it moves depends on the speed of your finger movement across the pad.
3. If you hit the ends of the pad (or get near them), you lift your finger, move it back across, and slide it further.
- Which is a smaller scale equivalent to what you do when you run out of space with a mouse.
Number 2 is a subtle point that I never fully appreciated until just now. In fact, I thought you were wrong until I just confirmed it with my own mouse. Previously I had assumed the cursor distance was in direct proportion to the mouse distance, irrespective of speed. Thank you for that.
It is called mouse acceleration. It is a turn-offable function in OS. Many shooters also disable this for more precise aiming. its great for navigating your OS, not so much for FPS.
CrystalShadow said:
That really depends on the type of game.
But for many games the OS settings are irrelevant anyway, because the game does it's own calculations.
I've done enough game programming to know that. Yes, you can read the values the OS gives you, but more often than not it's better, if creating a game to work with the raw data the mouse sends out.
And that data is a series of packets describing the change of position over time. 99% of the time you can't apply this directly, especially in a game, because there is an absurd mismatch between the resolution of the mouse and what you are trying to control with it.
This is made much worse by the wide range of mice with huge differences in dpi settings (or equivalent, depending on how the mouse works)
Non-linear motion is one option among many, which indeed you may not want in some situations, but then again, may appreciate in others.
It depends...
This is not entirely correct. any game that uses mouse uses OS calcuation for mouse input with one exception. The exception is using RAW input and do your own mouse driver support. Very few games do this. Most games instead use windows API and send in commands to disable things like Mouse Acceleration while you play which windows restore once you quit the game.
Raw is great if you can code your mouse driver well. most dont bother and use windows settings to disable all fancy windows stuff and leave only basic input.
Ironically, windows do not support this outside of fullscreen game, so you cannot truly force mouse acceleration off in your OS. yes, even if you disable it in settings.
That's dp rather questionable given that mouse acceleration in the windows api is only applied to direct mode (where the api call returns a cursor location), rather than relative mode. ( where it returns the coordinate delta values)
And using direct mode for situations where there is no cursor onscreen (like say, when controlling the targeting reticule in an fps) is totally absurd.
While it's true that in windowed mode there are a lot of extra complications (which explains why historically, many games didn't support it well, if at all)
Among these many are graphics limitations. There's no ability to do page flipping in windowed mode. You cannot set the resolution or colour depth. (a big pain if your engine isn't coded for every possible colour depth).
The front buffer contains the entire screen, not just your game's window. The title bar counts as part of the window... You ideally need to be able to handle window move and resize events. (a surpring number of games can't deal with that)
All common stuff for general windows programming, but a headache for games.
Mouse behaviour also varies depending on if you use the windows api calls, directInput or XInput to handle things. Then it also varies on what kind of data you ask for...
But why you'd use screen coordinates outside of situations in which you have a cursor onscreen...
Well, anyway, what makes you so sure about what most games do anyway?
My knowledge comes from programming books and api documents.
That doesn't tell me what any given game does, but it does tell me some methods would be rather dumb to use in games...