← All Workshops

MudEngine Part 4: Single-Player Dioxus GUI

Congratulations!

We ported our MUD engine from a terminal REPL to a graphical Dioxus GUI!

What we achieved:

  • Engine/UI separation — the same World model works with any frontend
  • A 3×3 grid — visual map of all rooms with the player's position highlighted
  • Reactive updates — changing the world signal automatically updates both the grid and description
  • Command input — keyboard-driven navigation like a real MUD

This is the foundation for the multiplayer version. In Part 5 we will:

  • Move the World to a server so multiple players share the same state
  • Use Dioxus server functions for commands
  • Add chat between players
  • Persist the world to a database

The dungeon grows! 🏰

📚 What we learned
ConceptHow we used it
use_signalLocal reactive state for world, input, and feedback
ReadSignalProp type that connects WorldGrid to the parent's signal
signal.read() / signal.write()Reading and mutating reactive state
rsx! loops with forIterating over room names to generate grid cells
Key::EnterDetecting the Enter key in onkeydown
ReadSignal prop passingPassing a Signal directly to a ReadSignal prop