vega Posted December 7 Posted December 7 Hi, I have an issue where I'm working on a fast paced shooter, and I have noticed and measured strongly increased input delay (up to + 20ms). After looking further into this, I noticed that we don't really have a way to sample input and set the player's view angles at a rate higher then the engine's tick rate. Even if I tried to spawn another thread to work around the tick rate, I cannot force the render thread to not interpolate the rotation. So I guess I'm looking for a conversation on this and asking if we could just get a simple option like "Disable rotation interpolation" for this exact case. Regards Quote
vega Posted December 7 Author Posted December 7 Or even better, maybe let us override some function that gets called from the render thread that allows us to overwrite the rotation/position manually Quote
Josh Posted December 7 Posted December 7 I actually want the same feature for my game, so I think this is likely to happen. The logic and render threads would still run at the same time, but they would both be synced at the same speed so that one update = one frame rendered for perfectly smooth motion. You can disable threading altogether by putting this at the very beginning of your program: EngineSettings settings; settings.asyncrender = false; Initialize(settings); However, that will not be exactly the same thing, and will give you a lower framerate. Quote Let's build cool stuff and have fun.
Josh Posted December 12 Posted December 12 One really simple thing you can do is call camera->Sync() after the player update code. This will disable interpolation on the camera entity. Quote Let's build cool stuff and have fun.
Josh Posted Wednesday at 09:07 PM Posted Wednesday at 09:07 PM @vega I have added an experimental mouse look feature in 5.0.2 on the beta branch that gets run in the rendering thread. This operates in a manner similar to how the VR headset orientation updates, right before a frame is rendered: https://www.leadwerks.com/community/topic/61318-release-notes/page/37/#findComment-320702 This will provide very low-latency mouse input controls. Quote Let's build cool stuff and have fun.
Josh Posted Thursday at 04:35 AM Posted Thursday at 04:35 AM I'll have some more stuff for you after Christmas. I did some work on the timing and found a way to run the logic and rendering thread in sync at any frequency. It feels like playing new Doom games at 200 FPS. I think you will like it. Quote Let's build cool stuff and have fun.
vega Posted Friday at 04:38 PM Author Posted Friday at 04:38 PM @JoshAwesome, thank you! I'll test it right away. Looking forward to the other stuff. Marry Christmas! 1 Quote
Josh Posted Friday at 06:14 PM Posted Friday at 06:14 PM Here is is: https://www.leadwerks.com/community/topic/61318-release-notes/page/37/#findComment-320732 Assuming your game is written in C++, I recommend these settings: world->Update(window->display->GetRefreshRate()); world->Render(framebuffer, true, 1); And multiply all your time-dependent values by world->GetSpeed(). Quote Let's build cool stuff and have fun.
Solution Josh Posted 9 hours ago Solution Posted 9 hours ago Related video: I think it is safe to close this, although this won't go onto the default branch until 5.0.2 is released, and we might still have some details to work out. Quote Let's build cool stuff and have fun.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.