~/rocco $ ls guide/
rocco docs
Guide
- Install and first runCheck that rocco fits your game, install Roc, then build and run a first game from the release bundles.
- Important defaultsThe defaults and rules that most often surprise new rocco authors, in one place, with a link to the page that explains each one.
- The five callsWhy a rocco game is five pure functions, what each one gets and returns, and the order in which the host calls them.
- The SceneWhy your game describes each frame instead of drawing it, the tree of Nodes, how the host pairs Draws and Groups by id to draw smoothly, and the camera, lights and colours.
- Assets and PacksWhy assets load in named Packs, how to load and unload a Pack, what the Manifest holds, and the meshes that need no file.
- InputHeld keys for things that last and pressed keys for things that happen once, the mouse movement, the mouse lock, and how to test input.
- GamepadsButtons named by their place on the pad, sticks and triggers with the dead zone applied, slots for more than one player, and the limits on each OS.
- Collisions and QueriesWhy rocco answers questions about shapes instead of running physics, the Colliders and Queries a Scene holds, the results the next step gets, and the one-step latency.
- The UIWhy the host lays out the UI, how a game writes it as a tree of Boxes and Text, the ui package's defaults and helpers, and the layout rules.
- SoundWhy a sound your game fires and forgets is a Command and a sound it controls is a Speaker in the Scene, how Sounds load, Loop and Once, where the Listener is, what happens when the voices run out, and a run with no audio device.
- LaunchThe choices your game makes once before the window opens, their defaults, the checks at startup, and what a run mode overrides.
- Running and debuggingRun, check and test a game with roc, read the log, use hot reload and know its limits, and set the ROCCO_ variables.
- The BridgeLet a script, a CI test or an agent play a run over a localhost socket. Inject Input for N steps, read the Scene as JSON and save a screenshot.
- Shipping a gamePin the bundle URLs and the Roc nightly, build a binary on each target OS, and ship it with its assets.
Tutorial
- 1. A window, a camera and a cubeStart the tutorial game. Open a window, point a camera and draw a cube with launch, init and view.
- 2. The characterLoad Pip from a .glb file with a Load Command, keep its mesh id from the Manifest in loaded, and draw it on the ground.
- 3. MovingMake Pip walk with W, A, S and D. Read the Input in step, move by speed times dt, and test the movement.
- 4. Lights, a sun and its shadowLight the ground with an ambient light and a sun, and give Pip a shadow.
- 5. PickupsPut five pickups on the ground. Give Pip and each pickup a Collider, ask for Pip's Contacts, and collect each pickup that Pip touches.
- 6. The door and the winAdd a door that opens when every pickup is collected, a win when Pip walks through it, and Quit on Escape.
- 7. A HUDShow the pickup count and a message over the game with a tree of Boxes and Text in Scene.ui, and finish the game.
- 8. SoundPlay a blip when Pip takes a pickup with the Play Command, and add music, a hum and a creak with Speakers, the door's two in its Group.
- 9. A gamepadWalk Pip with the left stick of a gamepad, at a speed that follows how far the stick is pushed, and quit with Start. Learn what a slot is and when to use Button.pressed_any.
- 10. AnimationPlay the Idle and Walk Clips on Pip. Find the Clips in the Manifest, keep each Clip's time in the Model, and fade from one Clip to the other with the Pose of a Draw.