HN user

YetiSpaghetti

3 karma
Posts0
Comments4
View on HN
No posts found.

Everyone plays fps games. This includes people who wouldn't consider themselves "fps gamers". Users who care about mouse input will go into the settings to target the 'correct' settings for them.

For everyone else, there's the OS values.

We're not having the same argument, but I didn't clarify in my initial post properly: It's best to launch your app for the first time with the default OS settings. Let the "power users (fps gamers)" tune settings that enable raw input.

It's more complex than that. There's no right answer and therefore every answer is wrong :(

For more critical observers, you're right: raw input is preferred. However, most users (casuals) expect similar settings as their OS. It's probably best left up to the user to decide, but to default things to the OS legacy settings. A more advanced player will know to tune the settings while the less advanced just want to launch and go.

I think the author has two issues in their approach.

1) You should be processing the whole message queue for all types of messages in one go. When using raw input, author is peeking for "not input" event types. To me, this seems suspicious for performance. With a raw input device registered, the message queue is going to be huge.

While I don't know the underlying data structure of the message queue, if we assume an array, then the author's code will do a while loop of O(N) lookups for "not input" messages and remove them.

The correct approach is to dispatch the whole queue and ignore messages of types that you don't care about in your message handler.

2) You SHOULD be using the legacy input events for games, not raw input. The OS input massaging (ex: acceleration) is something that should remain consistent between applications. If there's acceleration: that's what users expect. You don't want the mouse to suddenly behave different in your application. Your games tuning values (sensitivity, accel) should apply relative to the OS values.