The client's front end
From launching the client to standing in Aquais without a terminal
(decision #126; code crates/uo-client/src/frontend/). The server side,
accounts and alpha keys, is docs/server-architecture.md § 5b.
cargo run --release -p uo-client -- --server ws://127.0.0.1:7777
Without --name the client opens the front end; --name NAME keeps the
direct dev login (Login { name }) for scripts, captures, bots and the load
test, on servers that allow it (--store mem, or --dev-login true).
Screens
All drawn with ui_kit in the #59 look (smoked glass, brass hairlines,
letter-spaced capitals, colour only as signal), rebuilt from the Front
state whenever it or a text field changes.
Until the character is in the world (#137) the game sees no keys and every
game window (HUD, journal, chat, overview, target card) stays hidden; only
the front end's screens, the settings window and hover tips show. Enter
plays (main menu), signs in or registers, creates the character, or enters
the selected one; Tab and Shift + Tab walk a form's fields (sign-in
starts in the username, or the password when the username is known;
creation in the name); Esc closes the settings window, else goes back.
Text fields paste and copy with Cmd / Ctrl + V, C (docs/ui.md). The
client's network thread pings whenever it sent nothing for 5 s (even
before the first frame), so the gateway keeps it on these screens for an
hour (menu_timeout); the 20-s login limit (#128) closes only silent
connections.
- Connecting: until the first connection; the network thread retries
the
--serverlist with backoff. - Main menu: the Felucca Online wordmark (
assets/ui/logo-felucca.png, pixel art at ×4, nearest), Play, Settings (the settings window, #67, drawn above the front end), Quit, and a status line fromServerInfo(address, players online, world, protocol). - Sign in / Register: tabs; username and password (masked:
ui_kitfield ids with theSECRETbit show stars), and for a new account the password again and the alpha key. Errors come back from the server in plain words ("wrong username or password", "this alpha key was already used"). - Characters: the account's characters as a table (name, best skills, stats, where last seen), the selected one turning beside it; Play, Delete (asks first), New character with free slots shown (5 per account), an API token button for scripts and bots (shown once, also printed to the console), Sign out.
- New character: name (2–16 letters; "ann lee" becomes "Ann Lee");
six callings as one-click starts (Warrior, Archer, Mage, Miner,
Woodsman, Fisher), each a sound stat split and three skills; the body
(male / female, light / dark skin, beard for men, five hairstyles, eight
hair colours); stats with −5/−1/+1/+5 steppers and bars, the total
shown against the ruleset's 80 (each 10–60); skills picked from tabs by
category, up to three, each ±5.0 up to 50.0, the total shown against
100.0. The line under them says what is still wrong in plain words (the
same
NewCharacter::validatethe server runs, against the limits the server sent inServerInfo), or the title the character will carry ("Ann Lee the Archer"); Create is live only when the choice is valid. A new account lands here directly. - Loading: after Play, until the world around the character has streamed in: the terrain window built, our own mobile drawn, every sprite in view loaded, characters assembled, then 1.5 s steady (at most 30 s). The line says which stage it waits for; a tip for new players under it.
- Wrong version: the server's
ServerInfo.protocoldiffers from the client's: both numbers and Quit. - Connection lost: a red banner on top of any screen, in the world too, while the network thread reconnects. In the world it resumes with the token; if the server no longer knows it, the thread signs in again with the account's sign-in session and plays the same character. On the front end's own screens the front end signs in again itself.
The character preview
preview.rs: on the creation and character screens the camera moves close
(zoom 7) to a spot away from everything (no world exists before the
welcome) where the character stands on a few planks: the same modular
character as in the world (paperdoll::dressed_character), with the body
the player picked (paperdoll::body_look_of) in the clothes the server
gives a new colonist, turning an eighth every 0.9 s (smooth turning). The
camera is given back when the screens close.
The body on the wire
uo_proto::character::Look { gender, skin, hair, hair_color, beard } is
stored on the character sheet (Character.look) and sent to everyone who
sees the character (EntityKind::Player.look); clients draw it on the
code-built base body (skin tone, hair colour, cropped or full hair; one body
for both genders and no beards for now, docs/characters.md). Characters
made before accounts (dev logins, bots) have none and are drawn by a hash of
their name as before.
Proof runs
UO_FRONTEND_AUTO=user:password:KEY:Name walks through every screen by
itself (menu, a wrong sign-in, register, creation with a calling and a
look, the character list, loading, the world) and captures each as
NN-<screen>.png into UO_FRONTEND_SHOTS. Use it with --record (renders
offscreen with the UI, so nothing needs focus) and let --seconds end the run:
UO_FRONTEND_AUTO_EXIT=1 quits a few seconds into the world, which is right for
window captures but cuts the video before ffmpeg finishes it.
cargo run --release -p uo-server -- --world assets/world/felucca --listen 127.0.0.1:7784 \
--dev-login false --alpha-keys FEL-TEST-TEST-TEST
UO_FRONTEND_AUTO=tester:correct-horse:FEL-TEST-TEST-TEST:Ann\ Lee UO_FRONTEND_SHOTS=/tmp/fe \
cargo run --release -p uo-client -- --server ws://127.0.0.1:7784 \
--record /tmp/fe/frontend.mp4 --seconds 120