Migrate client from Godot to MonoGame #1

Closed
opened 2026-07-16 22:24:48 +02:00 by marco · 1 comment
Owner

Move the client rendering off Godot onto MonoGame. Server and protocol (IsoMmo.Shared) stay unchanged.

Why

Godot friction (editor dependency, .tscn/.uid files, ~1GB export templates, scene-tree quirks like the chat focus bug) outweighs its value for a game this simple, where we already build every scene in code. MonoGame gives us the platform layer (window, GPU, sprite batch, input, texture loading, cross-platform packaging) while we own all the engine logic. Avoid raw OpenGL — weeks of plumbing for no game.

Hard requirement: multi-platform

  • Server (IsoMmo.Auth, IsoMmo.GameServer): Windows + macOS + Linux. Already pure .NET 10 / ASP.NET Core + SQLite/Postgres, so this holds today — keep it that way.
  • Client (game): Windows + macOS required. Linux is a bonus.

Scope of the port

  • MonoGame project replacing client/IsoMmo.Client, still referencing IsoMmo.Shared
  • Window + input + camera + isometric sprite batch (reuse IsoProjection verbatim)
  • Human sprite rendering from extracted UO frames (reuse HumanArt facing/mirror table)
  • Infinite green grid around the camera
  • Mouse-driven movement (hold right button, walk toward cursor)
  • Text rendering (SpriteFont) for names + overhead chat — biggest new piece
  • Text input widget for chat (Enter opens, Enter sends, Esc cancels) — hand-rolled
  • Cross-platform build/run scripts (replace scripts/godot.sh)
  • Client logging parity (ClientLog)
  • Remove Godot artifacts at parity (.tscn, .uid, export_presets.cfg, project.godot, godot.sh)

Out of scope

Server, protocol, auth, DB, migrations — untouched.

Open questions

  • Port now, or finish/commit chat on Godot first?
  • macOS build needs a Mac for signing/packaging — CI later, or manual for now?

Definition of Done

Acceptance criteria specific to this issue (base DoD — tests green, whole solution builds, zero warnings, multi-platform preserved — applies on top):

  • The game launches and is fully playable from the MonoGame build on both Windows and macOS, with no Godot installed or referenced.
  • End-to-end parity verified in-game with two clients connected at once: login → silent account creation → character-name prompt → walk in 8 directions via mouse (hold right button) → each client sees the other move in real time.
  • Chat parity: Enter opens input on the first keypress, Enter sends, Esc cancels; the sender's message renders above their own head and above the correct character on every other client; character names render above sprites.
  • Human sprites render with correct facing/mirroring in all 8 directions (visual check against the current Godot behaviour).
  • git diff shows no changes to IsoMmo.Auth, IsoMmo.GameServer, or the wire contracts in IsoMmo.Shared (server/protocol untouched).
  • All Godot artifacts removed from the repo: .tscn, .uid, export_presets.cfg, project.godot, scripts/godot.sh, and the now-unused .godot//.tools/ ignore rules.
  • dotnet build of the whole solution succeeds with zero warnings; the client builds and runs without any editor step.
  • Cross-platform run script(s) replace scripts/godot.sh and are documented in the README.
  • README and CLAUDE.md updated to describe the MonoGame client (no stale Godot instructions).
Move the client rendering off Godot onto MonoGame. Server and protocol (`IsoMmo.Shared`) stay unchanged. ## Why Godot friction (editor dependency, `.tscn`/`.uid` files, ~1GB export templates, scene-tree quirks like the chat focus bug) outweighs its value for a game this simple, where we already build every scene in code. MonoGame gives us the platform layer (window, GPU, sprite batch, input, texture loading, cross-platform packaging) while we own all the engine logic. Avoid raw OpenGL — weeks of plumbing for no game. ## Hard requirement: multi-platform - **Server** (`IsoMmo.Auth`, `IsoMmo.GameServer`): Windows + macOS + Linux. Already pure .NET 10 / ASP.NET Core + SQLite/Postgres, so this holds today — keep it that way. - **Client** (game): Windows + macOS required. Linux is a bonus. ## Scope of the port - [ ] MonoGame project replacing `client/IsoMmo.Client`, still referencing `IsoMmo.Shared` - [ ] Window + input + camera + isometric sprite batch (reuse `IsoProjection` verbatim) - [ ] Human sprite rendering from extracted UO frames (reuse `HumanArt` facing/mirror table) - [ ] Infinite green grid around the camera - [ ] Mouse-driven movement (hold right button, walk toward cursor) - [ ] Text rendering (SpriteFont) for names + overhead chat — biggest new piece - [ ] Text input widget for chat (Enter opens, Enter sends, Esc cancels) — hand-rolled - [ ] Cross-platform build/run scripts (replace scripts/godot.sh) - [ ] Client logging parity (ClientLog) - [ ] Remove Godot artifacts at parity (.tscn, .uid, export_presets.cfg, project.godot, godot.sh) ## Out of scope Server, protocol, auth, DB, migrations — untouched. ## Open questions - Port now, or finish/commit chat on Godot first? - macOS build needs a Mac for signing/packaging — CI later, or manual for now? ## Definition of Done Acceptance criteria specific to this issue (base DoD — tests green, whole solution builds, zero warnings, multi-platform preserved — applies on top): - [ ] The game launches and is fully playable from the MonoGame build on **both Windows and macOS**, with **no Godot** installed or referenced. - [ ] End-to-end parity verified in-game with two clients connected at once: login → silent account creation → character-name prompt → walk in 8 directions via mouse (hold right button) → each client sees the other move in real time. - [ ] Chat parity: Enter opens input on the first keypress, Enter sends, Esc cancels; the sender's message renders above their own head and above the correct character on every other client; character names render above sprites. - [ ] Human sprites render with correct facing/mirroring in all 8 directions (visual check against the current Godot behaviour). - [ ] `git diff` shows **no changes** to `IsoMmo.Auth`, `IsoMmo.GameServer`, or the wire contracts in `IsoMmo.Shared` (server/protocol untouched). - [ ] All Godot artifacts removed from the repo: `.tscn`, `.uid`, `export_presets.cfg`, `project.godot`, `scripts/godot.sh`, and the now-unused `.godot/`/`.tools/` ignore rules. - [ ] `dotnet build` of the whole solution succeeds with zero warnings; the client builds and runs without any editor step. - [ ] Cross-platform run script(s) replace `scripts/godot.sh` and are documented in the README. - [ ] README and CLAUDE.md updated to describe the MonoGame client (no stale Godot instructions).
Author
Owner

Done via #1 and merged to main (commit b8aeb51). The client is now MonoGame (DesktopGL, .NET 10); Godot is fully removed and the project consolidated into client/IsoMmo.Client.

Delivered and verified on macOS: login → silent account creation → character prompt → 8-direction mouse movement → two clients seeing each other move (with glide + names) → overhead chat. Engine-independent logic lives in IsoMmo.Client.Core (46 unit tests). dotnet build of the whole solution is zero-warning; git diff shows no changes to Auth/GameServer or the Shared wire contract. Cross-platform just tasks + README/CLAUDE.md updated.

Two DoD items remain machine-dependent and are tracked in #15: Windows playability and a visual check against real extracted UO art. Closing this as the migration itself is complete.

Done via #1 and merged to `main` (commit b8aeb51). The client is now MonoGame (DesktopGL, .NET 10); Godot is fully removed and the project consolidated into `client/IsoMmo.Client`. Delivered and verified on macOS: login → silent account creation → character prompt → 8-direction mouse movement → two clients seeing each other move (with glide + names) → overhead chat. Engine-independent logic lives in `IsoMmo.Client.Core` (46 unit tests). `dotnet build` of the whole solution is zero-warning; `git diff` shows no changes to Auth/GameServer or the Shared wire contract. Cross-platform `just` tasks + README/CLAUDE.md updated. Two DoD items remain machine-dependent and are tracked in #15: Windows playability and a visual check against real extracted UO art. Closing this as the migration itself is complete.
marco closed this issue 2026-07-17 01:28:41 +02:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marco/IsoMmo#1
No description provided.