docs: add new diagrams for game loop, gateway, guarded suspension, half-sync/half-async, health check

This commit is contained in:
Ilkka Seppälä
2025-04-06 20:55:07 +03:00
parent 9b64cdee98
commit 9d23a234bb
11 changed files with 20 additions and 4 deletions
+4
View File
@@ -34,6 +34,10 @@ Wikipedia says
> The central component of any game, from a programming standpoint, is the game loop. The game loop allows the game to run smoothly regardless of a user's input, or lack thereof.
Flowchart
![Game Loop flowchart](./etc/game-loop-flowchart.png)
## Programmatic Example of Game Loop Pattern in Java
In our Java example, we illustrate a simple game loop controlling a bullet's movement, updating its position, ensuring smooth rendering, and responding to user inputs. The Game Loop is the main process driving all game rendering threads, present in all modern games. It handles input processing, internal status updates, rendering, AI, and other processes. Starting with a simple `Bullet` class, we demonstrate the movement of bullets in our game, focusing on their 1-dimensional position for demonstration purposes.
Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB