| bio | website | |
|---|---|---|
| location | Urbana, IL | |
| age | 19 | |
| visits | member for | 3 months |
| seen | Apr 26 at 6:32 | |
| stats | profile views | 1 |
|
Mar 1 |
comment |
C++/OpenGL Game - How to Make it Compatible with Screen Recorders? Turns out I was calculating delta time incorrectly! At the beginning of the game loop I had start = engine->getSystemManager()->getTime();
And at the end of the loop I had delta = engine->getSystemManager()->getTime() - start;
This worked well in all cases except for recording. I modified the code to calculate the delta all at once, using:
oldtime = newtime;
newtime = engine->getSystemManager()->getTime();
delta = newtime - oldtime;
And this fixed the problem. It also made the movement a lot less jerky! |
|
Mar 1 |
awarded | Scholar |
|
Mar 1 |
accepted | C++/OpenGL Game - How to Make it Compatible with Screen Recorders? |
|
Mar 1 |
comment |
C++/OpenGL Game - How to Make it Compatible with Screen Recorders? I just tried this: in my game loop I printed it to the console once every ten seconds (using my current timing code), and all the numbers printed were 10 seconds apart. However, when I'm recording the game, the actual time passed between the printings is closer to 20 seconds, but a 10-second difference is still being printed. |
|
Feb 27 |
comment |
C++/OpenGL Game - How to Make it Compatible with Screen Recorders? It's not framerate limited; the game only runs at around 80 FPS on my laptop during high action, with no slow down. I would be more than happy to provide code, but it would take several hundreds of lines to show some representative example. I can't figure out where to start narrowing this down. |
|
Feb 27 |
awarded | Student |
|
Feb 27 |
asked | C++/OpenGL Game - How to Make it Compatible with Screen Recorders? |