andymanic / OSRTT

OSRTT (Open Source Response time tool) is a complete LCD monitor response time testing solution made as easy and accessible as possible.
https://andymanic.github.io/OSRTTDocs/
Other
55 stars 4 forks source link

Custom game integration #10

Closed WoodyPWX closed 1 year ago

WoodyPWX commented 1 year ago

Hello there again, I would like to measure input lag in our game. I can add a debug mode, reacting to mouse button click and showing a filled rectangle. Can I use your launcher for this kind of measurement? Or do I need to read values directly and show them in my UI? Regards, Tomas

andymanic commented 1 year ago

Hello again! So the response time tool isn't set up to do latency testing with external applications at the moment. It's certainly something that it could do with a bit of a firmware tweak. All the data processing is done in the desktop app so it's a little more complicated than just connecting via serial and displaying a result. I've actually been building the open source latency testing tool specifically for that (project here). Of course the hardware you currently have is capable of running that sort of test, so you are more than welcome to tweak the firmware and software to fit your needs. The main processing code isn't all that complicated especially for the latency test, so I'm sure you could incorporate that into your own software easy enough. I'd also be open to making a customised firmware and software for you on commission if that's of interest - although when factoring in the development time I'd argue it'd be more cost effective to just grab one of the latency tools instead.

WoodyPWX commented 1 year ago

If I understand it correctly, the OSRTT launcher is now spawning an Unreal based app window over the selected monitor, so all I need is just to skip that if my own app (a game) is there already, waiting for mouse clicks, filling screen bellow the OSRTT device. That should be a fairly easy modification of the launcher app and hopefully no fw changes. I'm I right?

andymanic commented 1 year ago

The latency test now uses my own DirectX code instead of the unreal app so you'd actually be better stepping back a few versions (looks like V3.4 was the last build before the DirectX stuff here) and then replace the UE launcher and wait-for-exit with a sleep or something similar. The firmware for the latency test currently uses the arduino keyboard library as I found mouse capture wasn't as reliable, but it'd just be swapping "Keyboard.write("1");" with "Mouse.click(MOUSE_LEFT);" - in theory that'd be it at a basic level anyway.

WoodyPWX commented 1 year ago

I will just add a check box to prevent any spawning and detect pressed "1" in our game, so it should minimize required changes. Thanks for the info.