Game Client
The is the only part of your game a player ever touches.
Choose an engine by where your game will run, not by reputation. Compare Babylon.js for the web, Unity or Flutter Flame for apps, and Unity or Unreal for desktop.
What you are building decides what you pick
Ask three questions in order. Where do players get it — a link, an , or a desktop storefront? Is it 2D or ? And what language do you already write comfortably? Those three answers usually leave exactly one sensible option, and the remaining debate is just preference.
For a first , the web wins more often than people expect. There is nothing to install, nothing to review, and you can send the link to a friend within the hour.
A game repeats the same three jobs dozens of times a second
Every game, from a falling-blocks puzzle to a racer, runs on a . Many times a second the client repeats the same work. It reads what the player pressed, updates the world (moves characters, checks hits, adds points) and draws a fresh picture. Each round of the loop makes one . At 60 a round must finish in about 16 , so slow shows up as stutter.
- 1 Read input Which keys are held down, where the finger touched, which button on the gamepad was pressed. Only read it here; do not move anything yet.
- 2 Update the world Move characters by speed × time passed, apply gravity, check , change the score and the timer. This is where the rules of your game live.
- 3 Draw the picture Clear the screen and draw the background, the and the score in their new places. The player sees only this step, so keep game rules out of it.
The pictures that move around are called sprites: a character, a coin, a bullet. Two sprites touch when their invisible boxes (hitboxes) overlap, and checking that every frame is called collision detection. Engines such as , and run the loop for you; you fill in what happens in update and what is drawn.
x += speed * dt. Then everyone moves at the same speed on every device.
Tell the which part of the loop you mean. For example: "In update, move the player with the arrow keys at 200 pixels per second using delta time, and stop at the walls. In draw, show the score at the top left." Naming the step gives you smaller, easier-to-check code.
Web
A link is the shortest distance between your game and a player. No install, no , works on every device with a .
Mobile apps
Store distribution, , and — at the cost of review and rules.
Desktop
Bigger screens, real input devices, and . This is where longer-session games live.
Two things people get wrong
, Unity, Unreal and Flame appear here as things worth knowing about, not as technologies SONUB has adopted.