Oni Central Forum

A forum for the Oni community

You are not logged in.

#1 10/13/21 08:10

RossyMiles
Member
From: Australia
Registered: 06/23/08
Website

Daodan Input - Fix for laggy mouse input

Edit: This is now out of beta! It's released in the Daodan DLL 4.1.

It's been a while, but I was itching to work on the Daodan DLL again and I wanted to try to fix the weird juddery mouse input in Oni.

This is Daodan Input, which is a rewrite of the platform-specific parts of Oni's input system. Unlike the old system, it doesn't gather inputs on an inaccurate 60Hz timer. Instead, it provides the latest inputs to Oni's game engine when it needs to process input. It also uses Raw Input instead of DirectInput for mouse movement, which should mean more accurate input for high-DPI mice and no mouse acceleration.

It's in beta because, while it improves things for me, I don't own a monitor faster than 60Hz, so I have no idea how it'll work on those. Please test it and tell me how it goes (even if you have a 60Hz monitor!) Hopefully I'll be able to get it into an official Daodan DLL release. It's released!

To install, follow the instructions for installing Daodan.

Daodan Input also adds an option for changing the mouse sensitivity. If you have a high-DPI mouse, try decreasing the sensitivity by opening Daodan.ini and adding the mousesensitivity line to the [windows] section.

[windows]
mousesensitivity = 0.250000
Changelog

Daodan Input beta 1
https://rossy.oni2.net/daodan-input-beta1.zip

- First beta release
- Adds new input system based on Raw Input
- Adds "mousesensitivity" Daodan.ini option

Daodan Input beta 2
https://rossy.oni2.net/daodan-input-beta2.zip

- Fixed F1 to close the pause menu, and debug mode keys
- Fixed togglable keys like Caps Lock
- Added new bindable keys: "mousebutton5", "scrollup", "scrolldown", "scrollleft", "scrollright"
- Fixed "pagedown". This was broken in Oni's original DirectInput key map.
- Instead of reading input on every frame, Daodan now only reads input when Oni's engine will process it. Unfortunately, Oni's engine only processes input 60 times a second, but Daodan can prevent judder and dropped inputs by reading input only on the same frames that it's processed. Note that this change will probably make mouse movement on >60Hz displays a lot faster than it was in beta 1 (it should now match what it was like on 60Hz displays.)

Daodan DLL 4.1
http://mods.oni2.net/node/233

- Daodan Input is out of beta and released as part of the Daodan DLL. If you use the AE installer, it will update automatically.
- Fixed the cheat code key bindings.

Last edited by RossyMiles (10/24/21 08:10)

Offline

#2 10/13/21 10:10

AluminumHaste
Member
Registered: 06/27/11

Re: Daodan Input - Fix for laggy mouse input

OMG OMG OMG OMG OMG OMG OMG OMG OMG OMG OMG OMG OMG
IT FUCKING WORKS!!!!!
Running this at 240 hz and mouse is very smooth now.
However, the game itself isn't that smooth, seems to be interpolating those extra frames, but that might just be Oni's engine hard capped at 60 fps.

Offline

#3 10/13/21 22:10

RossyMiles
Member
From: Australia
Registered: 06/23/08
Website

Re: Daodan Input - Fix for laggy mouse input

AluminumHaste wrote:

OMG OMG OMG OMG OMG OMG OMG OMG OMG OMG OMG OMG OMG
IT FUCKING WORKS!!!!!
Running this at 240 hz and mouse is very smooth now.

Glad to hear it. Thanks for testing!

AluminumHaste wrote:

However, the game itself isn't that smooth, seems to be interpolating those extra frames, but that might just be Oni's engine hard capped at 60 fps.

Yeah, I think Oni's engine has a lot of things hardcoded to 60fps. You could try the following to make Oni's 60fps timer more accurate, but I don't think it'll make a huge difference.

[windows]
usegettickcount = false

(Unlike what the wiki says, this should make Oni's timers more accurate in modern Windows.)

Last edited by RossyMiles (10/13/21 22:10)

Offline

#4 10/17/21 05:10

RossyMiles
Member
From: Australia
Registered: 06/23/08
Website

Re: Daodan Input - Fix for laggy mouse input

Added Daodan Input beta 2. See the changelog for more details.

Offline

#5 10/20/21 06:10

TOCS
Member
From: Denmark
Registered: 04/04/07

Re: Daodan Input - Fix for laggy mouse input

This sounds really great! Finally, it might be worth it to play on a 144 Hz display now. smile

Offline

#6 10/24/21 05:10

Michele
Member
From: Italy
Registered: 01/30/13

Re: Daodan Input - Fix for laggy mouse input

I can't believe it, finally my mouse is very smooth now. Thanks for your work! <3

Edit: And thanks a lot for source code yikes

Last edited by Michele (10/24/21 05:10)


I'm Italian and I'm 23. My nickname is .PixeL

Offline

#7 10/24/21 08:10

RossyMiles
Member
From: Australia
Registered: 06/23/08
Website

Re: Daodan Input - Fix for laggy mouse input

This has been released as part of Daodan 4.1! AE users should get updated automatically.

TOCS wrote:

This sounds really great! Finally, it might be worth it to play on a 144 Hz display now. smile

I hope so. smile Though keep in mind, most of Oni's game loop seems to be fixed to 60Hz, including input processing. I think animations can run faster, so hopefully it will be smoother at 144Hz at least.

Part of the reason why Daodan Input is smoother despite input being locked to 60Hz is because it knows which frames Oni will process input on, so it buffers input until those frames, rather than dropping it, which is what Oni used to do at high frame rates.

Michele wrote:

I can't believe it, finally my mouse is very smooth now. Thanks for your work! <3

Edit: And thanks a lot for source code yikes

Thanks for testing!

Offline

Board footer

Powered by FluxBB