Skip to content

v0.3.0 — a fleet without wine, and a realm without a link

Choose a tag to compare

@jaenster jaenster released this 22 Aug 16:43
· 139 commits to main since this release
937bccc

Two hundred commits, and the theme of all of them is that a game server stops being one
program on one host. The realm and the fleet now meet through redis rather than through a
link between them, there is a game server that does not need wine at all, and there is a
second kind of game server that runs the game's own DLLs instead of injecting into
Game.exe.

Highlights of this release:

  • A game server with no wine. 1.14d's macOS i386 build is mapped and run directly on
    i386 Linux and serves real clients through the same realm and gateway as the wine
    server — one process in a 4.4 MB image, hosting several games, as fast as the wine
    build on real hardware. A fleet can mix both, because both meet the realm the same way.
  • The realm is redis-first, and there can be more than one of it. The game-server
    control link and d2dbs are gone: servers publish themselves into redis, take
    create/join off a queue there and report back on an event stream any instance drains.
    Redis holds the live character and Postgres keeps it; the filesystem backend is
    deleted. A character has one seat, claimed in the shared store, so a second client
    bringing it is refused with the game that has it instead of being left at a loading
    screen.
  • realmd is a package, not just a program. A realm can be built on top of it and
    configured by name rather than by address, which is what the Helm chart now does —
    replicas, advertised capacity per game server, and the split-horizon trap in
    client-facing versus internal addresses written down where it can be read.
  • A second kind of game server, on the pre-1.14 DLLs. apps/d2host drives real
    D2Game/D2Common against our own Fog.dll and D2Net.dll, with no injection. Most
    of the work here was measurement: every callback's arity counted at its call site,
    D2Lang's and D2Common's per-version ordinals, 1.13c's wholly renumbered export table,
    1.06b's classic packet table read off its own bounds check, and the join opcode read
    out of each build's own D2Net table — it moved at 1.10, not at 1.09, which is why 1.09
    never joined. At this tag a character joins a game on the 1.10f engine; serving a world
    on every engine came after it.
  • Saves that a foreign engine will accept. FOG_ComputeChecksum was a placeholder,
    so a character this project wrote could never load on an engine whose Fog.dll it also
    supplies. It is the .d2s checksum, and it is now the real one.