Understanding a Gameplay Loop: Types & Good Examples of a Game Loop

Game Loop refers to two different things people often confuse. Programmers mean the code cycle (input → update → render) that runs every frame. Designers mean the repeating pattern of player actions and rewards that defines what your game is.

They’re related — the design loop runs inside the programming loop — but they’re solved with completely different tools. This article covers both.

What Is a Game Loop?

The game loop refers to the overall flow of the game program. It is referred to as a ‘loop,’ as the program keeps looping infinitely until manually stopped.

As you can probably imagine, there is a ton of variety in game loops and which games loop in specific frames per second. You have probably heard of frames per second, or FPS. Frames per second refer to how many frames to process in one game loop.

What Is A Core Gameplay Loop?

A core gameplay loop is a gameplay loop in which a highly specified set of actions are undertaken by the player, most often the main actions defining the game. In Call of Duty or Battlefield, the core gameplay loop is more or less targeting enemies, shooting them, and seeking out new enemies.

What Is A Simple Loop?

A simple game loop is one of the more mundane game actions like walking or opening a door. This contrasts with more complicated game loops like truly engaging with other NPCs and enemies.

A more useful way to split loops apart is by time scale. A micro loop plays out in seconds — aim, shoot, dodge, the moment-to-moment feel. A meso loop plays out in minutes — clear a room, level up, finish a run. A macro loop plays out in hours or across sessions — unlock a new biome, beat a boss, complete the story. Strong games stack all three. Vampire Survivors, for example, has a micro loop of “dodge enemies while auto-attacking,” a meso loop of “survive 30 minutes and level up weapons,” and a macro loop of “unlock new characters and stages between runs.” Pull any layer out and the game collapses.

The Main Idea Behind The Game Loop

The game loop describes the more repetitive activities that a gamer will take part in — the main mechanics the player is introduced to upon booting up a game. Game loops are incredibly varied. Think of leveling up in Final Fantasy VII, or completing a level in the very first Mario game. These are game loops.

Let’s break it down a little further. In Call of Duty, an enemy appears. What do you do next? You shoot. The projectile leaves your weapon and affects the enemy. This simple progression of actions is a gameplay loop. Of course, that’s an extremely simplified version, but it still illustrates the overall effect. Keep in mind that these particular game loops most likely have smaller, more detailed, and nuanced game loops incorporated within them.

For a richer worked example, look at Slay the Spire. Its micro loop is “pick a card → play it → see the effect.” Its meso loop is “finish a combat → choose a reward card → pick a path on the map → next encounter.” Its macro loop is “beat (or lose to) the act boss → unlock new cards and relics for future runs → start again with deeper options.” Notice that every layer ends with a meaningful choice that affects the next iteration. That’s what separates an addictive loop from a treadmill. If your player isn’t making a real decision at the end of each cycle, the loop is broken.

Game designer Daniel Cook drew a related distinction worth knowing: loops are repeatable systems that get richer with practice (Tetris, chess, fighting games), while arcs are one-time content (cutscenes, set-piece levels). Arcs are expensive to make and consumed once. Loops are cheap to make and consumed forever. Games that lean on loops scale; games that lean on arcs burn out their studios.

How Do You Make A Game Loop?

Creating a game loop can be divided into a few steps. First, the game designer should prepare the game environment for the actual gameplay loops to take place. This includes menu options, heads-up display, and other aspects of the user experience and user interface. Second, you add the physics, upgrade systems, and the game’s input processes. Finally, the game designer takes these up-to-date features and implements them into the game, making them appear on the screen.

At the code level, the naive version of a programming game loop is just this:

while (running) {
  processInput();
  update();
  render();
}

But this runs as fast as the CPU allows, which means physics behave differently on a fast machine versus a slow one. The standard fix is a fixed timestep with an accumulator:

const STEP = 1 / 60; // 60 updates per second
let accumulator = 0;
let lastTime = performance.now();

function loop(now) {
  const delta = (now - lastTime) / 1000;
  lastTime = now;
  accumulator += delta;

  while (accumulator >= STEP) {
    update(STEP);       // game logic at a constant rate
    accumulator -= STEP;
  }

  render(accumulator / STEP); // interpolate between simulation states
  requestAnimationFrame(loop);
}
requestAnimationFrame(loop);

This decouples your simulation rate (fixed, predictable, deterministic) from your render rate (variable, as fast as the screen can refresh). Glenn Fiedler’s article “Fix Your Timestep!” is the canonical reference and worth reading before you write a real game loop yourself.

How It’s Applied

Game designers develop the core gameplay loop to make their game run. You will need to have a grasp on some programming languages to implement your game loops best — for example, you’ll want to make something like a JavaScript game loop.

In practice, most developers never write a raw game loop because the engine owns it — they hook into the engine’s lifecycle instead. In Unity, Update() runs once per frame for general logic, FixedUpdate() runs at a fixed interval for physics, and LateUpdate() runs after all updates for things like camera follow. In Unreal, Tick(DeltaTime) runs every frame on Actors, while physics handles itself on its own sub-step. Knowing which hook to put code in is more important day-to-day than knowing how to write the loop from scratch.

Design Decisions

Who Owns the Game Loop?

Depending on what you are using for a game engine, the engine itself will be the author of the game loop. This can be extremely beneficial, as it already has game loops built-in, easing the burden of game loop creation considerably.

However, you may want to have complete control over the game loop. In this case, you will need to write it out using programming languages. You could use Java game loops to build your game.

Power Consumption with Game Loops

A more recent consideration is not making the players’ computers turn into lava lamps. You will quickly see that balancing both frame rate and refresh rate will be vital to creating a successful game loop. Many mobile platforms cap you off at either 30fps or 60fps, creating a nicely balanced experience that doesn’t go too hard on someone’s device.

It’s worth nailing down the difference between these two numbers, because they get conflated everywhere. Frame rate (FPS) is how many frames your game produces per second. Refresh rate (Hz) is how many times the monitor redraws per second. If your game runs at 120 FPS on a 60 Hz monitor, the player only sees 60 of those frames — the rest are wasted and can cause screen tearing. V-sync locks your frame rate to the monitor’s refresh rate to prevent this. On mobile, capping at 30 or 60 FPS isn’t just about smoothness; it directly extends battery life and stops the device from thermally throttling.

Perfecting the Game Loop

Grab Their Attention Quick

You need to keep peoples’ attention on your game. If the loop is flawed or not designed properly, people could determine that your game isn’t aesthetically pleasing or just too complicated to learn. This is vital to your game’s success.

Give the Player Something to Work Towards, and Keep It Simple

The best way to utilize a core game loop is to give players objectives — the fewer goals at once, the better. Once again, work on the balance of attractive and intuitive designs while keeping a robust core element of gameplay for the players.

How long should a loop actually be? A rough rule of thumb that holds across most genres: the micro loop should resolve within 1–5 seconds, because players need constant feedback; the first reward should arrive within 30–60 seconds of starting play, because if the player hasn’t felt good about something they did inside a minute you’ve already lost most of them; meso loop completion should land in the 2–10 minute range — long enough to feel like an accomplishment, short enough to fit a commute; and the macro loop runs session-to-session, days to weeks of total play. If the gap between rewards is too long, players bounce. If it’s too short, they feel patronised. Playtest aggressively here.

When a core loop isn’t working, it’s usually one of four problems. No escalation — the 100th iteration feels the same as the 1st (fix: add new mechanics, enemies, or constraints on a schedule). No meaningful choice — the player isn’t deciding anything, just executing (fix: add branching rewards, build options, risk/reward trade-offs). Reward gap too long — players quit before the next dopamine hit (fix: layer faster micro rewards inside the slower meso loop). Degenerate strategy — one approach dominates and the loop collapses into repetition (fix: rock-paper-scissors trade-offs, or rotate enemy types that punish the dominant strategy).

Critical Game Loops in Game Design

The core game loop, or CGL, forms the entire framework for the game processes. The core gameplay loop entirely determines your genre, gameplay type, and more. If you can’t define your game loop, then your game has a real danger of not turning out well for the market. Problems with the core game loop could elude game developers when there is a problem in the game design process.

Well-Defined Core Gameplay Loop

Having a well-defined core gameplay loop makes your game a tight piece of art. Within the aim, your game will drift. This could be catastrophic, as poor design decisions can effectively ax all of your great ideas and more.

You could have addictive gameplay, great characters, and art, but if the core gameplay loop isn’t well defined, it’s essentially an unfinished product.

The shooter-style examples used so far are only one shape of loop. Other genres run on completely different patterns. Puzzle games like Tetris or Baba Is You loop on “observe state → form hypothesis → test → observe result.” Sims like Stardew Valley or Cities: Skylines loop on “plan → invest → wait → harvest → reinvest.” Narrative games like Disco Elysium loop on “explore → encounter dilemma → choose → see consequence → new dilemma.” Idle games like Cookie Clicker loop on “earn → upgrade → earn faster → unlock new earning method.” If your game doesn’t feel “loopy,” it’s probably running a slower, less obvious loop — not no loop at all.

Create a Proper Game Loop

Why Do You Need a Game Loop?

Game loops are absolutely essential for a game to run smoothly. Without a game loop, your game will be broken and virtually unplayable. You need the game’s basic mechanics to be ever-present, or else the player won’t be able to experience entire parts of the game.

Aside from the physics, graphics, and other programming information, the game loop concept is arguably one of the most important in game design.

The Benefits of a High Frame Rate

Having a higher frame rate means that you could theoretically apply more game loops to your game. This allows for more possibilities and for a lot more detail. The more game loops you add to a game, the more framerate you will need to make the game not only function properly but to have it perform at an acceptable level. Too many game loops can make games lock or freeze-up performance-wise.

It frees up a lot of creative potential, but it keeps games up to date and runs smoothly. This is perfect for pro gamers who need every second to pull off a headshot.

The Ideal Frame Rate for Your Game Loop

Having a lower frame rate like 12 fps would be a minimal toolkit to work with. It would be choppy and all around, not reasonable grounds for creating a game loop. It makes sense you would want to put out all the stops and take your framerate to the top level. However, it is somewhat of a delicate balance.

There is no perfect answer, but you need to keep in mind the refresh rate of your frames. If you have a higher rate of frames per second, more system memory and screen refresh rate will be taken up, lowering performance. Ideally, you want to find the perfect balance for your game.

Testing Whether Your Loop Actually Works

However well a loop reads on paper, it lives or dies in playtest. A few signals to watch for: after the tutorial, do players self-direct, or do they ask “what do I do now?” — if it’s the latter, the loop isn’t legible. Can a playtester describe the game in loop terms after one session (“you do X, then Y, then you get Z”)? If yes, the loop is clear. Where do they put the controller down? That’s the weakest point in your loop, usually a too-long reward gap. And do they come back the next day unprompted? That’s the macro loop working.

Marcus Kelsey
Marcus Kelsey
Marcus Kelsey is an experienced gaming writer who focuses on game design, game development, and the latest in the world of game studios. In his part time, he loves to play Minecraft.

Related Articles

Latest Articles