# Games

> The examples under examples/games/.

Source: https://omardev29.github.io/rmp-docs/examples/games/index.html

- [Pong](https://omardev29.github.io/rmp-docs/examples/games/01_pong.html) — `rmp::behavior::Ball` and `Edge::CLAMP`, two players, first to seven.
- [Breakout](https://omardev29.github.io/rmp-docs/examples/games/02_breakout.html) — A wall of bricks, and "a brick breaks" as a one-line `on_collision` — which is exactly why `destroy_on_hit` is not in the catalogue.
- [Space invaders](https://omardev29.github.io/rmp-docs/examples/games/03_space_invaders.html) — Collision layers earning their place, `Timer` + a callback instead of a `shooter` behavior, `hurt_by` deciding what may hurt the ship, and the formation written out — because the formation **is** Space Invaders.
- [Top down](https://omardev29.github.io/rmp-docs/examples/games/04_top_down.html) — `TopDown` with eight normalised directions, `Follow` for the enemies, an HP bar with `rmp::ui::progress` (and one over every enemy with `rmp::ui::at()`, wherever it has walked to), and what you can only say with layers: the player's shot misses the player, enemies pass through each other but not walls, and the doorway out sees the player and nothing else.
- [Endless runner](https://omardev29.github.io/rmp-docs/examples/games/05_endless_runner.html) — `Parallax`, `Runner`, a `Spawner` **by distance** and a camera that follows, with a little smoothing.
- [Tetris](https://omardev29.github.io/rmp-docs/examples/games/06_tetris.html) — The honest one: a Tetris is a 10×20 array and the rules of Tetris, and the framework does not pretend otherwise.
- [Platformer](https://omardev29.github.io/rmp-docs/examples/games/07_platformer.html) — **A level designed in [LDtk](https://ldtk.io).** Three levels side by side in one world — a meadow, a desert, a snowfield — with Kenney's Pixel Platformer art.
- [Dungeon](https://omardev29.github.io/rmp-docs/examples/games/08_dungeon.html) — **A dungeon crawler made of the behavior catalogue.** Two LDtk levels -- the Crypt and the Sanctum -- in Kenney's Tiny Dungeon art, lit by braziers, gems and the hero's own light in the dark.
- [After school](https://omardev29.github.io/rmp-docs/examples/games/09_after_school.html) — **An afternoon in town, told in Yarn.** The lantern festival is at seven, and whom you talk to -- and what you say -- decides how the evening ends: with Mika at the festival, in the front row of Sora's concert, or at home.
