# raylib_multiplatform > The documentation of raylib_multiplatform, a C++20 framework for shipping raylib games to every platform. Each link is one page as Markdown; https://omardev29.github.io/rmp-docs/llms-full.txt is all of them in one text. ## Getting started - [Getting started](https://omardev29.github.io/rmp-docs/ai/getting-started/index.md): Install the rmp command once, make a game with it, run it, and then build that game up one page at a time. - [Install rmp](https://omardev29.github.io/rmp-docs/ai/getting-started/install.md): One line in a terminal puts rmp on your PATH, on Linux, macOS, the BSDs and Windows: what each line runs, where it puts things, how to update it, and how to remove it. - [Your first scene](https://omardev29.github.io/rmp-docs/ai/getting-started/your-first-scene.md): Replace the menu rmp new made with one of your own, a title with Play and Quit, and add the scene that Play goes to. - [A player](https://omardev29.github.io/rmp-docs/ai/getting-started/a-player.md): Put a player in the game scene, an object moved by a behavior from the catalogue, by the mouse or a finger, and by the input actions it reads. - [Coins and bats](https://omardev29.github.io/rmp-docs/ai/getting-started/coins-and-bats.md): Something to collect and something to avoid: objects spawned at random, collision layers, a behavior that chases, lives, and a game over scene pushed on top of the game. - [A pause menu](https://omardev29.github.io/rmp-docs/ai/getting-started/a-pause-menu.md): Pause the game by pushing a scene on top of it, see what the scene stack's defaults freeze, and give phones a button to pause with. - [Art and sound](https://omardev29.github.io/rmp-docs/ai/getting-started/art-and-sound.md): Give the rabbit, the coins and the bats pictures and sounds copied from the framework's examples, loaded by name from resources/, and see what a release does with that folder. - [Saving a record](https://omardev29.github.io/rmp-docs/ai/getting-started/saving-a-record.md): Keep the best score between sessions with rmp::save and rmp::Value, and show it on the menu and on the game over screen. - [Ship it](https://omardev29.github.io/rmp-docs/ai/getting-started/ship-it.md): Give the game its real app ids, run the checks CI runs, put it on GitHub, and tag a release that CI builds for every platform. ## Manual - [Manual](https://omardev29.github.io/rmp-docs/ai/manual/index.md): Every part of the framework, explained by what it is for, with the reasons it works the way it does. - [Basics](https://omardev29.github.io/rmp-docs/ai/manual/basics/index.md): What a game made with the framework is before any of its code runs: the folder, the config file, the command that builds it, and the headers it includes. - [Project layout](https://omardev29.github.io/rmp-docs/ai/manual/basics/project-layout.md): What a game made with rmp new contains, which parts of it are yours and which are the framework's, and what the build generates and never commits. - [Configuration](https://omardev29.github.io/rmp-docs/ai/manual/basics/configuration.md): raylib_multiplatform.toml is the one file that says what the game is called, how it opens and where it ships, and every build system is generated from it. - [The rmp command](https://omardev29.github.io/rmp-docs/ai/manual/basics/the-rmp-command.md): rmp builds, runs, tests and ships a game, and makes new ones: one Python file behind a launcher for every shell. - [Headers](https://omardev29.github.io/rmp-docs/ai/manual/basics/headers.md): One header per module and no umbrella: what each of the framework's headers gives a game, and the RMP_ values every one of them carries from the config. - [Core](https://omardev29.github.io/rmp-docs/ai/manual/core/index.md): What every game is made of: the app that runs it, the scenes it moves between, and the objects in them. - [The app](https://omardev29.github.io/rmp-docs/ai/manual/core/app.md): The entry point that opens the window, runs the frame and closes everything on every platform, how a game asks to quit, and the state that outlives a scene. - [Scenes](https://omardev29.github.io/rmp-docs/ai/manual/core/scenes.md): A scene is one screen of the game — a menu, a level, a pause overlay — and the stack of them is how the game moves from one to the next. - [Objects](https://omardev29.github.io/rmp-docs/ai/manual/core/objects.md): rmp::Object is everything that lives in a scene: how one is spawned, the fields that place and draw it, its hooks, how it is destroyed, and how to keep hold of one across frames. - [Collision](https://omardev29.github.io/rmp-docs/ai/manual/core/collision.md): What an object collides as, how solid objects are pushed apart, who collides with whom through layers and masks, the edges of the world, the map's solid cells, and raycasts. - [Behaviors](https://omardev29.github.io/rmp-docs/ai/manual/core/behaviors.md): A behavior is a plain struct that makes an object move or act a certain way: adding, reading, pausing and removing them, the catalogue in rmp::behavior, configuring them from the editor, and writing your own. - [Camera](https://omardev29.github.io/rmp-docs/ai/manual/core/camera.md): rmp::Camera decides which part of a scene's world is on screen: following an object, smoothing that is the same at any frame rate, limits, zoom, shake, and converting between world and screen. - [Modules](https://omardev29.github.io/rmp-docs/ai/manual/modules/index.md): The parts of the framework a game takes when it needs them — input, the interface, assets, sprites, levels, sound, saving, random numbers and ads — each one header of its own. - [Input](https://omardev29.github.io/rmp-docs/ai/manual/modules/input.md): Named actions with as many bindings as you like, movement in eight directions in one call, the mouse and a finger as one pointer, and the rule that decides who hears a press. - [Interface](https://omardev29.github.io/rmp-docs/ai/manual/modules/ui.md): rmp::ui draws menus, HUDs and settings screens in immediate mode — a main menu is three calls — and plays the same with a mouse, a finger, a keyboard or a gamepad. - [Interface layout](https://omardev29.github.io/rmp-docs/ai/manual/modules/ui-layout.md): Rows, columns, panels, stacks, grids and scrolling lists, and the three ways anything in rmp::ui is sized — fit, grow and fixed — in design units that follow the screen. - [Interface controls](https://omardev29.github.io/rmp-docs/ai/manual/modules/ui-controls.md): Checkboxes, sliders, dropdowns and text fields that take your variable by reference; the widgets you keep, Godot style, with their own style and callbacks; and the events every control sends. - [Interface style](https://omardev29.github.io/rmp-docs/ai/manual/modules/ui-style.md): Themes as plain data, variants that say what a button means, sizes as steps of a type scale, colour transitions, breakpoints for the shape of a layout, styles per widget, pictures, nine-slices and skins, shadows and outlines, motion, sounds, and the fonts the interface draws with. - [Assets](https://omardev29.github.io/rmp-docs/ai/manual/modules/assets.md): Put your files in resources/ and load them by name; the handles count themselves, free themselves, and read the same from loose files or from an encrypted pack. - [Sprites](https://omardev29.github.io/rmp-docs/ai/manual/modules/sprites.md): What an object looks like: a texture, or an Aseprite file whose tags are the animations you play by name. - [Tilemaps](https://omardev29.github.io/rmp-docs/ai/manual/modules/tilemaps.md): Levels designed in LDtk (or Tiled): the scene draws the map, stops solid objects at its walls, and turns what you placed in the editor into objects. - [Audio](https://omardev29.github.io/rmp-docs/ai/manual/modules/audio.md): Sound effects and music by name, three volume buses a settings screen can move, and a sound device that opens itself — or is quietly absent. - [Saving](https://omardev29.github.io/rmp-docs/ai/manual/modules/saving.md): rmp::Value is a tree you fill and read with defaults; rmp::save writes it to a file that survives crashes, tells edited from damaged, and lands in the right folder on every platform. - [Localization](https://omardev29.github.io/rmp-docs/ai/manual/modules/localization.md): The game in more than one language: every text the framework draws is an rmp::Text, a literal translates itself from the game's tables, values go in placeholders, plurals follow each language's rules, and rmp text keeps the tables in step with the code. - [Dialogue](https://omardev29.github.io/rmp-docs/ai/manual/modules/dialogue.md): Conversations written in Yarn Spinner 3 and run by rmp::Dialogue — lines, choices, variables, commands and functions from the game — shown by three presenters of the interface or by your own code, started by a Talker, translated like every other text, and compiled when the game loads or when it is built. - [Random](https://omardev29.github.io/rmp-docs/ai/manual/modules/random.md): Random numbers you can reproduce: one seeded generator for the whole game, with the handful of shapes a game actually asks for. - [Ads](https://omardev29.github.io/rmp-docs/ai/manual/modules/ads.md): Interstitial and rewarded AdMob ads on Android, and the same calls compiling to nothing everywhere else, so ad code needs no #ifdef. - [Working with raylib and Clay](https://omardev29.github.io/rmp-docs/ai/manual/raylib/index.md): The framework is built on raylib and hides none of it: what it does in your place, and how to reach raylib, Clay, rlgl and plain C yourself. - [raylib in your game](https://omardev29.github.io/rmp-docs/ai/manual/raylib/raylib.md): What the framework calls on raylib in your place — the window, the frame, the clock — and everything else, which is yours to call from your scenes. - [Dropping to Clay](https://omardev29.github.io/rmp-docs/ai/manual/raylib/clay.md): Writing Clay's own elements in the same frame as rmp::ui, for what the small API does not have — and the rules about ids, strings and images that make it work. - [rlgl and OpenGL](https://omardev29.github.io/rmp-docs/ai/manual/raylib/rlgl.md): raylib's GL layer from a game: where in the frame it is safe, which OpenGL each target really runs, and what raw OpenGL costs. - [Plain C](https://omardev29.github.io/rmp-docs/ai/manual/raylib/plain-c.md): The opt-out: a game in plain C with its own main() and nothing of rmp::, which keeps the build, the generated identifiers and the pipeline — and what it gives up, target by target. - [Platforms](https://omardev29.github.io/rmp-docs/ai/manual/platforms/index.md): Every target the framework builds, how a game chooses its own in [targets], and what CI does with each one — on every push, and on a release. - [Desktop](https://omardev29.github.io/rmp-docs/ai/manual/platforms/desktop.md): Windows, macOS, Linux — glibc with its version floor, musl, DRM/KMS with no desktop at all, RISC-V — and the BSDs: how each is built, what ships, and what to know. - [Linux from a console](https://omardev29.github.io/rmp-docs/ai/manual/platforms/linux-console.md): On a Linux console with no desktop, rmp builds the game for DRM/KMS by itself: what decides it, the folders it builds in, what to install, the screen and the keyboard from /dev, sudo and the groups, and the terminal it gives back. - [Web](https://omardev29.github.io/rmp-docs/ai/manual/platforms/web.md): The web target: Emscripten, a browser that owns the frame loop and why that rules out ASYNCIFY, memory, saves in IndexedDB, sound that waits for the player, and how to serve a build. - [Android](https://omardev29.github.io/rmp-docs/ai/manual/platforms/android.md): The Android target: raymob around raylib, a Gradle build generated from the .toml, the application id, permissions and orientation, the OpenGL ES version a game compiles for, ads that are off until asked for, and signing for the Play Store. - [iOS](https://omardev29.github.io/rmp-docs/ai/manual/platforms/ios.md): The iOS target: an Xcode project generated by XcodeGen from the .toml, raylib from a pinned fork, an entry point UIKit calls, an app that must not quit, and signing that stays out of CI. - [Help](https://omardev29.github.io/rmp-docs/ai/manual/help/index.md): When something goes wrong, and the questions that come up before it does. - [Troubleshooting](https://omardev29.github.io/rmp-docs/ai/manual/help/troubleshooting.md): Real problems and the messages they print — a missing Python, a refused .toml, a build directory left over from the other build type, assets that fail to load, a window with nothing in it — and what to do about each. - [Questions](https://omardev29.github.io/rmp-docs/ai/manual/help/faq.md): What people ask about the framework before they ask anything else: raylib, scenes, main(), targets, saves, players' machines, libraries and licences. ## Examples - [Examples](https://omardev29.github.io/rmp-docs/ai/examples/index.md): The framework's examples: small, complete projects, each showing one part of it, and whole games playable from start to finish. - [Plain C](https://omardev29.github.io/rmp-docs/ai/examples/plain_c.md): The opt-out. A C entry point with your own main(): raylib, plus two headers of ours that are C -- for the [window] values and for the CI hooks -- and none of rmp::. - [Ads](https://omardev29.github.io/rmp-docs/ai/examples/ads/index.md): The examples under examples/ads/. - [Interstitial](https://omardev29.github.io/rmp-docs/ai/examples/ads/01_interstitial.md): Full-screen ads between levels: request, check, show, request the next one. - [Rewarded](https://omardev29.github.io/rmp-docs/ai/examples/ads/02_rewarded.md): Watch an ad, get a reward — and only if the player actually finished it. - [Assets](https://omardev29.github.io/rmp-docs/ai/examples/assets/index.md): The examples under examples/assets/. - [Loading](https://omardev29.github.io/rmp-docs/ai/examples/assets/01_loading.md): Loading by name — the same code whether it comes from loose files or a packed, AES-encrypted resources.rres. - [Games](https://omardev29.github.io/rmp-docs/ai/examples/games/index.md): The examples under examples/games/. - [Pong](https://omardev29.github.io/rmp-docs/ai/examples/games/01_pong.md): rmp::behavior::Ball and Edge::CLAMP, two players, first to seven. - [Breakout](https://omardev29.github.io/rmp-docs/ai/examples/games/02_breakout.md): 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/ai/examples/games/03_space_invaders.md): 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/ai/examples/games/04_top_down.md): 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/ai/examples/games/05_endless_runner.md): Parallax, Runner, a Spawner by distance and a camera that follows, with a little smoothing. - [Tetris](https://omardev29.github.io/rmp-docs/ai/examples/games/06_tetris.md): 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/ai/examples/games/07_platformer.md): A level designed in LDtk. 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/ai/examples/games/08_dungeon.md): 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/ai/examples/games/09_after_school.md): 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. - [Input](https://omardev29.github.io/rmp-docs/ai/examples/input/index.md): The examples under examples/input/. - [Actions](https://omardev29.github.io/rmp-docs/ai/examples/input/01_actions.md): Named actions with as many bindings as you like, eight-direction movement in one call, and the routing that stops a finger on a UI button from also firing the gun — which costs no code at all. - [Platform](https://omardev29.github.io/rmp-docs/ai/examples/platform/index.md): The examples under examples/platform/. - [Mobile raymob](https://omardev29.github.io/rmp-docs/ai/examples/platform/02_mobile_raymob.md): The raymob mobile API: vibration, soft keyboard, sensors, orientation, app storage. - [Minimal includes](https://omardev29.github.io/rmp-docs/ai/examples/platform/03_minimal_includes.md): The proof that rmp/ui.h stands alone. One translation unit that includes and nothing else of ours, and no main() on purpose: it is compiled, never linked, and if it stops compiling the header has grown a dependency. - [Scenes](https://omardev29.github.io/rmp-docs/ai/examples/scenes/index.md): The examples under examples/scenes/. - [Stack](https://omardev29.github.io/rmp-docs/ai/examples/scenes/01_stack.md): The whole model, one scene per file under src/scenes/: a menu that changes to a game, and a game that pushes a pause menu onto itself. - [Stretch](https://omardev29.github.io/rmp-docs/ai/examples/scenes/02_stretch.md): [window] stretch, in a window that is not the design's size: a court that is letterboxed, expanded or shown 1:1, a key and a button to go round the three, and a HUD that stays on the court. - [UI](https://omardev29.github.io/rmp-docs/ai/examples/ui/index.md): The examples under examples/ui/. - [Menu](https://omardev29.github.io/rmp-docs/ai/examples/ui/01_menu.md): A main menu in three lines, then an options screen, a confirm dialog and a HUD — one scene per screen under src/scenes/, and change<>() between them. - [Layout](https://omardev29.github.io/rmp-docs/ai/examples/ui/02_layout.md): row, column, panel, center, stack/layer, spacer, plus image and progress. - [Clay direct](https://omardev29.github.io/rmp-docs/ai/examples/ui/03_clay_direct.md): The escape hatch. Clay's own macros in the same frame as rmp::ui, for anything the small API does not expose yet. - [Settings](https://omardev29.github.io/rmp-docs/ai/examples/ui/04_settings.md): Checkbox, slider, dropdown, text input — and the focus/keyboard/gamepad navigation you get without writing any. - [Inventory](https://omardev29.github.io/rmp-docs/ai/examples/ui/05_inventory.md): grid with a column count worked out from the space available, scroll with clipping, tooltip() for what each item is -- under a resting pointer or the keyboard's focus -- and wants_pointer() keeping the game's hands off the UI's clicks. - [Style](https://omardev29.github.io/rmp-docs/ai/examples/ui/06_style.md): The two themes, the five variants, the three sizes and the transition. - [Responsive](https://omardev29.github.io/rmp-docs/ai/examples/ui/07_responsive.md): scale() versus current_breakpoint(), and which to reach for. - [Overlay](https://omardev29.github.io/rmp-docs/ai/examples/ui/08_overlay.md): overlay(): a pause menu pushed as a scene of its own, blurred, that freezes the game below; and "Really quit?" drawn by the game scene itself -- an overlay with a panel() in it, which is all a dialog is. - [Skinned](https://omardev29.github.io/rmp-docs/ai/examples/ui/09_skinned.md): The other way to write rmp::ui: a game's shop screen designed rather than written. - [Dialogue](https://omardev29.github.io/rmp-docs/ai/examples/ui/10_dialogue.md): One Yarn conversation, three ways, switched while it runs: a DialogueBox (a portrait, a name plate on the frame, a voice per Speaker), a DialogueBubble over whoever speaks with its tail pointing at them, and a DialogueStage whose cast slides in and comes forward, shaken by a <>. - [Localization](https://omardev29.github.io/rmp-docs/ai/examples/ui/11_localization.md): A lantern stall in English, Spanish, Japanese and German, switched while it runs: every literal its own key in resources/lang.tsv, German in a file of its own (lang/de.tsv), {placeholders}, plurals in each language's forms, a context, and a font per language -- Japanese in Jigmo (CC0), cut down to the letters the table uses -- with each language's name in the menu in a font that has its letters (Style::font). - [Font](https://omardev29.github.io/rmp-docs/ai/examples/ui/12_font.md): A menu in a font of your own: a title, its options and its credits, one scene each, every word in Hack Bold through one rmp::ui::set_font(). ## Publishing - [Publishing](https://omardev29.github.io/rmp-docs/ai/publishing/index.md): A release is a git tag: rmp deploy checks it and pushes it, and CI builds every target the game has turned on and attaches them to a GitHub release. - [Releases and versions](https://omardev29.github.io/rmp-docs/ai/publishing/releases.md): A release is a vMAJOR.MINOR.PATCH tag that rmp deploy checks and pushes; the version name and the Android version code come from it, and CI turns it into a GitHub release. - [Desktop and BSD archives](https://omardev29.github.io/rmp-docs/ai/publishing/desktop.md): What is in the zip CI makes for each Windows, macOS, Linux and BSD target, what each asks of a player's machine — no DLL, macOS 10.15, the Linux glibc floor — what it is hardened with, and what compressing with UPX costs. - [The web build](https://omardev29.github.io/rmp-docs/ai/publishing/web.md): The browser build is four static files compiled with Emscripten; this is what each one is, how to host them, and what decides their memory and their size. - [itch.io](https://omardev29.github.io/rmp-docs/ai/publishing/itch.md): On every release tag CI pushes each build itch.io can use to your game's page with butler; it needs a user, a game and one secret. - [Google Play](https://omardev29.github.io/rmp-docs/ai/publishing/google-play.md): Google Play takes a signed App Bundle: CI builds and verifies one on every run, signs it with your upload key from four repository secrets, and can run the game in Firebase Test Lab. - [The App Store](https://omardev29.github.io/rmp-docs/ai/publishing/app-store.md): What CI builds for iOS — the engine and a simulator build of the app — and why archiving, signing and TestFlight are left to Xcode on a Mac. - [Continuous integration](https://omardev29.github.io/rmp-docs/ai/publishing/ci.md): What CI builds, boots and checks for each target on a push and on a tag, the size it holds every release binary to, what it pins so the build cannot change under you, and how to read a run that went red. ## Framework - [The framework](https://omardev29.github.io/rmp-docs/ai/framework/index.md): How raylib_multiplatform is put together — its layers, one frame in order, the config pipeline, how it is tested, its licences — why it is built the way it is, how to work on it, and how to keep it alive for years. - [Architecture](https://omardev29.github.io/rmp-docs/ai/framework/architecture.md): The five layers of a game made with raylib_multiplatform — your code, the modules, the core, raylib, and the targets — and what each one is responsible for. - [One frame](https://omardev29.github.io/rmp-docs/ai/framework/the-frame.md): Everything the framework does between one picture and the next, in the order src/rmp/app/app.cpp and src/rmp/scene/scene.cpp do it, and why the order is what it is. - [The config pipeline](https://omardev29.github.io/rmp-docs/ai/framework/config-pipeline.md): How raylib_multiplatform.toml becomes what CMake, Gradle, Xcode and the CI read, why a mistake in it stops in configure.py with the line, and what each generated file is for. - [Performance](https://omardev29.github.io/rmp-docs/ai/framework/performance.md): What the framework costs over raylib and what it saves: the abstractions that compile to nothing, the few that cost a call, how the map, the collisions, the UI and the build keep a frame and a binary small, and how it compares with raylib and with OpenGL by hand. - [Testing](https://omardev29.github.io/rmp-docs/ai/framework/testing.md): How the framework is tested — unit tests with no window, under the sanitizers, the UI laid out headless, a frame rendered in software and compared, every target booted, every example booted, every game, menu, scene and input example played from a script and its frames compared, what the tests reach measured — and what rmp test runs in a game. - [Security](https://omardev29.github.io/rmp-docs/ai/framework/security.md): Every safety measure the framework takes — the release hardened flag by flag, every debug build under the sanitizers, two static analysers, what its tests reach, the shipped binary read back, the supply chain pinned, secrets kept out of the repository — what each one protects against, what it costs, and what is not done. - [Licences](https://omardev29.github.io/rmp-docs/ai/framework/licences.md): The framework is MIT and built on a modified raylib; every library it carries is on record with its licence, checked on every build, and credited in a LICENSES.txt that ships with the game. What that means for a game made with it. - [Why it is built this way](https://omardev29.github.io/rmp-docs/ai/framework/why/index.md): The decisions that give the framework its shape, each with the reason behind it and the check that keeps it true. - [The three-function menu](https://omardev29.github.io/rmp-docs/ai/framework/why/the-three-function-menu.md): The rule that outranks every other in the framework — the API is as simple as possible for the person making the game — and the three questions a feature has to answer to get in. - [The access rule](https://omardev29.github.io/rmp-docs/ai/framework/why/the-access-rule.md): Why a method the framework calls on your type starts with an underscore, why a function you hand to the framework starts with on_, and why the two can live on the same object. - [One header per module](https://omardev29.github.io/rmp-docs/ai/framework/why/one-header-per-module.md): Why there is no rmp.h that includes everything, why the framework's headers avoid including each other, and how the cost of every include is measured instead of argued about. - [Designated initialisers](https://omardev29.github.io/rmp-docs/ai/framework/why/designated-initialisers.md): Why options are written as { .field = value }, why the fields of every options struct are declared in the order you would write them, and why a behavior has no base class. - [Ownership](https://omardev29.github.io/rmp-docs/ai/framework/why/ownership.md): Why everything in the framework is owned by something that releases it — textures, objects, scenes, callbacks, behaviors — why its API has no raw pointer, what you keep across frames, and why Callback exists instead of std::function. - [No exceptions](https://omardev29.github.io/rmp-docs/ai/framework/why/no-exceptions.md): Why nothing in the framework throws to report a failure, what it does instead — empty resources, defaults, results, warnings said once — and what that leaves to your game. - [Macros](https://omardev29.github.io/rmp-docs/ai/framework/why/macros.md): Macros are not the enemy — where the framework uses one because nothing else can do the job, the one rule it keeps about them, and how their names stay out of everyone else's way. - [Time is a parameter](https://omardev29.github.io/rmp-docs/ai/framework/why/delta-and-time.md): Why every hook is handed delta instead of reading the clock, where the framework reads it, what [app] max_delta protects a game from, and why the same game plays the same at 60 and 240 frames a second. - [Naming (moved)](https://omardev29.github.io/rmp-docs/ai/framework/why/naming.md): The naming rules moved to Guidelines › Naming, with the rest of the C++ style guide. - [Contributing](https://omardev29.github.io/rmp-docs/ai/framework/contributing/index.md): How to work on the framework itself: setting up a machine, the repository, the rules, writing tests, the verification ladder, CI, pull requests and keeping the docs true. - [Setting up](https://omardev29.github.io/rmp-docs/ai/framework/contributing/setup.md): What a machine needs to work on the framework: rmp, a clone, the pinned clang-format and clang-tidy, Python with Hypothesis, and the pinned build image CI runs in, with podman or Docker. - [The repository](https://omardev29.github.io/rmp-docs/ai/framework/contributing/repository.md): What lives where in the framework's repository, the repositories beside it, what rmp new copies into a game and why that list is explicit, and what a new file needs before the checks accept it. - [The rules](https://omardev29.github.io/rmp-docs/ai/framework/contributing/rules.md): The framework's rules for its own code, written for a person: where a change goes, names, headers, ownership, how the framework tells a game it made a mistake, the .toml, dependencies, sanitizers, the size budget, the image, and testing to the point of paranoia. - [Writing a unit test](https://omardev29.github.io/rmp-docs/ai/framework/contributing/tests.md): Where a new test of the framework goes, the shape of a test file, the seams through which a test sets the clock, the input and the interface, the interface laid out with no window, a test seen red before it is trusted, and the tests a game keeps in tests/game/. - [Examples and e2e scripts](https://omardev29.github.io/rmp-docs/ai/framework/contributing/examples-and-e2e.md): An example is a test: built, booted under the software renderer, photographed, and held to no mistake the framework reports; and the games, menus, scenes and input are played from a script, frame by frame, their pictures compared exactly with goldens recorded only in the build image. - [Properties, fuzzing and mutation](https://omardev29.github.io/rmp-docs/ai/framework/contributing/properties-fuzzing-mutation.md): The deep tests, for whoever adds to them: a RapidCheck property with the shared generators and a // covers: line, Hypothesis for the Python, a fuzz target with its corpus and regressions, a counterexample made a named case, mutation floors that only rise, and the nightly and weekly runs that open a nightly-finding issue. - [Coverage and the gates](https://omardev29.github.io/rmp-docs/ai/framework/contributing/coverage-and-gates.md): What the tests reach, measured in the build image and held per file to a floor that only rises; every tools/*_check.sh and what it refuses; how each gate is seen red on a planted mistake, how to add one, and the files of the repository that only ever move one way. - [The verification ladder](https://omardev29.github.io/rmp-docs/ai/framework/contributing/ladder.md): What to run before a change leaves your machine, in order: rmp fmt, rmp lint, every stage of rmp test, the slower stages and when each is worth its time, the same run inside the build image, and the seen-red-first protocol. - [CI](https://omardev29.github.io/rmp-docs/ai/framework/contributing/ci.md): What the framework's CI runs for a push and a pull request, the debug lane and the full matrix, how to read a red run job by job, the size budget's warnings, and how to wait for a run without polling it. - [Pull requests](https://omardev29.github.io/rmp-docs/ai/framework/contributing/pull-requests.md): How a change reaches the framework's main: a branch, the ladder, the pull request template, the checks main requires, Omar's approval for a change to the public API or the .toml, nightly-finding issues first, and plain commits. - [Keeping the docs true](https://omardev29.github.io/rmp-docs/ai/framework/contributing/docs.md): This site documents one commit of the framework, FRAMEWORK_REF, and is checked against it: how to tell when a framework change made a page untrue, fix the page, move the commit, and run the same checks the site's CI runs. - [Maintaining](https://omardev29.github.io/rmp-docs/ai/framework/maintaining/index.md): How to keep the framework alive for years with one person: every moving part and where it is pinned, the build image, Python, upgrading each dependency, the yearly round the stores impose, and what to keep so it still builds in decades. - [How it all fits](https://omardev29.github.io/rmp-docs/ai/framework/maintaining/how-it-fits.md): The framework as a system — its repositories, the rmp command, the generator, CMake, Gradle and Xcode, the toolchain of every family of targets, the workflows and the build image — and what each part reads from the others. - [Every dependency](https://omardev29.github.io/rmp-docs/ai/framework/maintaining/dependencies.md): Every library, toolchain, SDK, runner, Python and Node package and outside service the framework depends on — how each one is pinned, what checks the pin, and a map, read from the tree, of every file that names it. - [The build image](https://omardev29.github.io/rmp-docs/ai/framework/maintaining/build-image.md): What the build image and the Alpine run image hold, how they are built, verified and published, every step of a bump in order — the Android one included, where the image and the framework point at each other — and what moves in the framework afterwards. - [Python](https://omardev29.github.io/rmp-docs/ai/framework/maintaining/python.md): Where the framework runs Python, why 3.11 is the floor, which parts are standard library only and which are not, how the build image's hash-locked test tools are regenerated, and what a new Python can break. - [Upgrading a dependency](https://omardev29.github.io/rmp-docs/ai/framework/maintaining/upgrading.md): A playbook for each dependency of the framework — where its version is held, what has to move with it, the patches to carry over, the checks that will go red and what is re-recorded afterwards. - [The dialogue and the text](https://omardev29.github.io/rmp-docs/ai/framework/maintaining/dialogue-and-text.md): How the Yarn Spinner port, its conformance suite, the translation tables and the tools that keep them are maintained: what came from where, what holds them to the original, how a new Yarn release is taken in, and how a language is added. - [The yearly round](https://omardev29.github.io/rmp-docs/ai/framework/maintaining/yearly.md): What forces a change to the framework even when nobody touches its code — the stores' yearly requirements, the runner images and Xcode versions GitHub retires, the BSD releases, the scheduled workflows that stop by themselves — and a checklist to go through once a year. - [Ten years and more](https://omardev29.github.io/rmp-docs/ai/framework/maintaining/long-term.md): What in the framework lasts and what rots, what a desktop Linux build needs decades from now, what to archive so it still builds with no network and no GitHub, and how to keep the whole thing going with one person and little time. ## Guidelines - [Guidelines](https://omardev29.github.io/rmp-docs/ai/guidelines/index.md): How C++ is written in the framework and its examples: which rules decide, in what order, every rule with the tool that holds it and where, and what a game gets of them. - [Naming](https://omardev29.github.io/rmp-docs/ai/guidelines/naming.md): One spelling for each kind of name in the framework, the reasons each spelling was chosen, each mistake as the tool that refuses it says it, and where each tool looks. - [Formatting](https://omardev29.github.io/rmp-docs/ai/guidelines/formatting.md): How the framework's code is laid out, what clang-format does to code that is laid out any other way, the reasons behind the settings that are not LLVM's, and who runs it. - [const](https://omardev29.github.io/rmp-docs/ai/guidelines/const.md): const on everything that does not change, constexpr for what is known when the code compiles, inline constexpr for a constant in a header, consteval and constinit where they fit — each with its reason, and the check that refuses the mistake. - [Pointers and RAII](https://omardev29.github.io/rmp-docs/ai/guidelines/pointers-and-raii.md): No raw pointer anywhere — what to write instead, the few places one is allowed and why — and nothing owned by hand: every resource freed by the thing that holds it. Each mistake shown with what refuses it. - [Strings](https://omardev29.github.io/rmp-docs/ai/guidelines/strings.md): Text goes in as a std::string_view and comes out as a std::string, never as a C string; how it reaches raylib's C without reading past its end; and what builds text in a game the oldest compiler can still build. - [Modern C++](https://omardev29.github.io/rmp-docs/ai/guidelines/modern-cpp.md): The C++ the framework and its examples write where C would also compile — std::array, static_cast, enum class, nullptr, no varargs, fixed-width integers, ++i — and the C++20 the oldest compiler a game is built with can take. - [Macros](https://omardev29.github.io/rmp-docs/ai/guidelines/macros.md): A macro only for what a function, a constant or a template cannot do — the call site, code generated at file scope, conditional compilation, a value from the .toml — always named RMP_, and the checks that hold both halves. - [Google's guide, and where this one differs](https://omardev29.github.io/rmp-docs/ai/guidelines/google.md): Every place the framework's rules and Google's C++ Style Guide part ways or pull against each other, with the reason the framework's rule is what it is and what holds the code to it — and where the two agree. - [What checks what](https://omardev29.github.io/rmp-docs/ai/guidelines/enforcement.md): Every rule of the Guidelines and the tool that holds it — a check of clang-tidy, a gate of rmp test, clang-format or the compiler — with where it holds: the framework, its examples, a game; and every check the framework switches off, with the reason. ## Reference - [Reference](https://omardev29.github.io/rmp-docs/ai/reference/index.md): Every public name in the framework, read from its headers, and every .toml key and rmp command, read from the tools that handle them, at the commit this site documents. - [Commands](https://omardev29.github.io/rmp-docs/ai/reference/commands.md): Every rmp command, read from the framework's own tool. - [Configuration](https://omardev29.github.io/rmp-docs/ai/reference/configuration.md): Every key of the .toml, read from the framework's own tool. - [Macros](https://omardev29.github.io/rmp-docs/ai/reference/macros.md): The macros a game writes: the entry point, and the values the .toml sets. - [Namespaces](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/index.md): Every namespace of the framework, and what is in it. - [rmp](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/rmp.md): rmp/app.h — the entry point, closing the app, and how the world fits the window. - [rmp::ads](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/rmp-ads.md): rmp::ads — interstitial and rewarded ads. - [rmp::app](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/rmp-app.md): rmp/app.h — the entry point, closing the app, and how the world fits the window. - [rmp::assets](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/rmp-assets.md): rmp::assets:: — loading from resources/ - [rmp::audio](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/rmp-audio.md): rmp/audio.h — sound effects and music, by name. - [rmp::behavior](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/rmp-behavior.md): rmp/behavior.h — the catalogue. - [rmp::input](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/rmp-input.md): rmp::input — named actions, and who gets to hear them. - [rmp::lang](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/rmp-lang.md): rmp::Text and rmp::lang -- the game in more than one language. - [rmp::random](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/rmp-random.md): rmp::random — numbers you can reproduce. - [rmp::save](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/rmp-save.md): rmp/save.h — rmp::Value, and saving the game. - [rmp::ui](https://omardev29.github.io/rmp-docs/ai/reference/namespaces/rmp-ui.md): rmp::ui — the interface layer. - [Classes](https://omardev29.github.io/rmp-docs/ai/reference/classes/index.md): The framework's classes and structs that have pages of their own. - [Resource handles](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-detail-Resource.md): The RAII half, written once for every handle type. - [rmp::Callback](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Callback.md): A function the framework keeps and calls later with arguments of types A...: what on_click(), on_drag(), on_collision() and Tilemap::on_object() store, and the type of the `on_` fields of the behaviors. - [rmp::Camera](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Camera.md): The camera - [rmp::Condition](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Condition.md): A question the framework asks later with arguments of types A...: a StateMachine's transition, an Animator's rule, whether a Draggable may be dropped. - [rmp::Dialogue](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Dialogue.md): A conversation: a compiled Yarn script, where it is in it, and what it remembers. - [rmp::DialogueValue](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-DialogueValue.md): A value of the Yarn language: a number, a string or a bool. - [rmp::Handle](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Handle.md): A reference to an object that is safe to keep across frames. - [rmp::MapObject](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-MapObject.md): One object placed in the map, as spawn_objects() hands it to the factory registered for its `type`: where it is, how big, and its properties. - [rmp::Object](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Object.md): An entity in a scene: the player, an enemy, a bullet, a coin, a platform. - [rmp::Ref](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Ref.md): An optional reference: something that may not be there, and is not yours. - [rmp::Scene](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Scene.md): A screen of the game -- a main menu, a level, a pause overlay -- with its own objects, `map` and `camera`. - [rmp::SheetData](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-SheetData.md): Everything read out of an .aseprite: the packed texture, the frames and the tags. - [rmp::Sprite](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Sprite.md): What an Object draws in place of its shape when it has one: a texture or a sheet, placed by `origin` around the object's position and turned, scaled and flipped with the object. - [rmp::Text](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Text.md): A text the framework draws: translated when it was a literal, as it is when it was made at runtime. - [rmp::TextArg](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-TextArg.md): One placeholder's value: a name and a number or a text. - [rmp::Tilemap](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Tilemap.md): A level read from an LDtk or a Tiled file: its tile layers, which cells are solid, and the objects placed in it. - [rmp::Value](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-Value.md): A tree: nothing, a bool, a number, a string, a list or an object -- exactly what JSON holds, so a real structure fits and not only flat pairs. - [rmp::ui::Button](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-Button.md): A button: text, an icon, or both. - [rmp::ui::Checkbox](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-Checkbox.md): A checkbox that holds its own value. - [rmp::ui::DialogueBox](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-DialogueBox.md): The classic box: along the bottom of the screen, the speaker's portrait and name beside the line, the choices as buttons under it. - [rmp::ui::DialogueStage](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-DialogueStage.md): A visual novel's stage: big portraits of who is on it, the speaker in front and the rest dimmed, and the line in a box under them. - [rmp::ui::Dropdown](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-Dropdown.md): A dropdown that holds its items and its choice. - [rmp::ui::Image](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-Image.md): A picture with a style -- a frame, a shadow -- that can be clicked. - [rmp::ui::Label](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-Label.md): Text, as text() draws it, with a style of its own: a title in another font, with an outline. - [rmp::ui::Panel](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-Panel.md): A container: a panel with a look of its own (`style`), and a look for everything inside it (`children`), which every descendant inherits -- the nearest container's wins. - [rmp::ui::Picture](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-Picture.md): Anything rmp::ui can show. - [rmp::ui::ProgressBar](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-ProgressBar.md): A progress bar with a look of its own: the style is the track's (its background, its skin), `fill` and `fill_picture` the bar's. - [rmp::ui::Slider](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-Slider.md): A slider that holds its own value. - [rmp::ui::SoundName](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-SoundName.md): The name of a sound, as rmp::audio::play() takes it ("click" is click.wav, click.ogg...): written as a string, `.click = "click"`. - [rmp::ui::TextInput](https://omardev29.github.io/rmp-docs/ai/reference/classes/rmp-ui-TextInput.md): A text field that holds its own text. - [Behaviors](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/index.md): The catalogue of behaviors in rmp::behavior: what each one does to the object that has it. - [rmp::behavior::Animator](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Animator.md): Plays the tag that fits what the object is doing: `die` once its Health is dead, `hurt` while it is invulnerable after a hit, `jump` and `fall` in the air (with gravity), `run` while it moves and `idle` while it does not -- and mirrors it with flip_x by the way it moves. - [rmp::behavior::Area](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Area.md): A region that says who comes and goes: a trigger, a door's sensor, a pit, a shop's counter. - [rmp::behavior::Ball](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Ball.md): Bounces, keeps its pace, and leaves a paddle at an angle that depends on where it hit. - [rmp::behavior::Chase](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Chase.md): Sees a target and goes after it. - [rmp::behavior::Collectible](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Collectible.md): A coin, a key, a heart. - [rmp::behavior::Draggable](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Draggable.md): Picked up with the pointer and put down somewhere. - [rmp::behavior::Follow](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Follow.md): Chases a handle, with a speed and a distance it stops at. - [rmp::behavior::GridSnap](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/GridSnap.md): Squares the position with a grid, AFTER everything that moves it. - [rmp::behavior::Health](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Health.md): Hit points, a window of invulnerability with a blink, and death. - [rmp::behavior::Hitbox](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Hitbox.md): What hurts: a sword's swing, a spike, a bullet, an explosion. - [rmp::behavior::Lifespan](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Lifespan.md): Discarded after N seconds. - [rmp::behavior::Orbit](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Orbit.md): Circles a handle or a point: a shield of blades, a moon, a fairy. - [rmp::behavior::Parallax](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Parallax.md): A background layer that scrolls at its own factor and repeats itself with no seam. - [rmp::behavior::Pathfind](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Pathfind.md): Walks to a target, or to a point, around the map's walls: rmp::find_path(), asked again every `repath_every` seconds, and followed at `speed`. - [rmp::behavior::Patrol](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Patrol.md): Goes from waypoint to waypoint -- round in a loop, or back and forth with `ping_pong` -- waiting `wait` seconds at each. - [rmp::behavior::Platformer](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Platformer.md): Gravity, jumping, ground, coyote time and a buffered jump. - [rmp::behavior::Projectile](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Projectile.md): Travels the way you pushed it and is discarded when it leaves or hits. - [rmp::behavior::Runner](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Runner.md): Constant forward motion that SPEEDS UP over time, with a jump and a duck. - [rmp::behavior::Shooter](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Shooter.md): Fires. - [rmp::behavior::Spawner](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Spawner.md): Produces objects every N seconds, or every N units TRAVELLED. - [rmp::behavior::StateMachine](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/StateMachine.md): Named states and the moves between them: an enemy that idles, patrols, chases and flees; a boss's phases. - [rmp::behavior::Talker](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Talker.md): Someone to talk to. - [rmp::behavior::Timer](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Timer.md): Calls you every N seconds. - [rmp::behavior::TopDown](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/TopDown.md): Eight directions, and the sprite chosen from the one you are facing. - [rmp::behavior::Tween](https://omardev29.github.io/rmp-docs/ai/reference/behaviors/Tween.md): Moves one property of its object from `from` to `to` over `seconds`, along an Ease. ## Pages - [raylib_multiplatform](https://omardev29.github.io/rmp-docs/ai/index.md): A C++20 framework for shipping raylib games to every platform from one codebase, with CI that builds them, boots the ones its runners can run and checks they draw.