← All Workshops
MudEngine Part 4: Single-Player Dioxus GUI
Step 10 / 10
Congratulations!
We ported our MUD engine from a terminal REPL to a graphical Dioxus GUI!
What we achieved:
- Engine/UI separation — the same
Worldmodel 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
Worldto 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
| Concept | How we used it |
|---|---|
use_signal | Local reactive state for world, input, and feedback |
ReadSignal | Prop type that connects WorldGrid to the parent's signal |
signal.read() / signal.write() | Reading and mutating reactive state |
rsx! loops with for | Iterating over room names to generate grid cells |
Key::Enter | Detecting the Enter key in onkeydown |
ReadSignal prop passing | Passing a Signal directly to a ReadSignal prop |
Step 10 / 10