Decouple render framerate from logic/physics framerate [1/2] #1398
Replies: 11 comments 1 reply
-
I can't check the blend yet but I think you expect the property gives you the real time. Instead of this, the Timer property really gives you the Frame time. Due to that when the FPS != 60 then the Timer property is not equal to real time. |
Beta Was this translation helpful? Give feedback.
-
If it's a frame rate based timer then that explains it. I was thinking it's a real timer. Is there a way to modify the source code to get the logic bricks to function based on a high precision timer and to not depend on the frame rate at all ? Or to separate the game logic, graphics and physics and to make each one run at different independent rates. |
Beta Was this translation helpful? Give feedback.
-
If it was working as you were expecting in upbge 0.2.4, we could eventually recover panzergame refactors related to time skipping vsync changes (which were causing issues). These commits were done just before 0.2.4 EDIT: Another upbge user said also that he prefered the way time was handled in 0.2.4 (@ SIGSEV / Rudolf) EDIT2: Do you use 0.2.5 or 0.3? |
Beta Was this translation helpful? Give feedback.
-
I use 0.25a but I will have to get the latest beta or alpha or 0.3 because this one is pretty broken already. I'm also playing with UE4 but that one has tons of other bugs. Python 3.7 was saying something about time.time in nanoseconds. Is that the only timer we can use ? There is no other option for timers ? |
Beta Was this translation helpful? Give feedback.
-
I did a pull request to recover panzergame work in 0.3 (This seems to fix your bug). For 0.2.5, i'm not motivated right now but if you tinker with code, i left panzergame work references in my 0.3 pull request: |
Beta Was this translation helpful? Give feedback.
-
I only have the free compiler installed at the moment. As in, Visual Studio Code. What tools do I need to build the latest UPBGE version from source code ? |
Beta Was this translation helpful? Give feedback.
-
Visual studio 2019, cmake 3.18+, tortoise svn, git |
Beta Was this translation helpful? Give feedback.
-
Do they have a free version of Visual Studio 2019 ? Can you also include a download link for the modified version that has the timer fix ? Thanks. |
Beta Was this translation helpful? Give feedback.
-
Lordloki approved my pull request in 0.3 alpha. He also does regularly some new 0.3 alpha builds, and you can download it on upbge.org. It will normally be available in a few days. EDIT: Yes, Visual studio 2019 community edition is free (you just need a microsoft mail (live.com, hotmail.com...)) |
Beta Was this translation helpful? Give feedback.
-
Sounds good. Thanks. I have to install all those build tools and VS2019 but it's going to take a while. I will probably wait for an Alpha build or an updated version. |
Beta Was this translation helpful? Give feedback.
-
initial issue pointing out decoupling physics framerate was solved. I pass this (and rename) to discussions to investigate how is possible to decouple visual framerate from logic framerate (idk if it possible) |
Beta Was this translation helpful? Give feedback.
-
Here is a blend file that shows the broken timer but I don't know how to attach it. I will just post the link. https://drive.google.com/file/d/1Ope2RErGFmC04SMcQoiaI3AEtLCB8dgV/view?usp=sharing
Beta Was this translation helpful? Give feedback.
All reactions