You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Design proposal: opt-in support for maps larger than 256×256
Hi @sven-n, and thank you — both for OpenMU itself and for the unusually
detailed review on #867. You were right on every count, and I want to start by
owning the mistake: I opened that PR far too early, as one big lump, before I
understood how a change like this should enter the project. Your feedback gave me
the map I was missing. So this is me stepping back and doing it the right way —
opening the design conversation first, before any more code.
I'm closing/leaving #867 aside as you suggested and splitting the useful parts
out (see "Immediate small PRs" below).
And honestly — I'm genuinely excited to share where this got to. We got large maps actually rendering in the client, terrain height sculpting working, and it
looks great in-game. That's the part I want to put in front of the community: not a
promise, but something that already runs.
The goal
Let servers opt in to maps larger than the current fixed 256×256 grid, so
map makers can finally build spaces the classic client never could — bigger
continents, raid zones, event arenas, sculpted terrain with real elevation —
without changing anything for the 99% of servers that stay on 256×256. This opens
a whole new canvas for map makers, and the exciting part is we've already seen it
work end to end: server → protocol → client → rendered on screen.
Why this is worth a design discussion rather than just a feature flag: coordinates
are 8-bit across the whole stack, so "bigger maps" touches the data model, the
terrain loader, the wire protocol, the pathfinding, and the tools. It has to be
done as a sequence of reviewable, backward-compatible steps, not one PR.
You correctly pointed out that no stock client can use any of this, which is what
makes an out-of-tree protocol dialect unmaintainable for OpenMU. That gap is real,
and here's how I'd like to close it so the server side has a legitimate consumer:
An open client — and it's already public. We maintain LinuxMu, a fork of the Season 6
client (based on the MuMain sources) that runs
against OpenMU on Linux and Windows, and large maps render in it today. It's out
in the open, not a private binary only we can build — it lives on main, and you can read the entire
client-side change in this full diff.
That's the "documented consumer" the protocol was missing — inspectable,
buildable, and real.
An open map editor (work in progress) — terrain height editing already works.
The editor itself isn't finished, so I don't want to oversell it. But one part is
already working end to end, and it's the part that matters most for "new maps":
editing terrain height. Concretely, what works today:
Sculpting the heightmap with a brush — raising/lowering elevation over a radius,
writing into the client's per-vertex height buffer (PrimaryTerrainHeight,
via an AddTerrainHeight(x, y, height, range)-style operation).
The client renders the resulting relief: it loads the per-vertex height data and RequestTerrainHeight returns the new elevation, so the change is visible in-game.
Exporting a validated map bundle (terrain + attributes) and applying it to the
server as a terrain-only update.
That's the difference between "a bigger grid" and "actually new maps": not just
more flat tiles, but terrain a map maker can shape. The rest of the editor (object
placement, textures, polish) is still in progress; I'm only claiming height editing
as done.
Opening up reserved space. Larger maps let servers use map/terrain ranges
that the fixed 256 grid keeps locked away, which is where a lot of the new
gameplay potential comes from.
I'm not asking OpenMU to adopt the client or the editor — only flagging that a
maintained, open client + editor exist and will be published, so the protocol
work has a documented consumer instead of being a dialect for one hidden client.
Proposed sequencing
Each step is its own PR, backward-compatible, and reviewable in isolation. Nothing
after step 1 lands until the one before it is merged and agreed.
Data model + migration, no behaviour change. Introduce a per-map size
concept and the persistence migration, with robust terrain-size handling
and zero behaviour change for 256×256 maps. This is the step you named as
the reviewable starting point, and I agree it's the right one. Explicitly in
scope here: an unexpected terrain blob length becomes a loud, specific
error, never a silent "pad the tail and guess" (addressing the terrain-loader
concern from the review directly).
Coordinate type. Widen the coordinate representation behind the data model,
keeping 256×256 paths byte-identical on the wire.
Protocol. Only once 1–2 are agreed: a properly versioned set of packets
— not sub-codes that collide with the legacy count byte, and batched like the
packets they extend. Opcode allocation to be agreed with you up front.
Server plumbing + tools. Pathfinding, view plug-ins (no hard-throwing checked casts on un-migrated paths — graceful fallback), and the admin panel
renderer, each migrated deliberately.
What this issue is (and isn't)
To be clear up front: I'm not asking OpenMU to adopt this. I'm sharing the effort
openly, in the spirit of the project — because I think part of the community may
see the potential in larger, sculptable maps: new terrain to build on, new kinds
of gameplay, and reserved map space finally usable.
You rightly asked for an issue describing the goal and the client story before any
code, so here it is. If larger maps are ever a direction OpenMU would want, I'd be
glad to align on the step-1 shape (per-map size + migration, no behaviour change
for 256×256) and do it properly this time. And if it's not a direction the project
wants, that's completely fine — the work stays open and available for whoever in
the community wants to pick it up or build on it.
Immediate small PRs (independent of this proposal)
The two pieces you said you'd take, cleanly on top of current master, each on its
own — already opened:
Prevent duplicate map entry on repeated F3 12 packet #873 — Duplicate-map-entry guard on repeated F3 12. Confirmed on master: ClientReadyAfterMapChangeAsync has no re-entry guard, so a repeated F3 12
packet re-runs it and calls CurrentMap.AddAsync(this) (and the summon's AddAsync + OnSpawn) a second time. Since CurrentMap is set to null during
a map change and only reassigned in that handler, a non-null value on entry is a
reliable "already ran" signal.
Bounds-check client-supplied walk steps against the terrain grid #874 — Bounds check before WalkMap[target.X, target.Y]. Noted honestly in
the PR: on master Point is (byte, byte) and WalkMap is [256,256], so the
index can't go out of range yet — it's defensive hardening that becomes
load-bearing once coordinates widen. Kept separate from this proposal so you can
take or leave it on its own merit.
Thanks again for taking the time to explain the why and not just the what.
Design proposal: opt-in support for maps larger than 256×256
Hi @sven-n, and thank you — both for OpenMU itself and for the unusually
detailed review on #867. You were right on every count, and I want to start by
owning the mistake: I opened that PR far too early, as one big lump, before I
understood how a change like this should enter the project. Your feedback gave me
the map I was missing. So this is me stepping back and doing it the right way —
opening the design conversation first, before any more code.
I'm closing/leaving #867 aside as you suggested and splitting the useful parts
out (see "Immediate small PRs" below).
And honestly — I'm genuinely excited to share where this got to. We got large maps
actually rendering in the client, terrain height sculpting working, and it
looks great in-game. That's the part I want to put in front of the community: not a
promise, but something that already runs.
The goal
Let servers opt in to maps larger than the current fixed 256×256 grid, so
map makers can finally build spaces the classic client never could — bigger
continents, raid zones, event arenas, sculpted terrain with real elevation —
without changing anything for the 99% of servers that stay on 256×256. This opens
a whole new canvas for map makers, and the exciting part is we've already seen it
work end to end: server → protocol → client → rendered on screen.
Why this is worth a design discussion rather than just a feature flag: coordinates
are 8-bit across the whole stack, so "bigger maps" touches the data model, the
terrain loader, the wire protocol, the pathfinding, and the tools. It has to be
done as a sequence of reviewable, backward-compatible steps, not one PR.
The client story (the part #867 was missing)
You correctly pointed out that no stock client can use any of this, which is what
makes an out-of-tree protocol dialect unmaintainable for OpenMU. That gap is real,
and here's how I'd like to close it so the server side has a legitimate consumer:
An open client — and it's already public. We maintain
LinuxMu, a fork of the Season 6
client (based on the MuMain sources) that runs
against OpenMU on Linux and Windows, and large maps render in it today. It's out
in the open, not a private binary only we can build — it lives on
main, and you can read the entireclient-side change in this
full diff.
That's the "documented consumer" the protocol was missing — inspectable,
buildable, and real.
An open map editor (work in progress) — terrain height editing already works.
The editor itself isn't finished, so I don't want to oversell it. But one part is
already working end to end, and it's the part that matters most for "new maps":
editing terrain height. Concretely, what works today:
writing into the client's per-vertex height buffer (
PrimaryTerrainHeight,via an
AddTerrainHeight(x, y, height, range)-style operation).RequestTerrainHeightreturns the new elevation, so the change is visible in-game.server as a terrain-only update.
That's the difference between "a bigger grid" and "actually new maps": not just
more flat tiles, but terrain a map maker can shape. The rest of the editor (object
placement, textures, polish) is still in progress; I'm only claiming height editing
as done.
Opening up reserved space. Larger maps let servers use map/terrain ranges
that the fixed 256 grid keeps locked away, which is where a lot of the new
gameplay potential comes from.
I'm not asking OpenMU to adopt the client or the editor — only flagging that a
maintained, open client + editor exist and will be published, so the protocol
work has a documented consumer instead of being a dialect for one hidden client.
Proposed sequencing
Each step is its own PR, backward-compatible, and reviewable in isolation. Nothing
after step 1 lands until the one before it is merged and agreed.
concept and the persistence migration, with robust terrain-size handling
and zero behaviour change for 256×256 maps. This is the step you named as
the reviewable starting point, and I agree it's the right one. Explicitly in
scope here: an unexpected terrain blob length becomes a loud, specific
error, never a silent "pad the tail and guess" (addressing the terrain-loader
concern from the review directly).
keeping 256×256 paths byte-identical on the wire.
— not sub-codes that collide with the legacy count byte, and batched like the
packets they extend. Opcode allocation to be agreed with you up front.
checkedcasts on un-migrated paths — graceful fallback), and the admin panelrenderer, each migrated deliberately.
What this issue is (and isn't)
To be clear up front: I'm not asking OpenMU to adopt this. I'm sharing the effort
openly, in the spirit of the project — because I think part of the community may
see the potential in larger, sculptable maps: new terrain to build on, new kinds
of gameplay, and reserved map space finally usable.
You rightly asked for an issue describing the goal and the client story before any
code, so here it is. If larger maps are ever a direction OpenMU would want, I'd be
glad to align on the step-1 shape (per-map size + migration, no behaviour change
for 256×256) and do it properly this time. And if it's not a direction the project
wants, that's completely fine — the work stays open and available for whoever in
the community wants to pick it up or build on it.
Immediate small PRs (independent of this proposal)
The two pieces you said you'd take, cleanly on top of current master, each on its
own — already opened:
ClientReadyAfterMapChangeAsynchas no re-entry guard, so a repeated F3 12packet re-runs it and calls
CurrentMap.AddAsync(this)(and the summon'sAddAsync+OnSpawn) a second time. SinceCurrentMapis set to null duringa map change and only reassigned in that handler, a non-null value on entry is a
reliable "already ran" signal.
WalkMap[target.X, target.Y]. Noted honestly inthe PR: on master
Pointis(byte, byte)andWalkMapis[256,256], so theindex can't go out of range yet — it's defensive hardening that becomes
load-bearing once coordinates widen. Kept separate from this proposal so you can
take or leave it on its own merit.
Thanks again for taking the time to explain the why and not just the what.