|
| 1 | +# Zelda Online 2 (`Z3-V1.03`) |
| 2 | + |
| 3 | +Zelda Online 2, the "local version" of July 1998, rebuilt, together with the |
| 4 | +GServ lobby it shipped with. The original is a Java 1.1 application by |
| 5 | +Stefan Knorr: a start window with "One-Player mode" and "Multiplayer mode", |
| 6 | +a server address field and the player's options, then the game in a |
| 7 | +512x448 view. Multiplayer goes through GServ on port 14801, one lobby room |
| 8 | +per level. It is the step between Zelda Online 1 and the first Delphi Graal. |
| 9 | + |
| 10 | +This build is written in Java, like the original, and targets Java 8 class |
| 11 | +files, so any Java 8 or newer runs it. It uses only AWT. |
| 12 | + |
| 13 | +> **Not affiliated.** graal-delphi is an independent fan project. It is not |
| 14 | +> affiliated with, endorsed by, or connected to GraalOnline or |
| 15 | +> graalonline.com, Cyberjoueurs, or Stéphane Portha ("unixmad"). |
| 16 | +
|
| 17 | +No original code, graphics or levels are in this folder. The original |
| 18 | +package includes its author's source; none of it was read for this build or |
| 19 | +copied into it. The code is written from the notes below. |
| 20 | + |
| 21 | +## Folder name |
| 22 | + |
| 23 | +There is no version token in 1998, so the folder carries the level format |
| 24 | +the game ships its levels in: `Z3-V1.03`. |
| 25 | + |
| 26 | +## Sources |
| 27 | + |
| 28 | +| Area | Notes in [graal_analysis](https://github.com/squirelworks/graal_analysis) | |
| 29 | +|---|---| |
| 30 | +| What the package is, start window, options, files | `client-internals/precursors-and-fan-builds.md` | |
| 31 | +| GServ lines, ids, parties, room names | `client-internals/precursors-and-fan-builds.md` ("Network"), `protocol/relay-1998.md` | |
| 32 | +| D payloads (P, C, N, S, T, O, I), sender id, number encoding, level leader | `protocol/relay-1998.md` | |
| 33 | +| Tick, walking, push timing, chat and name drawing | `client-internals/precursor-runs-2026-10-30.md` | |
| 34 | +| Board, links, baddies, signs | `formats/level-binary.md`, `formats/sign-text.md` | |
| 35 | + |
| 36 | +## Classes |
| 37 | + |
| 38 | +| Class | What it does | |
| 39 | +|---|---| |
| 40 | +| `zo2.ZeldaOnline2` | start window (modes, address, nickname, own name, colours), game window, chat line, headless mode | |
| 41 | +| `zo2.Net` | the game's side of the lobby: room per level, party on the first `+`, state push on `P`, D payloads, level leader | |
| 42 | +| `zo2.Relay` | the text-line socket | |
| 43 | +| `zo2.Game` | the 50 ms tick: walking, collision, corner slide, push counter, links, signs | |
| 44 | +| `zo2.Renderer` | the view; chat and names as bold serif text with a white offset copy, no bubble | |
| 45 | +| `zo2.Level`, `SignText`, `Arrays`, `Assets`, `StandIn`, `TileSheet`, `Colours` | files, stand-ins, tiles, colours | |
| 46 | +| `gserv.GServ` | the lobby: ids, games, `N O S + - P C V D H` | |
| 47 | + |
| 48 | +## Build, test, run |
| 49 | + |
| 50 | +``` |
| 51 | +zelda-online2-Z3V103/build.sh # needs a JDK (11 or newer to build) |
| 52 | +java -jar build/zelda-online2-Z3V103/GServ.jar # the lobby, port 14801 |
| 53 | +java -jar build/zelda-online2-Z3V103/ZeldaOnline2.jar |
| 54 | +``` |
| 55 | + |
| 56 | +The address field is pre-filled with `listserver.graal.in`; type |
| 57 | +`127.0.0.1` for a GServ on the same machine. Arrow keys walk, Enter opens |
| 58 | +the chat line (multiplayer), Space or A reads a sign. |
| 59 | + |
| 60 | +Flags: `--one-player`, `--server HOST[:PORT]`, `--nick NAME`, `--data DIR`, |
| 61 | +`--level NAME`, `--keys rrdd.. --dump f.png` (headless). `ZO2_DATA=dir` |
| 62 | +makes the test program also decode every `.zelda` in that folder. |
| 63 | + |
| 64 | +## Where the files go |
| 65 | + |
| 66 | +The jars live in their folder and find their files from there: |
| 67 | + |
| 68 | +``` |
| 69 | +Zelda Online 2/ |
| 70 | + ZeldaOnline2.jar GServ.jar |
| 71 | + graal-assets/zelda-online2/ (from the assets zip) |
| 72 | + pics1.gif arrays.dat levels/*.zelda |
| 73 | +``` |
| 74 | + |
| 75 | +It looks in `--data`, then the jar's folder (and its `levels/` and |
| 76 | +`game/`), then `graal-assets/zelda-online2/`, then `graal-assets/common/`, |
| 77 | +and else uses its stand-ins. The original package can also simply be |
| 78 | +unpacked next to the jar. `make_assets.py SRC OUT.zip` makes the assets |
| 79 | +zip from your own copy: `pics1.gif`, `arrays.dat` and the levels only. |
| 80 | + |
| 81 | +## What works (0.0.1) |
| 82 | + |
| 83 | +- The start window with both modes and the options; the game window. |
| 84 | +- Levels, links, signs, walking, collision, corner slide and push timing. |
| 85 | +- Multiplayer: room per level (`Zlevel11.6` for `level1.zelda`), party on |
| 86 | + the first `+`, the state push on `P`, positions every 2 ticks, chat, |
| 87 | + nickname, colours, leaving the room on a level change, the level leader. |
| 88 | +- The GServ lobby. The rebuilt client was also run against the original |
| 89 | + GServ server on loopback: both players got ids, joined a party and saw |
| 90 | + each other's nickname and position. |
| 91 | + |
| 92 | +## Not yet |
| 93 | + |
| 94 | +The player sprite from `link.gif` (a stand-in figure is drawn, coloured by |
| 95 | +the options), sword, bushes, lifting, baddies, chests, board changes over |
| 96 | +the wire, the password save (its alphabet and mask are not in the notes |
| 97 | +yet), sound. The colour list is the rebuild's own. The original start |
| 98 | +position is not known; the rebuild starts near the middle of `level1`. |
0 commit comments