Skip to main content

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.

Filter by
Sorted by
Tagged with
1 vote
0 answers
126 views

My game loop looks roughly like this: ...
pan's user avatar
  • 111
0 votes
0 answers
222 views

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 ...
Liddelfranks's user avatar
1 vote
1 answer
291 views

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 ...
Fen1kz's user avatar
  • 195
0 votes
1 answer
87 views

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: ...
Momus's user avatar
  • 1
0 votes
0 answers
71 views

Why is toggle group after default time in the default script execution order in Unity?
ina's user avatar
  • 294
1 vote
1 answer
220 views

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 ...
Andy's user avatar
  • 13
1 vote
1 answer
183 views

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: ...
Bogdan's user avatar
  • 111
17 votes
3 answers
6k views

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 ...
curiousguy_08's user avatar
2 votes
1 answer
2k views

Currently looking and reading about entity component systems, and just wanted to ask about who 'owns' or where the components are registered. I would have thought that each entity has a collection of ...
Juzzbott's user avatar
  • 123
1 vote
1 answer
202 views

Basically title. Let's say, for example, I walk into Room, and Event A happens. Next time I enter Room A, Event B happens, because Event A already happened. I don't actually want to save this ...
YoshGJ's user avatar
  • 535
0 votes
1 answer
304 views

I have a game loop that simply iterates through every entity and calls entity.update() ...
Michael Moreno's user avatar
1 vote
0 answers
135 views

I have been bashing my head of an extremely simple case in my C++ game and would like some help. I have been researching about game loops, variable & fixed timestepping, rendering interpolation, ...
desade's user avatar
  • 19
0 votes
1 answer
228 views

U'm currently trying to develop a 2D RPG similar to early Final Fantasy titles for the NES. Up until now I've been reading C++ tutorials on SDL2 and doing my best to convert the concepts into OCaml. ...
Nameless King's user avatar
1 vote
0 answers
790 views

PeekMessage, TranslateMessage, and DispatchMessage often take a long time (sometimes more ...
KTC's user avatar
  • 470
3 votes
0 answers
172 views

This is my first foray into game-dev and I only have webapp experience professionally. I'm creating a browser game in nodejs/react. It is mostly text-based, so no intensive graphics (think chess.com ...
WaveRunner's user avatar
2 votes
2 answers
3k views

Say I have a game running at some number of frames per second on a 60 Hz monitor. I would like to display my frames correctly in the sense that the in-game time difference between two consecutive ...
bananab0y's user avatar
0 votes
0 answers
629 views

I am in the process of writing a 2D game in Rust, and decided to use glium for the graphics part. So far I'm doing fine, able to render textures and shapes ...
AndroGR's user avatar
0 votes
0 answers
50 views

I'm trying to develop my first ever browser-based multiplayer game that utilizes my own websocket server which has no multi-threading capability. It will be a game where players try to be the fastest ...
Decent Dabbler's user avatar
0 votes
2 answers
1k views

I am a bit confused on how user input is actually received and processed behind the scenes in a game engine. Let's say I have a simplistic game loop as follows... ...
4Matt's user avatar
  • 101
2 votes
1 answer
1k views

I wrote some games years ago, and they were always in sync with the main thread. So, for example if the monitor refresh rate is 60 Hz it would look like below. ...
Jarno's user avatar
  • 21
0 votes
0 answers
105 views

Could you suggest an implementation of a game loop with interpolation for SurfaceView and thread? i have this, but it doesnt work. ...
Limpan's user avatar
  • 11
0 votes
1 answer
325 views

I'm currently developing my first game. I had the idea to do something similar to the old browser games like Ogame, Travian, etc (with some differences though), and I'm kind of unsure about how to ...
Alta's user avatar
  • 1
0 votes
1 answer
703 views

I was just learning game programming concepts and was confused on what is the correct way to handle user inputs. I am used to javascript, so all the below snippets are in js but I assume the concepts ...
Rahul R Badenkal's user avatar
0 votes
2 answers
272 views

Question about game engine object oriented design. Let’s say I have an engine with a main loop, and many handlers that will be executed by the main loop every time on next iteration of main loop. So ...
Dmytro Brazhnyk's user avatar
0 votes
2 answers
283 views

Here is the main loop that I currently have (and it does work perfectly): ...
HeatSync's user avatar

1
2 3 4 5
10