Questions tagged [game-loop]
The central code loop responsible for handling the running gameplay. At its most basic state, it accepts input, resolves the actions of entities, and renders the scene.
487 questions
1 vote
0 answers
126 views
Correctly handling input in case of frame drop
My game loop looks roughly like this: ...
0 votes
0 answers
218 views
Struggling with stuttering in my 2D C++/OpenGL game
I'm building a 2D game from scratch using C++ and OpenGL, but I've run into a frustrating issue: a simple sprite moving from left to right occasionally stutters. Tracking down the cause has been ...
1 vote
1 answer
291 views
Fixed timestep without cloning game state
I'm doing a JS game with hundreds of moving physical particles. I've read the famous "fix your timestep" article. So far I've implemented basic prototype with janky game loop tied to FPS and ...
0 votes
1 answer
87 views
When does SFML deal with user input
I have an SFML programme using window.setFramerateLimit() to determine the time step of the game. I have a game loop that looks like this: ...
0 votes
0 answers
71 views
Why do Unity UI toggle groups update *after* the default time in Execution Order settings?
Why is toggle group after default time in the default script execution order in Unity?
1 vote
1 answer
219 views
When should I call the physics simulation within the game loop?
I am thinking about where to call the physics simulation. The current situation is that I first update the entities and then the physics immediately before rendering. As you can see in the following ...
1 vote
1 answer
183 views
How to call every method with a certain name from a set of classes in C#
I have the following case: I have a class called App.cs and here I have a function called Render, that runs once every frame: ...
17 votes
3 answers
6k views
Game loop isn't performing well enough, so my frame rate is too low (Windows Form + GDI+)
I decided to learn about building games, so I picked up C# to use it along with Windows Form - I already have C# experience, so that was the main reason I did so. That said, I tasked myself to build a ...