> For the complete documentation index, see [llms.txt](https://garden.famiclone.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://garden.famiclone.dev/development/game-development/basic.md).

# Game loop

## Game loop

**The main game loop handles three major tasks:**

1. Get user input
2. Update the game state
3. Render

```
while(true) {
    processInput()
    update()
    render()
}
```

### Links

* <http://higherorderfun.com/blog/2010/08/17/understanding-the-game-main-loop/>
* <https://dewitters.com/dewitters-gameloop/>
