Build Your First Game
On Linux today, create your starter project with the CLI, make one small change, then build and play it. If you run mm studio, that opens the MM Studio Dashboard (Web) for an existing project, not a separate Linux desktop app.
mm init, then use mm studio only as an optional browser dashboard after the project already exists.
Heads up: Rust is the only supported plugin language in the CLI today. C#, Python, Go, and JavaScript are roadmap previews only on this page. They are not buildable in the public CLI yet, so use the Rust tab for a real first-game flow today.
Create your project
On Linux today, the supported project-creation flow is the CLI. Create the project first, then optionally open the MM Studio Dashboard (Web) for inspection and editing.
- Open a terminal.
- Run mm init my-game –preset menu-shell.
- cd my-game.
- Run mm plugin new my-game to create your first plugin.
- Optional: run mm studio to open the MM Studio Dashboard (Web) for this existing project.
Important: this guide does not start with “Open MM Studio” on Linux, because there is no standalone Linux desktop app for project creation yet. Today, mm init creates the project shell and an empty plugins/ workspace, then mm plugin new my-game creates the first plugin crate.
mm init my-game --preset menu-shell
cd my-game
mm plugin new my-game
mm studio # optional; opens the MM Studio Dashboard (Web) for this project
Explore the starter project
Before you edit anything, scaffold the first plugin, then build and run it so you can confirm the menu shell opens correctly.
- Right after mm init, the
plugins/directory exists but starts empty. - Run mm plugin new my-game to create the first plugin crate in
plugins/my-game/. - Then use mm build and mm run for the normal loop.
- If you want a no-build taste of MM first, use mm try instead of this guide.
- If you want the browser dashboard, open mm studio only after the project already exists.
mm plugin new my-game
mm build
mm run
Open your plugin
Open the main plugin file for your language. The starter scaffold already wires up the core hooks, so you can change behavior right away.
Open: plugins/my-game/src/lib.rs
Roadmap preview only: C# plugin scaffolds are not buildable in the public CLI yet. Use the Rust tab for the real first-game path today.
Roadmap preview only: Python plugin scaffolds are not buildable in the public CLI yet. Use the Rust tab for the real first-game path today.
Roadmap preview only: Go plugin scaffolds are not buildable in the public CLI yet. Use the Rust tab for the real first-game path today.
Roadmap preview only: JavaScript plugin scaffolds are not buildable in the public CLI yet. Use the Rust tab for the real first-game path today.
Look for the setup methods first. You want the file where init(), update(), or event hooks already exist.
fn init(&mut self, ctx: &mut Context) {
ctx.subscribe("menu:opened");
}
fn on_event(&mut self, ctx: &mut Context, event: Event) {
}
// Roadmap preview only.
// C# plugin builds are not available in the public CLI yet.
// Use the Rust tab for the working first-game flow today.
# Roadmap preview only.
# Python plugin builds are not available in the public CLI yet.
# Use the Rust tab for the working first-game flow today.
// Roadmap preview only.
// Go plugin builds are not available in the public CLI yet.
// Use the Rust tab for the working first-game flow today.
// Roadmap preview only.
// JavaScript plugin builds are not available in the public CLI yet.
// Use the Rust tab for the working first-game flow today.
Make something happen
Add one menu item and react when the player selects it. This is enough to prove your plugin is live. Save the file, then move straight to build and run.
fn init(&mut self, ctx: &mut Context) {
ctx.emit("menu:add_item", b"play|Play Game");
ctx.emit("menu:add_item", b"quit|Quit");
}
fn on_event(&mut self, ctx: &mut Context, event: Event) {
if event.kind_str() == "menu:selected" && event.payload_str() == "play" {
ctx.print("Starting game...");
}
}
// Roadmap preview only.
// C# plugin builds are not available in the public CLI yet.
// Use the Rust tab for a real build-and-run loop today.
# Roadmap preview only.
# Python plugin builds are not available in the public CLI yet.
# Use the Rust tab for a real build-and-run loop today.
// Roadmap preview only.
// Go plugin builds are not available in the public CLI yet.
// Use the Rust tab for a real build-and-run loop today.
// Roadmap preview only.
// JavaScript plugin builds are not available in the public CLI yet.
// Use the Rust tab for a real build-and-run loop today.
Build and run
From the project root, build the plugin first, then run the game. You should see your new menu item in the running game, and selecting it should print Starting game… in the log.
- Watch the terminal output for compiler errors.
- If the build succeeds, run the game and open the menu.
- Select Play Game and confirm you see Starting game… in the log.
mm build && mm run
