Game Modes
Every mode is launched by setting a few WorldState keys and then calling
game.start(). The mode string is read in game._on_game_map_loaded() to swap camera,
input, and HUD behaviour.
Quick Start
Hard-coded 3v3 on a one-lane map — "click → playing in 2 seconds." Blue runs
arthur / bokuden / nagato, red runs lorne / robin / rollo. game_mode = "match".
New Game
Custom 3v3. The new-game menu lets you pick your team (blue/red), each leader on each
side, and the map (one-lane or three-lane). Same game_mode = "match" as Quick Start;
the only difference is WorldState gets your selections instead of the defaults.
Campaign
A single hero (joan) on the rect test map, game_mode = "campaign". Campaign mode is
checked in the dialog panel to enable scripted dialog sequences that don't run in a
regular match. This is the home of the story-driven progression pillar.
MOBA (1v1 / 5v5)
A 3-lane match where you control one leader on the blue team. The RTS click-to-command pipeline is replaced by direct character control.
Setup flow
A two-step picker collects N picks for blue, then N picks for red, then starts. The 14th
tile in the leader grid is an explicit Random button — it fills remaining slots with
"random", resolved to a random pick at spawn time. The first blue pick is always your
leader; allies and enemies are AI.
What MOBA mode changes on load
- The camera locks to your hero with a follow-lerp.
- Your leader is auto-selected so the per-unit HUDs (HP bar, abilities, inventory) work.
- RTS Q/W/E/R command buttons are hidden.
- A +30 speed match buff is applied to every leader on both teams so the AI keeps
pace (
MOBA_SPEED_BONUS, mod"moba_pace"). - On mobile: the touch HUD is shown and the camera zoom is locked at
3.0for a fixed character cam.
See Controls & HUD for the full input map and the mobile touch overlay.
Adding a new mode
- Pick a unique
game_modestring. - Create (or reuse) a setup menu that populates
player_team,enemy_team,*_leaders_names,current_map, andgame_mode, then callsgame.start(). - If the mode needs different camera/input/HUD, branch on the mode string in
game._on_game_map_loaded(), keeping the default state restored at the top so other modes don't inherit MOBA's setup. - Add a button to the main menu and a handler that shows your setup menu.
Mode coverage by build: MOBA 1v1/5v5 work on desktop and mobile. Quick Start, New Game, and Campaign are built around the desktop click-to-command pipeline; on mobile they launch but the touch UX isn't tuned yet.