Compare commits

...
Author SHA1 Message Date
Stefan MaierandClaude Opus 5.5 f13ccc98cb Test: our join state enum renamed beside upstream's join progress
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:11:10 +01:00
Stefan MaierandClaude Opus 5.5 499c548ac5 Test: merge upstream/main (network version 39) and OpenCE#486, the VR hand sent as fire origin
For the VR + flat network test of OpenCE#486: upstream's main (network
version 39, client builds as distributed message 92) and the PR's branch
(fire origins, distributed message 93). network_vr.c registers the
weapon hand as the fire origin source; our own host-side use of the VR
poses for the line of sight is dropped in favour of the PR's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:09:43 +01:00
Stefan MaierandClaude Opus 5.5 85dba477c3 Accept a client's fire origin only where a hand firing at the target can be, and let hosts turn it off (#486)
As reviewed: the host cannot tell a VR client from a modified flat one,
so a client could claim a hand 0.4 world units to any side and shoot
around a corner without its camera ever being exposed (the line from the
eye to the hand stops shooting through walls, not around edges).

- The hand must be where one firing at the target can be: no more than
  0.05 world units (0.15 m) behind the eye along the line to the target,
  0.2 (0.6 m: a lean and a hand held out) to its side, and 0.1 (0.3 m)
  above the eye (distributed_fire_origin_shape).
- The hands are looked from only after no eye (nor vehicle gun) had a
  line, and the hits only a hand let through are counted in the host's
  log of clients' hits.
- network.fire_origins (true by default; also a dedicated server's
  setting) turns the hand off: from the camera and vehicles' guns only.
- The message is distributed message 93 (92 is now the client's build).
- A client sends its fire origin when it changes and every eighth tick,
  not every tick.

Checked: ninja android builds without warnings in the changed files;
test_fire_origins.py (15 cases with 9 negative controls: ownership,
reach, the store, the resend and its record, and each of the shape's
three limits) passes, run on macOS as 64-bit; the rest of the harness
fails there only where it did before (32-bit layouts); network_format.py
--record adds message 93 and its structs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:00:40 +01:00
Stefan MaierandClaude Opus 5.5 ba1c3816bd Host: look for line of sight from where a player's shots leave, when a client says it is not the camera
The host's new line of sight check (#474) looks from the shooter's
camera, or a vehicle gun's muzzle. In a VR build (Mjolnir VR, which
plays with OpenCE builds of the same network version) the weapon fires
from the player's hand, and the view follows the head up to 0.35 m from
the body: a shot past a corner or over an edge that the unit's camera is
behind is refused, though the shooter saw and hit the target.

A client whose players' shots leave from elsewhere than their units'
cameras now sends the host, unreliably every tick, where from: an offset
from the camera (distributed message 93, struct distributed_fire_origin),
no further than 0.4 world units (a player leaning out and an arm). The
host takes it for that machine's own players only, held a second, and
the line of sight check looks from there as from a vehicle's gun: the
line from the eye to it must be clear, so a hand through a wall does not
hit. A build registers where its players fire from with
network_damage_set_fire_origin_source; none does here, so this build
sends nothing. No new network version: a host that does not know
message 93 drops it, and such a host checks as before.

Checked: ninja android builds; the new harness test
(tools/harness/tests/test_fire_origins.py: the host takes only a
machine's own players' origins within reach, a client sends only what
its source gives within reach, with negative controls) and the other
network harness tests pass (run on macOS as 64-bit; aim_assist and
latency_meter fail there with or without this change, as they assume
the 32-bit layout); network_format.py --record adds the message and its
structs. Not played in a network game.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 14:00:40 +01:00
bnunu 3c7ed45e6f Merge pull request #434 from s3anyboy/controller_layouts
Recon and fishsticks
2026-10-26 08:35:50 -04:00
S3anyBoy 8bc9c179cb Merge branch 'OpenCommunityEdition:main' into controller_layouts 2026-10-26 06:57:42 -05:00
MrBruhandClaude Opus 5.5 5388f2f418 Write the join screen's menu file again with the browser word for a refused name (tools/port_settings.py)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-27 00:11:19 +13:00
MrBruhandClaude Opus 5.5 09123e997c Let a dedicated server keep words out of its chat and its players' names (server.chat_filter, off by default): streamer mode's list by group and severity (slurs from mild, swearing and insults off by default), "censor" starring a line's words, "block" refusing the line and refusing at the door a machine whose name has them (rejection code 7, "name", which an updated game shows as "The host refused: your player name").
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-27 00:00:42 +13:00
MrBruh d9e9c86e56 Merge pull request #494 from OpenCommunityEdition/client-build-info
Have a client tell the host its build, the GitHub repository it is ma…
2026-10-26 23:24:34 +13:00
MrBruhandClaude Opus 5.5 d0acb3bd61 Have a client tell the host its build, the GitHub repository it is made from and the mods it plays, which a dedicated server shows in /api/players (client) and logs once: a new distributed message older builds drop as a kind they do not know, so the network version stays 39.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 23:20:52 +13:00
MrBruh be29b20fe2 Merge pull request #492 from OpenCommunityEdition/browser-dedicated-masters
Show a game under the server browser's DEDICATED on a master server's…
2026-10-26 21:33:53 +13:00
S3anyBoy 75743bb5c7 Merge branch 'OpenCommunityEdition:main' into controller_layouts 2026-10-26 03:30:33 -05:00
MrBruhandClaude Opus 5.5 41473a55d2 Show a game under the server browser's DEDICATED on a master server's word alone, not its listing's own dedicated flag, which any host can set: a game the brokers alone list is shown as the players'.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 21:28:01 +13:00
MrBruh 51150d617c Merge pull request #491 from OpenCommunityEdition/dedicated-server-chat
Give a public dedicated server its text chat, network.text_chat's (on…
2026-10-26 20:33:45 +13:00
MrBruhandClaude Opus 5.5 1042811584 Give a public dedicated server its text chat, network.text_chat's (on by default, live with sv_set), while a public game a player hosts keeps none: a client follows the host's chat in a game joined from the server browser only when a master server lists it as a dedicated server's, an approved operator's, not on the listing's own word.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 20:33:04 +13:00
MrBruh 0a46688c3d Merge pull request #490 from OpenCommunityEdition/dedicated-server
Dedicated server
2026-10-26 19:49:37 +13:00
MrBruhandClaude Opus 5.5 686e7c8774 Build the server image only after a Build of main, weekly and by hand, not on pull requests, where it built the image of main's last release rather than the request's code.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 19:38:15 +13:00
MrBruhandClaude Opus 5.5 1fc3a35079 Log a failed SDL_Init once, and again only when its reason changes, rather than on every frame that asks for SDL (tens of thousands of lines a minute without a display).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 19:36:55 +13:00
MrBruhandClaude Opus 5.5 27f79d3eb9 Describe the master's /apply as taking the region, from a menu, and the number of servers as its options, its form keeping the display name, the public key, the proof and a note.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 19:09:27 +13:00
MrBruhandClaude Opus 5.5 5653960e78 Open the server browser on ALL GAMES, the dedicated servers first and then the games players host, rather than on DEDICATED: network.browser_source defaults to "all".
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 18:11:47 +13:00
MrBruhandClaude Opus 5.5 a8b85a09c0 Let a fleet run the dedicated server: the owner's role over the web from loopback, POST /api/bans and sv_ban_address, sv_stop and sv_restart drains, the players' addresses in events, the server's identity in its status and capabilities in the RCON's hello, and each release's SHA256SUMS signed with the release key (deploy/release-key.pub, tools/release_sign.sh).
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-26 17:21:00 +13:00
S3anyBoy bd362e1e2f Merge branch 'OpenCommunityEdition:main' into controller_layouts 2026-10-25 21:48:51 -05:00
bnunu b09a3ea739 Merge pull request #477 from PeterRichardsonGolf/fix/gun-game-plasma
Gun Game: the plasma rifle and plasma pistol doesn't fire
2026-10-25 16:40:58 -04:00
Stefan MaierandClaude Opus 5.5 04cfd1a12c Host line of sight: a VR player's weapon hand is a muzzle too
Upstream's host now refuses a reported hit when the shooter had no line
of sight to the target, from the unit's camera (or a vehicle gun's
muzzle). A VR player fires from the weapon in their hand, and their view
follows their head up to vr.lean_limit from the body: a shot past a
corner or over an edge that the unit's camera is behind was refused.

The host takes the hand their machine sends (network_vr.c) as a muzzle
in the trail points, as a vehicle's gun: the line from the eye to it
must be clear (no hand through a wall), and it must be within 0.4 world
units (1.2 m) of the camera.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 21:15:43 +01:00
Stefan MaierandClaude Opus 5.5 2b40b42f75 Merge upstream/main (2026-10-25): host line of sight check, early inventories
Network version stays 38. The conflict: upstream's unbinding of the read
framebuffer before the swap (for OBS) goes into the window's branch,
where the swap is (VR presents through vr.c).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 21:11:13 +01:00
MrBruh 43c8f6eebe Read config_answer_only in the config_write test's file writer, so that its probe-writes negative control compiles under clang 23's -Wunused-but-set-global. 2026-10-26 02:44:19 +13:00
MrBruh 5177040890 Ask the official master server, master.opencommunityedition.com, built into the game and the web page, when masters.txt names no master. 2026-10-26 02:26:03 +13:00
MrBruh 815d3a0ca5 Add a dedicated server (halo --server) with its web admin page, RCON, master server listings and the server browser's DEDICATED tab, marking dedicated games in the LAN advertisement and internet listing in network version 39. 2026-10-25 21:37:29 +13:00
S3anyBoy 1095223b2b Merge branch 'OpenCommunityEdition:main' into controller_layouts 2026-10-24 20:48:00 -05:00
bnunu 7fb941b0b2 Merge pull request #474 from johncranston303/los-fix
Stop a client from instantly wiping the whole lobby through walls
2026-10-24 18:51:56 -04:00
John Cranston 933cad12b3 Host: refuse a reported hit with no line of sight to the target. 2026-10-24 13:22:27 -07:00
PeterRichardsonGolfandClaude Opus 5.5 0a8584b260 Test Gun Game's spent weapon check against battery weapons' magazines (#477)
The real gun_game_weapon_empty against a fake plasma rifle (one magazine
holding nothing), pistol and weapon without magazines: full and spent
batteries, rounds loaded, carried and none. Negative controls: the old
return, the empty magazine not skipped, and every magazine skipped, each
caught by a named case. Checked: the test's 7 pass and the whole harness
passes (867).

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 13:33:02 -06:00
PeterRichardsonGolfandClaude Opus 5.5 8e8fa4d760 Gun Game: the plasma rifle and plasma pistol can fire
gun_game_weapon_empty used the battery (age) only for a weapon with no
magazines. Halo CE's plasma rifle and plasma pistol have one magazine
block with every count 0, so the loop found no rounds and called them
empty: gun_game_equip deleted the weapon and gave a new one on every
update, and those levels could never fire (bots holding them slid around).

A magazine whose definition holds no rounds is skipped; a weapon with no
magazine that holds rounds is judged by its battery, as one without
magazines is.

Found in Halo CE: Arena Evolved.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-24 13:25:20 -06:00
bnunu 3a2c4649e8 Merge pull request #466 from medic-code/fix/spawn-inventory-wait
fix(net): apply an inventory once its objects come
2026-10-24 14:49:33 -04:00
medic-code 32604c8e7e Describe in NETCODE.md what a client does with an early inventory
The inventory bullet gains what a client does with an inventory whose
unit or weapons have not come yet, and when it drops one, so the
protocol notes match the retry list.

Checked: documentation only; ninja linux links and
test_retried_inventories.py passes (17 tests).
2026-10-24 20:48:18 +02:00
medic-code 07c8430b5a Keep a client's inventory until its weapons have come too
A weapon is made on the stream too, so an inventory naming one not here
yet left its slot as it was until the host's next inventory. What is
here is still applied at once, and the inventory is kept until every
weapon it names has come, then applied in full with its ammunition.

Checked: ninja linux links with no warnings; test_retried_inventories.py
passes (17 tests): six cases, now including a weapon arriving late, ten
negative controls each failing its own case, and the wiring check.
2026-10-24 20:48:18 +02:00
medic-code 667c2f29a0 Keep a client's inventory until the unit it names has come
An inventory goes as a datagram and a unit is made on the stream, which
can trail it, so one naming a unit not here yet was dropped: a player
just spawned held nothing until the host's next. The client keeps the
newest of each unit's, one per player at most, and applies it once the
unit comes; it is dropped after three host refreshes or at a new game.

Checked: ninja linux links with no warnings; test_retried_inventories.py
passes (15 tests): five cases (unit late, newest kept, list full,
forgotten, expiry), nine negative controls each failing its own case,
and a wiring check.
2026-10-24 20:48:18 +02:00
bnunu 6036adfa2d Merge pull request #445 from johncranston303/obs-capture
OBS's game capture no longer records the game upside down
2026-10-24 14:39:31 -04:00
Stefan MaierandClaude Opus 5.5 9ef32d4304 Merge upstream/main (2026-10-24): OpenCE network version 38
OpenCE gametypes named in the server browser (network version 37), and
the host may leave the shield effects to each player (SHIELD EFFECTS'
PLAYERS' OWN, network version 38). The conflict: our Android listing
declarations stay beside upstream's p2p_set_game_listing with its new
kind.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 10:00:39 +02:00
MrBruh 5e27f3a27b Merge pull request #468 from OpenCommunityEdition/testing
Testing
2026-10-24 14:08:46 +13:00
MrBruh 68d8048333 Let the host leave the shield effects to each player with SHIELD EFFECTS' PLAYERS' OWN, still synced by default, in network version 38. 2026-10-24 14:00:35 +13:00
MrBruh dc7feb1c41 Name OpenCE gametypes in the server browser (SWAT, HC CTF), sending each game's kind with its LAN advertisement and internet listing in network version 37. 2026-10-24 13:44:16 +13:00
Stefan MaierandClaude Opus 5.5 24ddaecd78 Merge upstream/main (2026-10-23): OpenCE network version 36
New gametypes (SWAT, Infection, Gun Game, Hardcore), shield effects the
host's choice in network games, co-op ally friendly fire, network fixes
(scenery shields, tripmines, co-op teleports), Custom Edition HUD and
texture fixes, ASTC for Android GPUs without S3TC.

Left out on purpose: upstream's two Android workarounds for Mali phones,
the GL shadow state refreshed before every draw (prepare_draw) and the
geometry cache bypassed (mirror_range). Both would cost every draw of
both eyes on the Quest, which never showed the corruption they work
around; their tests are skipped. Conflicts: the GL capabilities log
keeps multiview and adds ASTC; xbox_textures.c keeps vr.c's texture work
counters; README.md stays the player's.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 21:58:11 +02:00
bnunu dedb3755d4 Merge pull request #462 from OpenCommunityEdition/testing
Merge Testing
2026-10-23 14:03:01 -04:00
bnunu d86e8b01ee Merge branch 'main' into testing 2026-10-23 13:34:20 -04:00
bnunu 3a917551ca Merge pull request #460 from bnunu/halo-ce-universal/coop-client-floor-plane
Co-op clients take a teleport that leaves their feet on a floor's plane
2026-10-23 09:35:48 -04:00
Jonas VolmanandClaude Opus 5.5 d17ecdd6ad Co-op clients take a teleport that leaves their feet on a floor's plane
After 343 Guilty Spark's flood cutscene (x50) with three or more players, a
client could stay on its own screen where the cutscene had parked its
player (at player0_int_base or player1_int_base) while the host had it in
the room. That client saw everyone but itself in the first Flood fight.

A client keeps its own player where it is while the host's position for it
is outside the client's loaded BSP (a BSP switch still on its way). That
was tested at the unit's feet. A teleport can leave the feet a few
millionths below the floor's plane (z -3.1e-6 on the control room's floor
at 0), which bsp3d_test_point counts as solid, so the client never took the
host's position. In a two-player game the only client is player0, whose
spot happens to test inside.

The test now uses the unit's middle: the host's position plus the client's
own feet-to-bounding-sphere offset, against its own bounding sphere center.

Checked on Windows: a hidden c10 host, two joining copies and a system link
bot, the cutscene played and skipped. Before, both clients stayed at the
parking spot; after, every machine has all four players in the room, and
each client still waited at the cutscene's two BSP switches until it had
loaded the BSP. test_elevator_correction passes (its fake object gains
bounding_sphere_center). No network version change: nothing the machines
send or agree on changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 06:33:13 -07:00
bnunu 3c7fe4594c Merge pull request #463 from bnunu/host-shield-effects
Make the shield effects the host's choice in network games
2026-10-23 09:12:00 -04:00
bnunuandClaude Opus 5.5 63fd36775e Make the shield effects the host's choice in network games
The shield glow (display.shield_glow and its Light Show intensity) and the
overshield effect (display.overshield_effect) were each player's own, in
network games too. The glow lights what is around a shield as it flares,
so a player who had it saw enemies a player without it did not, and the
overshield effect keeps an overshielded player lit: anyone who did not
turn them on was at a disadvantage.

Now a network game's are the host's, for every machine: SHIELD EFFECTS in
Server Setup > Player Options (network.shield_effects): STOCK (the
default), GLOW, LIGHT SHOW, OVERSHIELD, GLOW+OVERSHIELD or
SHOW+OVERSHIELD. Each player's own settings apply offline only (the
campaign, split screen), and Video Setup's helps say so.

- network_shield_effects.c: the host sends its choice to each client
  reliably when it is ready (distributed message 91) and to them all when
  it changes, as the aim assist policy is sent; a client takes it only
  from the host's stream, whole and valid, and draws stock until it has it.
  shield_glow.c and overshield_effect.c draw what it says in a network
  game.
- Network version 36: a build that would draw its player's own cannot
  join. network_format.txt recorded.
- Player Options' rows 27 apart in place of 30 (ce_menus.py's
  CHILD_OFFSETS), so that the tenth fits above the help, which keeps its
  three lines, and the screen's divider and buttons stay where they were;
  test_aim_assist.py's layout check follows.

Checked: ninja android builds, the changed files compile for the web, and
CI's tests pass (936). On the Android emulator, Player Options shows the
row and steps through its values with each value's help, and Extra
Effects shows its new helps. Not played as a network game.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 05:57:35 -07:00
bnunu 83ae96e2d7 Merge pull request #456 from bnunu/android-etc2-transcode
Give Android GPUs without S3TC DXT1 textures as ASTC 4x4, by moving bits (no encoder)
2026-10-23 08:08:53 -04:00
Jonas VolmanandClaude Opus 5.5 99c2030784 Give Android GPUs without S3TC DXT1 textures as ASTC 4x4, by moving bits
On Android GPUs without S3TC (Mali), DXT textures are decoded on the CPU
and uploaded as 32-bit texels, 8 times DXT1's 4 bits. A DXT1 block is two
565 colors and a 2-bit index per texel, which an ASTC 4x4 block holds
nearly as it is, so where the driver has KHR_texture_compression_astc_ldr
each DXT1 block is now rewritten as an ASTC block (dxt1_astc_block):
8 bits a texel on the GPU, with no encoder, no search and no threads.
- Four colors (c0 > c1): RGB direct endpoints of 8 bits, weights of 0,
  21, 43 and 64 sixty-fourths for DXT's thirds.
- Three colors, none transparent: weights of 0, 32 and 64 (exact).
- Three colors with transparent texels: two planes (alpha's weights of
  its own) and RGBA endpoints of 7 bits, as many as fit; a transparent
  texel takes the darker color where DXT's is black.
- The endpoints are ordered so that the decoder does not swap them and
  blend blue into the others.

DXT3 and DXT5, whose alpha does not fit beside full colors, are decoded as
before, as are volume textures, the web, and GPUs with S3TC or without
ASTC. display.dxt1_astc (Android only, true) turns it off.

On the four maps measured for the earlier encoder (928 of 1,469 DXT
textures DXT1), DXT1's GPU memory goes from 287 MiB to 72 MiB, all
textures' from 439 MiB to about 224 MiB.

Checked: a one-off check, not
kept, decoded 65,536 blocks with astcenc 5.7.0's decoder: no invalid
blocks, colors within 2 of the
game's DXT1 decode, alpha exact. ninja android builds; the CI test suite
passes. Not run on a device.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 04:43:36 -07:00
bnunu fbc71b42de Merge pull request #461 from bnunu/fix-vehicle-set-strings
Show the PC vehicle set's name and help instead of <missing string>
2026-10-23 07:16:08 -04:00
MrBruh cfb212fed9 Add SWAT, Infection, Gun Game and Hardcore as OpenCE gametypes in their own OPENCE bank of Select Gametype, with an OPENCE OPTIONS screen in the gametype editor. 2026-10-23 23:55:39 +13:00
bnunuandClaude Opus 5.5 782f4ce1bd Show the PC vehicle set's name and help instead of <missing string>
Vehicle Options' VEHICLE SET spinner indexes its strings as the sets 0
to 7, then PC (8) and CUSTOM (9) (menu_functions.c's VEHICLE_PRESET_PC
and VEHICLE_PRESET_CUSTOM), but its list had no PC: a side whose set is
CUSTOM showed "<missing string>", and one whose set is PC showed CUSTOM.

6b1d81c7 added the PC string to strings.xml by hand, and f97b3339 made
strings.xml again with tools/ce_menus.py, which wrote only what
port_settings.py says, so it went. It is now one of port_settings.py's
STRING_INSERTS, where making strings.xml again keeps it, and so is its
help: the helps are the rows' values' in turn (gametype_option_help),
so without one, PC showed CUSTOM's help, CUSTOM the first vehicle
count's, and every count the one before its own.

tools/harness/tests/test_vehicle_set_strings.py checks that the list has
the code's sets, that each value has its help, and that strings.xml has
port_settings.py's inserts. On testing, all three fail.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 03:10:44 -07:00
bnunu f1066974ca Merge pull request #453 from chestahh/opence-customedition-hudfixes
Fix Custom Edition custom HUD placements, textures and bitmap rendering
2026-10-22 18:55:32 -04:00
chestahh 384d9ba5d0 Fix Custom Edition HUD replacements, meters and gameplay prompts
Match stock CE resource sheets by pixel identity and translate stock meter
redraws to CE layouts. Preserve custom artwork, correct mixed-use meter
channels and warning placement, and draw aligned controller glyphs with
High-Res HUD enabled or disabled. Scope Bigass Open v1.1 ammo changes to
its known map name and checksum.

Based on OpenCE testing 4cb621cd. Keep upstream Android texture ownership,
eviction and validation unchanged; use its residency helper in the new
stock CE upscale lookup. No unrelated main-branch commits, networking
changes, regression test files or investigation documents are included.

Validation: Windows portable release build passed; 175 local CE HUD and
Android regression checks passed, 4 asset-dependent checks skipped.
Additional residency checks cover Android-managed pixels, desktop cache
entries, identity rejection and map reset. git diff --check passed.
Android/Web targets are unavailable in this Windows build graph; no new
runtime gameplay validation was performed for this rebase.

Player-Note: Fix Custom Edition HUDs, ammo counters and prompts while preserving custom artwork.
2026-10-22 23:47:28 +01:00
bnunu 4cb621cd26 Merge pull request #450 from OpenCommunityEdition/fix-scenery-shields-network
Scenery shields break, and tripmines go off, for clients as for the host
2026-10-22 18:25:20 -04:00
Stefan MaierandClaude Opus 5.5 4e9de9a11c Merge upstream/main (2026-10-22): co-op script fixes, cached high_res_hud, menu cursor
Network version stays 32. The conflict in D3DDevice_Present: the swap
stays in the window's branch (VR presents through vr.c); upstream's
visibility_read_batch, after the swap, is desktop GL only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 19:23:25 +02:00
GuvenandClaude Opus 5.5 4ab042e144 The stale player damage test's world has static_target_damage [skip ci]
test_stale_player_damage compiles network_damage_deals from the sources,
which now asks static_target_damage whether damage is a static target's
own; its world had static_target but not that, so the test no longer
compiled (the Linux job's failure since the tripmine commit). Its world has
no static targets, so no damage is one's own.

Checked: test_stale_player_damage and test_static_target pass (33); the
whole harness on Windows fails the same 245 environment-bound tests as
testing, no others.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 14:05:58 +01:00
GuvenandClaude Opus 5.5 962c3eca45 A client's hit on its own copy of a tripmine reaches the host's
A tripmine (Altis94's Bigass) is scenery a grenade's effect makes, so each
machine makes its own copy, at an index of its own: the map's scenery is at
the same index everywhere, but such an object need not be. A client's hit
on its copy named an index at which the host had no such object, and was
refused: clients could not shoot their own tripmines to set them off. And
the host's damage to its copy named an index the client had none at, so the
client's copy did not break or go off on its screen.

A machine given another's index of a static target it has no object at
now takes its own nearest static target where the other had it
(network_damage.c's static_target_near): the host, for a client's hit, its
nearest to where the client had the target, within the target's size and
STATIC_TARGET_MATCH_TOLERANCE (a world unit), and then checks the hit as
any other; a client, for the host's damage, its nearest to the damage,
within REPORT_IMPACT_TOLERANCE and an explosion's radius. The map's
scenery, at the same index everywhere, is found by its index as before.
Part of network version 34 (no message changes); NETCODE.md says so.

Checked: the Windows build; network_format.py; test_static_target with
cases of the nearest static target where another machine had one, none
out of reach, no unit or unbreakable scenery, and the nearer of two, and
two negative controls. Not yet checked in a game: a client shooting its
own tripmine, and seeing the host's go off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 13:52:25 +01:00
bnunu ce95f7deed Merge pull request #424 from eltanschauung/fix/coop-a10-softlock
Fix co-op Pillar of Autumn softlock glitch
2026-10-22 08:36:58 -04:00
bnunu a20ced034c Merge branch 'main' into fix/coop-a10-softlock 2026-10-22 08:36:44 -04:00
GuvenandClaude Opus 5.5 ef0e3be45b The host deals a client's player's tripmine going off under its vehicle
A tripmine a client's player throws (Altis94's Bigass) is scenery the
grenade's effect creates, owned by the thrower, so the explosion of its
shield breaking is theirs too. The host deals no damage of a connected
client's player's but what that client reports, and this explosion went
off where the host had it, its vehicle running over the tripmine, so no
client had a hit of it to report: the host's vehicle drove over a client's
tripmine unharmed, though a host's tripmine hurt clients.

What a static target deals itself (network_damage.c's
static_target_damage: the damage's owner object scenery or a device that
damage can break) the host now deals whoever owns it, and a client does
not report it, so that it is dealt once. Part of network version 34 with
the shields' sharing before it; NETCODE.md says so.

Checked: the Windows build; network_format.py; test_static_target with a
case of a tripmine's own damage, a destructible scenery's, a unit's or
projectile's, and none, and a negative control. Not yet checked in a game:
a client's tripmine under the host's vehicle, and whether the client sees
its own copy of that tripmine go off (a tripmine is made in the game, so
it need not be at the host's index on the client).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 13:35:58 +01:00
GuvenandClaude Opus 5.5 5744d2d174 Clients break and see broken the map's scenery shields, as the host does
A scenery or device whose shield is all damage can break (Rat Race's
energy shields, the tripmines of Altis94's Bigass) was no static target
of the netcode, which took only those with a body to destroy
(network_damage.c's static_target). So a client's hits on it were never
reported to the host and the host never sent its damage: clients could
not break the shields, and when the host broke one, clients still saw it
and stood on it while the host saw them floating.

static_target now takes those with a shield too. The host sends its
damage to them, as to destructible scenery, and takes clients' hits on
them. Clients, which otherwise run no object's shields but take the
host's state of them, run these objects' shield stun and recharge
themselves (damage.c's objects_update_shields), since the host sends no
state of the map's scenery: each machine deals the same damage and
recharges the same way, so the shield's regions go and come back on
every machine.

Network version 34: a host and a client must agree on which objects'
damage is shared. NETCODE.md says so and network_format.txt is recorded
for 34.

Checked: the Windows build; the new harness test test_static_target (a
body, a shield only on scenery and on a device, neither, a unit, no
object, and three negative controls, one the old rule); the whole harness
on Windows fails the same 245 environment-bound tests as testing does,
no others; network_format.py. Not yet checked in a game: a client
breaking Rat Race's shields and Bigass's tripmines, and seeing the host's
broken and recharged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 12:33:06 +01:00
bnunu fc22e8467d Merge pull request #442 from bnunu/cache-high-res-hud-setting
Read display.high_res_hud once per settings change, not at every bind
2026-10-22 06:56:16 -04:00
bnunu 9a1160573f Merge pull request #449 from OpenCommunityEdition/coop-ally-friendly-fire
Co-op hosts can make the players' AI allies immune to their fire
2026-10-22 06:49:23 -04:00
GuvenandClaude Opus 5.5 1d38b3f936 Co-op hosts can make the players' AI allies immune to their fire
Server Setup's Co-op Options has ALLY FRIENDLY FIRE
(network.coop_ally_friendly_fire), ON by default as in the campaign. OFF,
the players' weapons, grenades, melee and vehicles do their AI allies no
damage, so that no player can kill Captain Keyes on Truth and
Reconciliation, the Marines, or the other allies a level needs. The AI's
own hits of its allies, the enemies' damage, and FRIENDLY FIRE between
players are unchanged. A hit is the players' when its owner is a player
and the victim is a friendly unit that is no player's, so friendly-team
vehicles are immune to the players too, splatter included. An ally that
cannot die cannot raise an allegiance incident, so the players cannot turn
the Marines hostile either.

The rule is in game_engine_friendly_damage (game_engine.c), which only the
host's damage reaches: a client's hits are the host's to deal. The host
sends the choice with the game's settings, as bit 1 of network_game's
cooperative_flags beside PLAYER COLLISIONS', so network version 33: a
client of version 32 would play the game's settings without it. NETCODE.md
says so, and network_format.txt is recorded for 33.

The menu row is tools/port_settings.py's (COOP_SETUP_SCREENS); only the
server settings screen was written again. Its 8 rows fit above the help
area.

Checked: the Windows build; the harness tests, the new
test_coop_ally_friendly_fire (a player's hit of an ally ON and OFF, the
AI's own hit, players' friendly fire in every mode, no unit, the campaign
without co-op, and four negative controls) and test_coop_scaling_menu with
the eighth row; network_format.py; the Co-op Options screen drawn with the
row; and in play as the host on a10 and a50 (Keyes and the Marines
unharmed with OFF) and b30 (no splatter). Not yet: a client's hits online,
d20's ending, c20's Sentinels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 10:45:03 +01:00
John CranstonandClaude Fable 5.1 a689a8a3fa Unbind the read framebuffer before the swap, for OBS's game capture.
The renderer left the back buffer's render target bound as the read
framebuffer after the display blit. OBS's game capture copies the window
from the read framebuffer bound in the context at SwapBuffers, so it copied
that render target, which is drawn top row first, and the recording was
upside down. Recorded with OBS 32.2.2 before and after: upside down, then
upright.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-22 01:58:46 -07:00
bnunuandClaude Opus 5.5 038252b1ae Read display.high_res_hud once per settings change, not at every bind
texture_entry_result, reached from every texture bind (even the recent
table's fast path in xgpu_texture_get), called
config_boolean("display.high_res_hud"): the settings' lock and a strcmp
over every setting's name, about 2000 times a frame. It is now read again
only when config_changes() moves, as the renderer's other settings are
(per_pixel_lighting in d3d8_gl.c). config_write, the only writer once the
settings are loaded, counts each change, so a change in the menus takes
effect at the next bind as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 19:48:16 -07:00
bnunu 61621e6513 Merge pull request #435 from bnunu/halo-ce-universal/menu-cursor
The menus show a blue arrow cursor in place of the system's
2026-10-21 19:41:11 -04:00
bnunuandClaude Opus 5.5 1d79584ea4 Hide the menus' cursor while a controller is used
The menus turn the pointer on whenever they are up, so a player on a
controller had the arrow left in the middle of the screen until the menu
closed (as with the system's cursor before). Now a controller's button,
or a stick or trigger past its rest (8000, as gamepad_idle has it), hides
the cursor while a menu is up, and the mouse moved or clicked shows it
again. A menu opened while the controller was used last opens without
it: platform_ui_pointer_set_active hides it again after the release's
SDL_ShowCursor.

The warps are not taken for the mouse being used: the one to the middle
as a menu opens (SDL reports it as motion), and the ones back to where
the mouse is held without relative mode. Hidden, the cursor cannot move
the focus, so the d-pad keeps it. Desktop builds only, as the cursor.

Checked: the new functions built with clang -Wall -Wextra -Werror
against SDL 3.4.16 and run on Windows (a controller hides the cursor in
the menus, not in play; the mouse shows it again). The whole game not
built here, nor played with a controller.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:40:04 -07:00
bnunuandClaude Opus 5.5 577f718a63 Put the menus' cursor's click point on the arrow's tip
The picture's arrow has a soft edge, so its tip is at (2, 2), not the
picture's corner, where the click point was. MENU_CURSOR_TIP is scaled to
the cursor's size with the picture (rounded): (1, 1) up to 1080p, (2, 2)
at 1440p and 2160p. From GuvenHuso's review.

Checked: built with clang -Wall -Wextra -Werror against SDL 3.4.16 and
run on Windows from 640x480 to 3840x2160, the click point SDL kept read
back at each size.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:32:10 -07:00
bnunuandClaude Opus 5.5 b68d259c81 Size the menus' cursor to the window, as Halo PC's was
Halo PC drew its cursor in the menus' 640 x 480, so it took the same part
of the screen at any resolution. The cursor was a fixed 20 x 29 (or SDL's
scaling of it on Windows), small at 1440p and 4K. It is now 32 of the
menus' 480 lines tall: 48 pixels at 720p, 72 at 1080p, 96 at 1440p, 144 at
2160p. The lines are the window's height, or for a window narrower than
4:3 its width's three quarters, and the cursor is never under 16 pixels.

menu_cursor_fit makes it from the embedded picture (halved while that is
twice the height or more, then scaled once) and is called at window
creation and at every event pump, where it does nothing unless the
window's size in pixels has changed: resizes and fullscreen toggles
follow. With a pixel density above 1 (macOS, Wayland at a scale) the
cursor is made at its size in points with the pixels' image as its
alternate; SDL_HINT_MOUSE_DPI_SCALE_CURSORS is no longer set, since the
size already comes from the window's pixels.

Checked: the new functions built with clang -Wall -Wextra -Werror
against SDL 3.4.16 and run on Windows at 640x480 to 3840x2160 (cursors
22x32 to 99x144, one made per size change and none when the size is the
same). The cursor SDL makes on Windows matches the picture's rows (the
upside-down arrow seen in an OBS recording was OBS's). The whole game
not built here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 16:03:37 -07:00
bnunu 600edf7bb9 Merge pull request #433 from hkmodd/fix/visibility-readback-nosync
Ask the driver nothing before the swap in the visibility readback
2026-10-21 18:55:09 -04:00
bnunu 0b3b6f0749 Merge pull request #432 from chestahh/opence-android-customedition-fix
Fix Android rendering bugs on Custom Edition maps
2026-10-21 18:31:16 -04:00
bnunu 343716689d Merge branch 'testing' into opence-android-customedition-fix
# Conflicts:
#	.github/workflows/build.yml
2026-10-21 15:23:21 -07:00
Stefan MaierandClaude Opus 5.5 35554cd243 Rename the mod to Mjolnir VR
"Ringfall" is another game's name. Every name players see is now
"Mjolnir VR": the app, the Steam Frame installer and shortcut, the logo
(tools/mjolnir_art.py, was ringfall_art.py), the release's title and
assets (MjolnirVR.apk, mjolnir-vr-android-*.zip,
mjolnir-vr-steam-frame.zip, Install-Mjolnir-VR.desktop), the docs. The
updaters look for Cesarus85/mjolnir-vr, the repository's new name
(GitHub forwards the old one).

Builds 302 to 313 keep working: every release also carries its assets
under their old names, which those builds' updaters and the links
already shared ask for. Kept as they were: the app id, the signing key's
alias, the Steam Frame's ~/Documents/RingfallMjolnirVR and the file
names inside its bundle (an installed game's Steam shortcut starts the
launcher there). The Frame installer now also refreshes the library
pictures of a shortcut that is there already, and says how to rename a
shortcut still called "Ringfall: Mjolnir VR".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 21:01:25 +02:00
hkmoddandClaude Opus 5.5 a0f22cbba7 Ask the driver nothing before the swap in the visibility readback
The desktop readback through the query buffer (711aa46d, aecdd895) asked
the driver for answers at every present before the swap: a GL error three
times, a fence's state once a batch, and a flush. A threaded driver
(NVIDIA's) answers only once its thread has carried out every command
queued before the question, here the whole frame just drawn, so the
render thread stopped working ahead of the driver at every frame. Build
220's readback asked nothing.

Now a batch is sent before the swap and read after it:

- visibility_send_batch, before the swap, writes VISIBILITY_UNCOPIED over
  the batch's places in the coherent mapping, sends the copies and a
  fence, and asks nothing. GL errors are asked for with debug.gl_debug
  only, as the renderer's other per-frame checks are, and the glFlush is
  gone: the swap sends the commands.
- visibility_read_batch, after the swap, reads a batch only once its
  fence has passed (glClientWaitSync with GL_SYNC_FLUSH_COMMANDS_BIT and
  no wait), so completion is still known from the fence; the batch sent
  that present is looked for from the next one. A batch the GPU is late
  with is waited for however long; none is given up on. A place that
  still holds VISIBILITY_UNCOPIED after the fence is a copy that failed,
  seen without asking for GL errors.
- A batch whose copies or fence failed is dropped, as before, and from
  then on the counts are read from each query, as with AMD's driver: a
  dropped batch is not used again, and with the buffer the readback would
  stop once all three had been.

AMD's CPU readback, the counts, the batches and the query ownership from
711aa46d are unchanged.

Checked: tools/harness/tests/test_visibility_readback.py, 5 cases and 7
negative controls. On the code before (its readback taken as the send,
before the swap), 2 cases fail: the driver asked 46 times before the swap
in 12 presents, and a count that was never copied taken for one.
A 4-machine a50 co-op on an RTX 4080 (Windows, 1440p, 4x MSAA,
debug.gl_debug), 120 seconds: 13000 batches sent and 13000 read, every
fence passed by the next present (none unavailable), no GL error, none
dropped, the buffer used throughout, 8649 nonzero counts. The harness
suite fails the same tests with and without the change (those that need
POSIX headers, on Windows). The Windows release build compiles.

Not checked: Linux, Mesa, Intel, AMD (whose path changes only in being
read after the swap), and a 32-player co-op game.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 18:23:30 +02:00
bnunu 9f04a51259 Merge pull request #429 from eltanschauung/fix/coop-gravity-lift
Fix co-op gravity lift soft lock glitch
2026-10-21 05:35:42 -04:00
bnunu 1ea29f7675 Merge pull request #419 from chestahh/opence-android-render-fix
Fix Android geometry & graphics corruption by bypassing the persistent geometry cache
2026-10-21 03:42:24 -04:00
Jonas VolmanandClaude Opus 5.5 47981601da Credit pugzysixtyfour for the menus' cursor (#435)
The blue arrow cursor this pull request adds (port/assets/cursor) is
pugzysixtyfour's art. AUTHORS.md says so beside the other art credits.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 23:49:00 -07:00
Jonas VolmanandClaude Opus 5.5 a4e4bd8317 The menus show a blue arrow cursor in place of the system's.
With a mouse, the menus' pointer (platform_ui_pointer_set_active) was the
system's cursor. The game window now has a cursor of its own:
port/assets/cursor/menu_cursor.png, an 80 x 116 blue arrow with a
transparent background, embedded by tools/embed_assets.py as the window
icon is and made into an SDL colour cursor when the window is created.

At 100% display scale the cursor is the picture at a quarter of its size
(20 x 29, by two halvings); the picture itself is the alternate image SDL
scales from at larger display scales (SDL_HINT_MOUSE_DPI_SCALE_CURSORS,
which SDL implements on Windows). The hot spot is the arrow's tip, the
picture's top-left corner.

Desktop builds only: the code sits beside the window icon's, so Android
and the web keep theirs. The cursor shows wherever SDL shows one over the
window, which is the menus' pointer, the scoreboard's and a mouse freed
with F12; in play the mouse stays captured and hidden as before.

Checked on Windows: the build, and one start to the main menu with a
hidden window. A check line (not in this commit) logged the cursor made
and active, 20 x 29 with the 80 x 116 alternate, and saved SDL's 20 x 29
image, which looks as intended. Not built here for Linux, where SDL uses
the 20 x 29 image at every display scale.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 23:40:55 -07:00
s3anyboy d97c98c726 Recon and fishsticks
add controller layouts
2026-10-20 21:13:43 -05:00
chestahh 3975480a3b Fix Android Custom Edition texture residency and draw state
Keep synchronous cached CE pixels and hardware headers at stable addresses
outside the fixed Xbox arena, bounded to 128 MiB and 8192 entries. Only
older-frame textures can be evicted; unregister bindings, GPU copies and
channel annotations before freeing, including map/bitmap teardown and flush.
Preserve the original readers, conversion, normal GPU caching and HUD
replacement behavior. Refresh Android GL shadow state before each draw.

Keep the player-tested Android streaming geometry bypass and its regression
tests, since current upstream main does not contain that fix yet. Desktop
and web preserve their cache, upload and draw-state behavior. No fullscreen,
simulation, networking or map-format changes are included.

The engine-owned bitmap getter and teardown require small source hooks,
each marked port:. The renderer admits heap pixels only through a registered
header and validates the resource extent against its allocation. Diagnostics
are limited to unload summaries and the first allocation warning per lifetime.

Device evidence: the tester reports correct rendering and stable FPS, with
zero allocation failures, fallback substitutions or evictions across four CE
visits on Mali-G615 and 87.5 MiB peak residency. Local tests cover stable
uploads, bounds, OOM, frame locks, eviction, cleanup, HUD residency, reduced
diagnostics, normal write tracking, Android-only state refresh and geometry
streaming. All 30 upstream-focused checks passed before final CI validation.
Full Android/web builds require CI because local targets are unavailable.
No fork packaging, branding, map adapters or unrelated changes are included.

Player-Note: Fix Android Custom Edition texture corruption and repeated cache upload hitches.
Player-Note: Prevent stretched or missing geometry on Android by streaming geometry directly.

(cherry picked from commit 4ac4685b96c39b20491095579ce469f8afcd2d3c)
2026-10-21 01:27:08 +01:00
Stefan MaierandClaude Opus 5.5 d4687b24e2 Merge feature/bots-ladders: OpenCE network version 32 (HDR off in VR, Ringfall's host bots kept), bots climb ladders and take partial paths
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 22:05:49 +02:00
Stefan MaierandClaude Opus 5.5 9d65e7e63f Roadmap: network version 32, bots' ladders and paths
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 22:05:48 +02:00
Stefan MaierandClaude Opus 5.5 f3ce8c3bf0 Bots: paths to as near the goal as the search reaches; the goal's floor looked for deeper; ladders for goals above
On Damnation two of three of the bots' path searches failed (1078 against
527 in 80 s), and the goal's floor was not found 357 times: a search had
to reach the goal's surface itself, and the floor under the goal was
looked for 3 world units down. As OpenCE's bots do (bots.c), a search now
goes to as near the goal as it reaches (the bot searches again from
there), and the floor is looked for 6 units down. A path that ends short
of a goal above the bot takes a ladder near it (now within 8 units).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:44:14 +02:00
Stefan MaierandClaude Opus 5.5 bce5c2b560 Bots climb ladders (Damnation's), which the game's pathfinding does not take
A bot whose way is not found twice running, or that is stuck, with the
foot of a ladder going up within 5 world units, walks to the foot, turns
to the ladder and walks into it (as a biped climbs a climbable surface,
bipeds.c), and on past its top a moment; then it finds its way anew. Ten
seconds without getting up, it gives that up for fifteen. The ladders are
the level's climbable upright surfaces, near ones facing alike merged,
found the first time one is wanted in a game. Reported: bots stuck in a
gap of Damnation's that only a ladder leads out of.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 21:29:10 +02:00
eltanschauung 9044950d78 Remove unused co-op script test counter (#429)
The CI compiler treats -Wunused-but-set-global as an error. list_count was incremented by the fixture but never read, so remove it instead of weakening compiler warnings. All 12 targeted regressions, including their negative controls, pass. This changes test code only.
2026-10-20 14:23:46 -04:00
eltanschauung 9d7436bd64 Fix co-op gravity lift teleports for extra players
Match the reverse unit order of hs_players when selecting player0 and followers. The forward datum-order assumption returned no followers, leaving players beyond the two named by a50's lift script in the unloaded outdoor BSP.

Tested the actual a50 transition with a host and two clients, including the played and skipped cutscene placement sequences and settled floor positions. Regression coverage exercises 0-128 players, sparse/dead/recycled slots, output bounds, host authority, and every follower action, with negative controls. Windows and Linux release builds pass. This is host-side placement only; the network protocol is unchanged.

(cherry picked from commit 51abcfff9968eee5b91de2bba9d273b70be91850)
2026-10-20 13:25:38 -04:00
Stefan MaierandClaude Opus 5.5 8097ac23b0 Merge OpenCE upstream: network version 32, HDR, model detail, texture filtering, co-op options, aim assist policy, its local bots, 5.1 sound
Ringfall's side of it:
- The bots: OpenCE's own (bots.c, a local split screen game's) are not
  used in VR builds (their lobby hook would take Ringfall's host bots
  off, and their bots.count and bots.skill differ); Ringfall's are now
  host_bots.c, so that OpenCE's bots.c merges as it changes. Each
  platform's bots.count and bots.skill are its own (config_setting_index
  takes this platform's of two of a name).
- HDR is never on in VR (d3d8_gl.c); the flat window's present is
  OpenCE's, inside the VR port's branch for it.
- The VR frame begins where the events are pumped (sdl_platform.c), as
  before, now that exit_after_check is apart.
- The message numbers: OpenCE's aim assist policy (90) before the VR
  port's poses (240), which stay last.
- The visibility counters keep the VR port's snapshot ring (both eyes'
  counts halved); OpenCE's tone mapping goes before the antialiasing, off
  the VR eyes' pass.
- Join codes, the online list and OpenCE's probes all in the signalling
  topics; the HUD's PNG helpers both ways; the disc import keeps the
  language file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-20 19:10:30 +02:00
bnunu 9662f0f6cb Merge pull request #426 from OpenCommunityEdition/readme-rewrite 2026-10-20 08:44:33 -04:00
bnunu 951b8387dd Merge pull request #425 from OpenCommunityEdition/readme-rewrite 2026-10-20 08:34:08 -04:00
Guven a84f8c87f9 Rewrite the README to name OpenCE and include latest features
Previously the README did not name OpenCE, list what the port adds, or say what players need before they start. It now leads with that and moves the developer material to the end. 

- An introduction naming OpenCE (Open Community Edition), with the icon, Download / Play in browser / Discord buttons and an updated screenshot of the latest version.
- The disc image comes first, then the downloads, with a Guide column linking each platform's README in place of the Platforms section.
- Multiplayer, Custom Edition maps (with Halo PC's own maps), mods, and a table of the graphics options and their defaults.
- Testing, optimisation profiles and profiling builds under "For developers".
- Credits naming the upstream projects and main contributors.
- A disclaimer that OpenCE is an unofficial fan project, as on the web site.
2026-10-20 12:57:20 +01:00
eltanschauung cdce33647a Fix co-op Pillar of Autumn softlock glitch
A co-op ALL-player trigger could advance after an unchecked teleport, or while (players) was empty during respawn. Pillar of Autumn then permanently closed its blast door with players still outside.

Preserve player-list provenance in the existing unused header word, block empty or unavailable player-list waits only on the co-op host, and recheck all arrivals after gathering. Use the existing crowd fallback and restore rejected placements instead of leaving a player outside the volume or on a BSP switch. Empty AI lists, non-waiting tests and non-host behavior retain their semantics; no network message or protocol changes.

Validated with 17 production-source gate tests and negative controls, covering 1-128 players, failed or displaced teleports, BSP boundaries, retries, list reuse, allocation failure and empty AI/player lists. Windows and Linux release builds and the full local regression suite pass.

(cherry picked from commit 49b4716c4be187a16800300671221a964094e6fb)
2026-10-20 07:25:20 -04:00
chestahh 34c17f11fc Use streamed geometry on Android to prevent cache corruption
Affected Android players report that the cache-bypass APK resolves stretched
and missing geometry, with some also reporting better performance. Decline
persistent vertex/index mirror requests on Android so draws use the existing
streaming fallback and current CPU index extents. No settings are needed.
The exact cache failure mechanism remains unconfirmed.

Keep streaming uploads, frame fences, shaders, texture caching and CPU write
tracking unchanged. Desktop and web retain their existing cache paths.
Xbox and Custom Edition loaders are unchanged. No simulation or network
protocol change is involved.

Carry the focused fix onto OpenCE main without fork history. Resolve the CI
entry against upstream's existing test list and omit fork-only documentation.
Add real-source Android, GLES, desktop and web regression controls, including
large/reused ranges, counter rollover and negative controls. All 33 focused
checks passed locally; the resolved files match the tested adaptation.
Local configure cannot fetch SDL3 and has no Android/web targets; CI must
perform full builds. Device evidence is player feedback on the bypass APK,
not a new on-device or cross-platform multiplayer run of this revision.

Player-Note: Prevent stretched or missing geometry on Android by streaming geometry directly.

(cherry picked from commit ea85578bf80c8d937b8c66704aff6cf6aa96e68b)
2026-10-19 20:21:06 +01:00
Stefan MaierandClaude Opus 5.5 c8dfd3773f Merge merge/upstream-agpl: OpenCE upstream under the AGPL 3.0 or later, Ringfall with it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 18:29:39 +02:00
MrBruh 6ec42856d7 Merge pull request #417 from OpenCommunityEdition/testing
Merge Testing
2026-10-20 03:29:18 +13:00
MrBruh 399ead3f46 Keep SETTINGS in network co-op's pause menu and add FRIENDLY FIRE after it (#319)
#319 put FRIENDLY FIRE in place of SETTINGS, written when co-op's pause
menu had no SETTINGS; testing now gives network co-op SETTINGS through the
campaign's pause menu, so as merged co-op lost it. pause_list_patch now
adds SETTINGS always, then END GAME for a multiplayer host or FRIENDLY FIRE
in network co-op (still two buttons, the four tags reserved), and
pause_settings_patch runs in co-op again. Six rows at the PC pitch need a
box 66 taller than the stock 159, which had no frame (only 195, for five),
so tools/port_settings.py draws the pause and objectives boxes at 225 too
(the same redraw), and pause_campaign_grow_box picks the frame by height.
Single-player and split-screen pause menus are unchanged.

Checked: menu_tags.c and menu_functions.c with -fsyntax-only for Linux,
the Android guest and the web; tools/harness and test_touch_menu.py pass.
On Xvfb, d40 with co-op forced in a local build showed the six rows and
the 225 box with the prompts under them, FRIENDLY FIRE switching
network.coop_own_friendly_fire; a10 still logs five rows (36 more, 195)
and bloodgulch SETTINGS. No network game was run.
2026-10-20 03:12:34 +13:00
MrBruh d49973e426 Draw each permutation's most detailed level, and a model's inside only from within, at native and highest model detail (#344)
"highest" chose level 4 for every model, and render_model_parts draws
nothing for a permutation without geometry there, so those parts
disappeared; and a10's cryotube's top level (a cutoff of 3000) is its
inside only, which "highest", and "native" at 4K, showed from outside.
With display.model_detail other than "stock", each permutation now draws
its most detailed level at or below the model's that has geometry, and a
level with a cutoff over 1000 only while the camera is inside the model's
bounding sphere (port/linux/game/model_detail.c), from eltanschauung's
#282. "stock" draws the model's level as before; so does
rasterizer_debug_model_lod.

Checked: python -m pytest -q tools/harness (#282's lod-* cases in the
transparent enclosure test and its interior, bounds and permutation cases
in test_model_detail.py, with negative controls); models.c, d3d8_gl.c and
model_detail.c compile (-fsyntax-only) with the Linux, Android guest and
web commands.
2026-10-20 02:30:11 +13:00
MrBruh 575f69d2a3 Leave a hit on an overshield its own effect when that effect must be deterministic (#320)
Such an effect draws from the game's random seed, which every machine must use alike; played in place of the projectile's own on this machine only, it would change how the seed is used there (on a host, for everyone). overshield_effect_hit_effect_allowed refuses it, with effects.c's flag bit named where its enum cannot be reached. Checked: overshield_effect.c compiles without warnings.
2026-10-20 02:17:01 +13:00
MrBruh 79ff0cb1ee Keep the passengers' third-person view to the campaign and co-op (#368)
Seeing around the vehicle from behind it is an advantage the other players of a multiplayer game do not have (raised in the PR's review), so reference_seat refuses while a game engine runs. The README row and the menu help say so. Checked: passenger_camera.c compiles without warnings; the FOV and Viewmodels screen written again by port_settings.settings_files() is the one committed.
2026-10-20 02:16:16 +13:00
MrBruh 2f625ae360 Filter textures as the Xbox does unless anisotropic filtering is chosen (#343)
display.anisotropic_filtering defaulted to 4, which changes the stock look on every platform, phones included; the rules want a departure from stock to be chosen, and the author offered 0. The setting's comment, its README row and the TEXTURE FILTERING help (no longer "4X costs very little") say so. Checked: the Graphics screen written again by port_settings.settings_files() is the one committed.
2026-10-20 02:15:30 +13:00
MrBruh c97a2d124c Play stereo unless 5.1 is asked for, and copy the 5.1 mix's channel count into the sound tests (#341)
With audio.channels "auto" by default, a desktop whose device reports six or more channels (an HDMI sink, a virtual 7.1 headset) changed its mix unasked; the rules want a departure from stock to be chosen, so the default is "stereo", and an unknown value plays stereo too. audio_start set audio_device_name twice. tools/harness/audio.py copies MAXIMUM_OUTPUT_CHANNELS, which the 5.1 mix's structures now use, so the sound stream tests compile again. Checked: dsound_sdl.c compiles without warnings; the harness's sound tests pass.
2026-10-20 02:14:47 +13:00
MrBruh 218f629535 Give the elevator correction test the latency meter's call its function now makes (#371)
distributed_correct_own_unit now times the host's echo of a prediction for the latency meter (distributed_note_own_round_trip), which tools/harness/tests/elevator_correction.c, taking the function from the source, did not declare, so it did not compile. Checked: test_elevator_correction.py passes (14).
2026-10-20 02:12:53 +13:00
MrBruh ab72ff14db Merge pull request #319 from bnunu/halo-ce-universal/coop-own-friendly-fire
Co-op players choose their own friendly fire, and one away is hurt by all

Network version 32, which #257's policy raised and this has not been pushed apart from, also carries the friendly fire choice in a client's input (network_format.txt recorded again).
2026-10-20 02:07:22 +13:00
MrBruh 31ba6b37d8 Raise the network version to 32 for the host's aim assist policy, and declare main_menu_is_active where it is called (#257)
The policy is a new distributed message (90) that a client must not ignore, so machines without it cannot play with those that send it: HALO_PORT_NETWORK_VERSION goes from 31 to 32, with its line in NETCODE.md's versions and port/linux/network_format.txt recorded again. network_aim_assist.c called main_menu_is_active without interface/ui_widget.h, so C89 took it as returning an int. The setting's README row moves to the network.* rows. Checked: network_format.check() is clean, test_linux_port -k network_format and the aim assist harness tests pass, network_aim_assist.c compiles without warnings.
2026-10-20 02:04:53 +13:00
MrBruh f8620d62b0 Merge pull request #257 from eltanschauung/feature/host-aim-assist
Add multiplayer host aim assist options

The aim assist policy's message is 90: testing's text chat took 87 to 89.
2026-10-20 02:03:25 +13:00
MrBruh c593ee4478 Give the co-op options menu's test the text chat row its function now holds at OFF (#322)
On testing, gametype_option_help also holds TEXT CHAT at OFF while the game is listed (TEXT_CHAT_SPINNER, TEXT_CHAT_OFF, p2p_hosting_listed), which the PR's harness test, written before it, did not declare, so coop_scaling_menu.c did not compile. Checked: python -m pytest -q tools/harness -k 'pickup or vehicle or coop or scaling or menu' passes (58).
2026-10-20 01:58:33 +13:00
MrBruh 9f89f9253d Merge pull request #322 from eltanschauung/feature/coop-extra-pickups-and-vehicles
Add extra pickups and vehicles options for co-op hosts
2026-10-20 01:57:38 +13:00
MrBruh 22f8beb771 Merge pull request #367 from BirchWoodGod/feat/bots-core
Bots for local Slayer games (bots.count, off by default)
2026-10-20 01:56:14 +13:00
MrBruh ad0c99d753 Merge pull request #371 from BirchWoodGod/feat/latency-meter
Latency meter for network games (display.latency_meter, off by default)
2026-10-20 01:55:37 +13:00
MrBruh 733cd78a1e Merge pull request #341 from frankyfife/audio-aniso
Add 5.1 surround sound
2026-10-20 01:54:44 +13:00
MrBruh 11abcf65f3 Merge pull request #280 from hkmodd/feature/hdr
Add opt-in HDR rendering with tone mapping (display.hdr)
2026-10-20 01:53:52 +13:00
MrBruh d265c2ad41 Merge pull request #344 from OpenH1/model-detail
Models' level of detail can be chosen by the display's resolution
2026-10-20 01:53:12 +13:00
MrBruh 59b1ea7548 Merge pull request #343 from OpenH1/anisotropic-filtering
Anisotropic filtering, 4x by default
2026-10-20 01:52:40 +13:00
MrBruh b83e8b5a5d Merge pull request #320 from jcompto95-tech/overshield-effect
Animated overshield
2026-10-20 01:52:23 +13:00
MrBruh 9f024543b7 Merge pull request #336 from jcompto95-tech/extra-effects-menu
Video Setup: an Extra Effects Sub menu
2026-10-20 01:51:36 +13:00
MrBruh 9f4c675c32 Put the match clock's row on Graphics through the generator, and document display.match_timer (#364)
The PR's Graphics screen was edited by hand: tools/port_settings.py did not name display.match_timer among the Graphics rows, so the generator put MATCH TIMER on Video Setup's own screen, and test_web_build's check that the menus match their generator failed. The setting gets its row in the settings table of port/linux/README.md. Checked: the screens written again by port_settings.settings_files() are the ones committed.
2026-10-20 01:51:15 +13:00
MrBruh 801d51c9ae Merge pull request #364 from medic-code/feat/match-clock-opt-in
Opt-in match clock on the multiplayer HUD
2026-10-20 01:49:42 +13:00
MrBruh ede2a251fb Merge pull request #368 from biu788/feat/passenger-third-person
Add optional third-person view for Warthog and Scorpion passengers
2026-10-20 01:49:41 +13:00
MrBruh 54c52c84e3 Merge pull request #327 from hkmodd/feature/menu-language-text
Show the PC menus' text in the language of the Custom Edition's loc.map
2026-10-20 01:49:41 +13:00
MrBruh 1dedc8b33f Merge pull request #402 from neopetal/WebUI-sticky-menu
WebUI: Make nav menu sticky at desktop width
2026-10-20 01:49:41 +13:00
MrBruh 837443532c Merge pull request #324 from steverice/upstream-pr-dot-zw
Give a z-sprite's fragments the depth its DOT_ZW stage computes
2026-10-20 01:49:41 +13:00
MrBruh 0a5a553881 Merge pull request #409 from johncranston303/fix/f11-settings-mode
Preserve the F11 window mode when saving settings
2026-10-20 01:49:41 +13:00
MrBruh 789d0b2915 Merge pull request #416 from OpenCommunityEdition/testing
Merge in testing
2026-10-20 01:04:38 +13:00
MrBruh 40d9017e68 Give StageKit's runs the header of an Xbox ui.map, which the game's check of the maps folder asks for (#266)
Since the check of the maps folder (e075fffa2), a game whose maps folder has no ui.map says so and quits, so every StageKit run stopped before its map loaded and CI's Linux test step failed (16 tests). The runner now writes the eight bytes the check reads ('head' and the Xbox's version 5); nothing in a run reads more of ui.map, as it had none before. Checked: python -m pytest -q tools/stagekit/tests with the --portable --release build passes (20), and fails the same 16 without this change.
2026-10-20 00:47:59 +13:00
MrBruh bcecef568c Warn of a software OpenGL renderer only on desktop Linux, where the Android guest's SDL is not called (#275)
SDL_GetCurrentVideoDriver is not among the SDL functions the Android guest bridges, so the llvmpipe warning stopped the guest image from linking. The warning points at the Linux README's NVIDIA on Wayland, so it now has the same guard as the rest of #275. Checked: ninja android, linux and web build.
2026-10-20 00:36:15 +13:00
MrBruh bfd949a34a The loading screen draws over black without the disc's picture, as the game does, and has no download mode (#334)
progress_bar_download_display, progress_bar_download_end and
progress_bar_downloading were for a download screen that is not merged; they
are removed and progress_bar_eachframe is as it was. Without loading.tga the
texture is no longer filled with clouds the port made: it is left as
created, black, as the game leaves it, so that no invented picture ships.
The disc image importers' comments say so.

Checked: node --test "port/web/tests/*.test.js", pytest tools/harness and
tools/test_web_build.py; the changed C files compile (-fsyntax-only) with
the Linux, Android guest and web commands; XisoExtractor.java with javac.
2026-10-20 00:29:34 +13:00
FractumSeraph 84e7b5add2 Halo's loading screen draws, with the Xbox's own picture or clouds
The loading screen (interface/progress_bar.c: a light sweeping from left to
right over a picture, with a glowing trail) drew nothing: it uses the
fixed-function pipeline (SetVertexShader with 0), which d3d8_gl.c did not
have, and its picture, loading.tga, is on no retail disc.

- d3d8_gl.c draws fixed-function immediate-mode draws with a vertex shader
  of its own (nv2a_fixed_function_glsl), positions transformed by the
  world, view and projection matrices; and keeps a front buffer (a 640x480
  render target taking the middle of the frame at BlockUntilVerticalBlank)
  for GetBackBuffer with -1, the frame before, whose blur makes the light's
  trail. The screen is drawn in the middle 640 columns, as the menus are on
  a wide screen.
- After it, the rasterizer's caches of the device's states and of its
  vertex shader are made the device's again (rasterizer_forget_hardware_state,
  rasterizer_vertex_shader_runtime_forget): it sets them itself; and
  SelectVertexShader (a packed program) always leaves the fixed-function
  pipeline.
- On OpenGL ES (Android, the web) the fixed-function shader turns
  Direct3D's clip space as the others do (HALO_GLES); without OpenGL
  (debug.null_renderer) it is not compiled.
- The picture is the Xbox's own: the retail default.xbe holds it (320 by
  240, runs of 4-bit greys after its width and height), and importing a disc
  image now writes it into the maps folder as loading.tga: port/linux/src/
  xiso.c, the Android app's XisoExtractor.java and the web page's
  xiso-worker.js. Without one (a maps folder copied by hand) the light
  sweeps over clouds the game makes. No game data is in the repository.
- progress_bar.c also has a mode a download screen over the menus can use
  (a share given, from 0, drawn over the menus, and let go of).
- A picture that cannot be written whole is not left cut short (the
  loading screen would read past it).

Checked: port/web/tests/xiso.test.js takes the picture out of made-up
executables (and an image's default.xbe); the Java decoder gives the same
bytes as the JavaScript one; xiso.c's picture from a Rev 2 disc image
matched a separate decoder's byte for byte; the Linux CI steps and the
web build and its tests in Docker; the Windows release build.

[The disc image parts (xiso.c, xiso-worker.js, XisoExtractor.java and
xiso.test.js) redone on the rewritten disc-image readers.]

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
(cherry picked from commit 010110026e719c3e8c38d36b93d57cf67b616230)
2026-10-20 00:29:34 +13:00
MrBruh 75912da87e Describe net_compare.py's use without other platforms' builds (#360)
The tool's documentation and comments compared an x86-64, x32 or arm64
build against the i686 one, builds the project does not have. They now
compare a build with a simulation, compiler or maths change against one
without, and the wrapper's example is a tracer rather than an emulator.
2026-10-20 00:21:59 +13:00
Paul Hontz 469d03f57a Make net_compare.py stop its copies however it ends, and put a FAIL over an ERROR
Copies outliving the tool: the copies ran in the tool's process group and
were stopped only by play()'s finally, so SIGTERM or SIGHUP to the tool
(which Python does not turn into an exception) left them running, and they
ignored SIGTERM. Each copy now runs in a session (a process group) of its
own, started with the stop signals blocked so that it is always noted as
running; the group is ended with SIGTERM, then SIGKILL two seconds on, on
every way out: returning, an exception, Ctrl-C, SIGTERM and SIGHUP (which
now raise), and atexit. Killed outright, the kernel ends the copies
(PR_SET_PDEATHSIG). Stopped by a signal, the tool says so and exits 128 plus
its number.

Exit status: the worst of the runs was max(), so an ERROR (2) in one run
hid a FAIL (1) in another. A FAIL is the finding and an ERROR only a gap in
it: any FAIL now gives 1, else any ERROR 2 (documented in the tool and
NETCODE.md).

--tolerance persist=3.5 raised a ValueError traceback; each value is now
checked (whole numbers, finite, not negative, drift_share at most 1) and
refused through argparse, as is an unknown name or a missing "=".

--window keeps the caller's DISPLAY or WAYLAND_DISPLAY (documented, and
--display names an X display instead); headless copies now get neither,
so that none can open a window on the caller's desktop. HALO_EXIT_AFTER, the
copies' safety stop, now counts --skip too, as it works headless.

Checked: tools/test_net_compare.py, 28 passed (20 new: the exit status, the
tolerances, the copy's folder, the displays, stop() ending a copy that
ignores SIGTERM and its child, and the tool stopped by SIGINT, SIGTERM,
SIGHUP or SIGKILL leaving no copy). With the maps: i686 (ninja linux)
against x86-64 (ninja linux_x86_64), bloodgulch and beavercreek with --swap:
4 of 4 games in step, exit 0 (drift 0.0%, 0.0%, 3.5%, 14.2%), with no copy
left running.

(cherry picked from commit a53d86ccc2216d0949a6c089f57f6e8bd534c93c)
2026-10-20 00:21:59 +13:00
Paul Hontz cdc3bab723 Reset the drift figures with each game, and keep a client's tick from overflowing them
The host's drift figures for net_compare.py (distributed_divergence in
network_distributed.c) were zeroed only as each second's line read them:
the last taken prediction's ticks and each player's latest input tick
stayed from the game before, so a game's first ticks could be compared
against the last game's, and before any game they were 0 rather than none.
network_distributed_new_game now clears them, the ticks to NONE.

The input's tick and the prediction's time are the client's word: a hostile
one near LONG_MIN made "newest - TICKS_PER_SECOND" and "time - 1" overflow
(undefined behaviour). Both are now guarded.

The harness's elevator prediction test (tools/harness) did not compile
since the drift figures came in (distributed_take_prediction notes them):
it now takes distributed_divergence's definition and
DIVERGENCE_APART_DISTANCE from network_distributed.c, as it takes the
functions, so it runs the real code.

Nothing the machines send or must agree on changed: the figures are the
host's log's only, so HALO_PORT_NETWORK_VERSION stays.

Checked: python -m pytest -q tools/harness, 293 passed (5 failed before);
ninja linux and ninja linux_x86_64 build; net_compare.py with both builds
(the next commit's message).

(cherry picked from commit dcfed92a3a7687755b50bcc075669addb9704c3e)
2026-10-20 00:21:59 +13:00
Paul Hontz 4d0bd56968 Add tools/net_compare.py, which checks that two builds play a network game in step
To show that a new build (the x86-64 one, an arm64 one) plays network
games with the i686 Linux build, and to keep checking it. It plays the two
together on the loopback, A hosting and B joining and with --swap the other
way round, each copy with a seeded bot, headless, and compares the per-
second logs of the network test: for every player, the host's view and the
client's at the same tick (positions, aim, vitality, weapons, rounds,
grenades, scores, life), within tolerances taken from how the netcode
predicts and corrects, and the host's drift figure (the previous commit).
It prints PASS, FAIL with the first divergent player, tick and field, or
ERROR, and exits 0, 1 or 2. It needs the retail maps, so it is a local or
self-hosted check: NETCODE.md ("Comparing two builds") describes it, the
log line's format and the calibration; README.md's new Testing section and
AGENTS.md list it. tools/test_net_compare.py tests its judging of logs
without the maps, in CI.

Calibrated with an i686 build against itself, 60-second games both ways
round on bloodgulch, beavercreek, hangemhigh, chillout, prisoner, ratrace,
longest and carousel, up to four games at once: 63 of 64 pass (one copy
crashed, reported as an error), and 12 of 12 with scripted hits and kills
(--events). A build of the same sources whose players run 0.5% or 2%
faster (a change made only for the test, not committed) fails all 16
games, at the first second compared. One whose gravity is 0.5% or 2%
stronger passes: it changes only the ticks in the air, which the drift
cannot tell from what identical builds show; NETCODE.md says so.

(cherry picked from commit 0adc286c6497bffe8edfe297181aa39c2b0bbb8e)
2026-10-20 00:21:59 +13:00
Paul Hontz 8e9ee175a9 Log how far apart the host and a client move the client's player in a tick
The network test's per-second line (debug.network_test) now ends with
"| drift <ticks> <apart> <mean> <largest>": on the host, the ticks in which
it moved a client's player one tick on from where it took the client's
last prediction, with the client's input of that tick, as the client did,
and how far apart the two moves were. Builds that simulate alike move the
player alike to the last bit, so this is what shows a build that simulates
otherwise; the positions the machines log agree either way, as the netcode
corrects every copy toward the host's. tools/net_compare.py (next commit)
judges two builds by it.

Only counters and the test's log line change: nothing sent between
machines, nothing a game does with them, so the network version stays.
Checked with i686 builds against themselves (0 to 13% of such ticks apart,
up to 42% on a loaded computer) and against one whose players run 0.5% or
2% faster (77 to 93%).

(cherry picked from commit 95b2ddf86d4abc279c4ed462789e0ff7a75a7881)
2026-10-20 00:21:59 +13:00
Paul Hontz 03e28a245e Stop a game without a window after debug.exit_after, and on SIGTERM or SIGINT
platform_pump_events returned at once when there was no window, and it is
where debug.exit_after (HALO_EXIT_AFTER) was checked and where SDL's quit
events, which SDL makes of SIGINT and SIGTERM, were read. So a game with
debug.null_renderer (the network tests, net_compare.py), or without a
display, never stopped by itself after debug.exit_after, ignored SIGTERM
and Ctrl-C, and never answered the updater's question with
debug.update_answer.

Without a window (debug.null_renderer, or after the window was asked for
and could not be made) it now checks debug.exit_after, reads the events for
a quit request and runs updater_poll when debug.update_answer answers it,
on the thread that first pumps (the game's, as each frame ends); the rest
of the events, of no window, are dropped. The time for debug.exit_after
starts there at the first frame. With a window nothing changes.

Checked with the null renderer (SDL_VIDEO_DRIVER=dummy, no DISPLAY) on
bloodgulch, ninja linux and ninja linux_x86_64: with HALO_EXIT_AFTER=8 both
builds exit with status 0 after 8.2 s ("exiting after debug.exit_after"),
where the builds before ran until killed at 25 s; SIGTERM at 10 s ends both
with status 0 in 0.1 s ("asked to quit (no window)"), where the build
before ran on.

(cherry picked from commit a5531f3e5774b29ce27602bad7c7c2468c2fc074)
2026-10-20 00:21:59 +13:00
MrBruh 6875132aec Add the display.structure_culling setting for the structure culling tests (#404)
The culling tests could be changed only with the console's
structure_culling, which did not last past the game's end. The setting
(HALO_STRUCTURE_CULLING) gives the starting bits, 31 (every test) by
default as before, read in render_initialize; the console command still
changes them while the game runs. Documented in the settings table.

Checked: tools/harness (640 passed, the structure culling tests among
them), test_linux_port's config section and menu settings tests, and the
changed files compiled with -fsyntax-only for Linux, the Android guest
and the web.
2026-10-20 00:21:19 +13:00
MrBruh aecdd895d5 Read visibility tests on the CPU only with AMD's own driver, and keep running without the queries (#403)
The change sent Mesa (radeonsi, Intel, the Steam Deck) and Intel's Windows
driver to read every query with glGetQueryObjectuiv, which Mesa's GL thread
makes wait for everything before it: that is why the counts were copied
into a buffer. Only AMD's proprietary driver (GL_VENDOR "ATI Technologies
Inc.") now reads them on the CPU; every other driver keeps the fenced
buffer. When the queries cannot be made, the game no longer exits: it logs
it and every visibility test reports fully visible. The new comments and
logs are written in the file's style, with the Mesa note restored.

Checked: d3d8_gl.c compiles with -fsyntax-only with the Linux, Android
guest and web commands from build.ninja (with -w removed), with no
diagnostics beyond those of the file before the change.
2026-10-20 00:19:18 +13:00
MrBruh 310eed25f1 Fix the Windows cross build's typos, docs and shim link (#363)
configure.py goes back to mode 100644, which the pull request changed by
accident. The help, messages and README lose their typos, AGENTS.md and
README.md mention --windows-cross beside `ninja windows`, and the Windows
README says that the SDK needs versioned Include and Lib folders, which a
plain xwin splat lacks. The StdDef.h shim is linked again when a dangling
link is left behind, where os.symlink raised before.

Checked with python configure.py --help and a configure run, and
py_compile of the changed scripts.
2026-10-20 00:17:51 +13:00
Stefan MaierandClaude Opus 5.5 856ca06a5d Merge OpenCE upstream under its new licence, the AGPL 3.0 or later
OpenCE moved from CC0 1.0 to AGPL-3.0-or-later (4b09168e7), and Ringfall:
Mjolnir VR moves with it: README's Legal section and THIRD_PARTY_NOTICES
say so (releases before this one stay CC0 1.0, LICENSES/CC0-1.0.txt).

Its disc image readers were written again from a description of the
format, extract-xiso's code and notice gone. The app's (XisoExtractor.java)
is OpenCE's new one with Ringfall's language folders (maps_es, maps_it)
added again; the Steam Frame's (steam_frame_xiso.py) is written anew the
same way, the language folders kept; the bundle and the release job no
longer carry extract-xiso's licence. Also in: bnunu/halo-1's latest
matches, the web build's WebRTC and loading fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 13:17:41 +02:00
MrBruh 4769d75170 Merge pull request #266 from addisonbair/stagekit
StageKit: stage and instrument any scenario on the real engine, with no retail assets
2026-10-20 00:12:39 +13:00
MrBruh 16bcdc4b0e Merge pull request #362 from OpenH1/upstream-early-crash-report
Report a crash on Linux from the start, also with the null renderer
2026-10-20 00:11:49 +13:00
MrBruh 5b258a7c20 Merge pull request #275 from OpenH1/nvidia-wayland-x11
NVIDIA on Wayland: X11 first when there is no 32-bit egl-wayland
2026-10-20 00:11:10 +13:00
MrBruh ba45f95bf8 Merge pull request #361 from OpenH1/upstream-looping-sound-orphan
Stop a looping sound's track when its looping sound is gone
2026-10-20 00:07:48 +13:00
MrBruh cd7262c516 Merge pull request #392 from pastudan/pr/scope-zoom-passes
Scope zoom effect: a few passes at any resolution, not one per screen scale
2026-10-20 00:07:31 +13:00
MrBruh 56b06c1b94 Merge pull request #403 from chestahh/opence-renderer-fix
Fix broken rendering behaviour on AMD - missing and flickering lens flares/coronas/lights
2026-10-20 00:07:31 +13:00
MrBruh 19b1df8f59 Merge pull request #404 from HiIAmMoot/bsp-culling
Cull the structure triangles the camera can't see
2026-10-20 00:07:31 +13:00
MrBruh 15495116c5 Merge pull request #363 from mcilloni/add-cross-msvc
Add support for cross building for Windows with Clang+MSVC on Linux
2026-10-20 00:07:31 +13:00
MrBruh 5fd319d00b Merge pull request #376 from hkmodd/feature/texture-idle-time
Drop idle textures after half a minute of time, not 1800 frames
2026-10-20 00:07:31 +13:00
MrBruh ff76b33f0b Merge pull request #337 from innerhat-dev/nav-marker-before-draw
Classify a nav marker before drawing it
2026-10-20 00:07:31 +13:00
MrBruh 69ec31a49d Merge pull request #328 from GiovanH/fix/split-screen-start-now
Port: Allow split-screen play in PC menus
2026-10-20 00:07:31 +13:00
MrBruh b97c4ad155 Merge pull request #375 from hkmodd/feature/biped-discard-client
Leave the host's bipeds fallen out of the map to the host on a client
2026-10-20 00:07:31 +13:00
MrBruh 9057384308 Merge pull request #394 from eltanschauung/fix/coop-monitor-scaling
Fix co-op enemy scaling behavior for The Monitor/Guilty Spark
2026-10-20 00:07:30 +13:00
MrBruh 86a1173f14 Merge pull request #366 from BirchWoodGod/fix/unicode-pipe-terminator
Keep a unicode string that ends in '|' from being read past its end
2026-10-20 00:07:30 +13:00
MrBruh 54a9c8f0e6 Merge pull request #385 from arimwilson/bumper-jumper
Add the Master Chief Collection's Bumper Jumper button layout
2026-10-20 00:07:30 +13:00
MrBruh e00bbc610b Bring two harness tests up to the picked changes
map_share_restart.c stands in for what download_finish calls, which now
names the downloaded map in custom_maps' list (downloaded_maps_mark);
test_server_teardown.py's negative control finds the grace period's guard
as it now reads, with HALO_WEB.
2026-10-19 23:15:24 +13:00
MrBruh f1c2861da5 Make log_address's salt without pthread_once
The Android guest's C library cannot link pthread_once (its cleanup
handlers are not there), so the picked log_address.c stopped the Android
build from linking. The salt is made once by the first thread to log an
address, the others waiting for it.
2026-10-19 23:11:46 +13:00
MrBruh e595f89c1b Record the netcode's datagram tick window in version 31
The picked netcode checks add DISTRIBUTED_TIME_WINDOW_TICKS, which
network_format.txt records, and they and the second copy's ports change
what the machines take from each other: version 31, not yet released,
says so in NETCODE.md.
2026-10-19 23:06:45 +13:00
MrBruh 5aafe7af9e Mark the second batch's changes to the game's sources as the port's
Several of the fixes taken from the forks changed source/ without the
port: comment that marks a change from the original (the second copy's
datagram ports, the downloaded maps' refusals, the main menu's clock,
the one-magazine HUD states, the render lists' sizes and others), and a
comment still named a function of that fork's. Each change now says so.
2026-10-19 23:06:19 +13:00
xshxdex98 04a63d9094 The main menu's scene keeps running behind every menu
A tick waits for an input update with an action for each player, and the
menus change who the local players are (signing profiles in and out, a
lobby's network game owning the queues). In a lobby, or once a client's
clock waited for a game, the main menu's scene stopped ticking; and a
screen flagged to pause game time (Mods, the map and gametype screens of
setting up a game) paused the clock that runs the scene, which then
started again from its beginning as the screen closed.

The main menu's scene now always ticks on this machine's clock
(game_time_menu_scene), its players idle where the queues have no input
for them, and at the main menu those screens no longer pause it. The
distributed netcode's per-tick work is not done for the scene: a lobby's
machines do not share it.

(cherry picked from commits 8444785804f8cfb413020da5a03fc5dd65f918e9, 6267d199117f87e56a3f41fc8932966a39a3feb2
and 3a4097bb48f34245b750028a5c0ae28e03bae037, made again on OpenCE's game_time_update,
which has no separate clock connection for the scene)
2026-10-19 23:02:57 +13:00
MrBruh 34002780ce Draw a HUD message's high-res button before looking for the map's picture
The high-res HUD draws a message's controller button by its place among
the HUD globals' button icons, but only once the map's message icons
bitmap had a picture at the button's sequence. Halo PC's message icons
have 13 sequences to the Xbox's 24, so on a Custom Edition map a prompt's
button past them was not drawn at all, and the rest only because the map
had some other picture there ("Hold [rocket launcher] to swap" on
coldsnap, with the high-res HUD off). The high-res button is now tried
first. With display.high_res_hud off, a Custom Edition map still draws
its own pictures.

Found in commit 4c3e74cf29341ff344aca09febc0fab7e1d19919, which instead
reads the Xbox's button pictures out of ui.map for every Custom Edition
map; that is not taken.
2026-10-19 23:00:31 +13:00
xshxdex98 44da7f8265 Web: no second's wait leaving a hosted game
network_game_server_dispose keeps the Xbox's one-second grace period
(SleepEx) only for builds other than Windows, Android and Linux, whose
transports need none; the web build is no __linux__ to Emscripten, so it
still waited a second each time a hosted game ended. It is left out there
too.

(cherry picked from the server part of commit bea41d710988e9aeac6cec44f4fd69b5203906e2,
whose dispose change OpenCE already had for the native builds)
2026-10-19 22:59:22 +13:00
xshxdex98 81faf309bb Give a version-ineligible packet field no size
_data_packet_verify read an uninitialised field_size for a first field
outside the packet's version, and gave later ones the size of the field
before them. No field of the game's packets has a version limit, so no
packet changes; the size starts at 0.

(from commit c01c68537bcbda79f0e4def4211cad611dfdee74's data_packets.c
change; the rest of that commit, comments rewritten, is not taken)
2026-10-19 22:58:39 +13:00
Milenko e075fffa28 Maps folder: Halo PC maps there are explained, not a blue screen
A maps folder holding Halo PC's maps (one pointed at a Halo PC install's,
say) had its ui.map, a Custom Edition or retail Halo PC cache file, loaded
as the Xbox's: game_load() failed, and the player got a blue screen.
Before the window opens the desktop builds now read ui.map's header: when
it is Halo PC's, or there is no ui.map, the game says where the Xbox maps
go (the data root's maps folder, named in full) and that Custom Edition
maps go in custom_maps beside it, and quits. Halo PC maps in maps/ itself,
which play only from custom_maps, are named in a warning. Runs with no
window log it instead. The README's game data section says so.

(cherry picked from commit 223c4aaf16b2819c57cd31d470d5dd04c9daa4f7, made again for
OpenCE's custom_maps folder in place of that fork's maps/ce and md_maps,
and not on the web build)
2026-10-19 22:57:53 +13:00
Milenko 76984235b7 CE maps: a limp body whose graph has more nodes than its model relaxes
A Halo PC map's animation graph may have more nodes than its model
(beavercreek_rev_beta's cyborg has a graph of 20 on a model of 19), which
Halo PC's engine posed past the biped's node matrices. Such a dead body
was left unrelaxed here. It is now posed in a copy of the biped's node
matrices with the graph's every node, the extra ones where their parents
are, and the model's taken back.

Reported by Sabriel.

(cherry picked from the limp body part of commit 5fdbccf6cdf4f5be4bcaf1b90f4fe712877ddb4b;
OpenCE's checker already let such a graph be, and its own check of the
nodes is kept for the counts and links)
2026-10-19 22:56:04 +13:00
MrBruh 62058ba925 Drop a setting of the fork's that came in with the profile commit
The new profiles pick took its side of a conflict in port_config.c whole,
and with it game.move_old_map_folders, which moves that fork's Halo PC map
folders: OpenCE has no such folders, and nothing read the setting.
2026-10-19 22:53:31 +13:00
Milenko 87643c392d Scripts: downloaded maps' allow-list
A map that map sharing downloaded runs only scripts that keep to the
player's own game: one that calls what changes the player's settings or
other players' games (player0_look_invert_pitch, sv_end_game, sv_say) or
sets a global that outlives the map is disabled, as for any map's script
that calls what no map's may, and debug.txt says which. Map sharing names
each map it downloads in custom_maps/downloaded_maps.txt, so they stay
held to this in later runs; game.downloaded_maps names more, or "*" for
every map. The campaign's game_speed and game_save_totally_unsafe stay
allowed.

The setting's entry came into port_config.c with the profile commit before
this one (a conflict's side of it); it is the one entry now.

(cherry picked from commits 7d02d46210ba672512e36b39ffd2c0b0d8e4f3b3 and
d3718e78d4889140a44f8050075b56143e4b7732, wired to OpenCE's map sharing in place of that
fork's map families)
2026-10-19 22:53:18 +13:00
MrBruh 397e199690 Build Mbed TLS with its own locks on Linux
Mbed TLS is built without locks of its own, and on Linux two threads use
it: the self-updater's (posix_update.c, its update check at start-up) and
internet play's (posix_dtls.c, its certificate and its handshakes with
browsers). Two threads setting up its PSA crypto or drawing on its random
generator at once could free a hash context under the other and crash.
The Linux build now defines MBEDTLS_THREADING_C and
MBEDTLS_THREADING_PTHREAD for Mbed TLS and its users, which makes its PSA
core and random generator take their own locks (Mbed TLS 3.6); its config
is left unchanged. The other builds use it on one thread.

Ported from commit 04fa0517b32cde1c52ead7a2f21d249d0c5459e2, which made
the threads take turns with one lock held over each whole request; here
the updater's download cannot hold internet play's thread up.
2026-10-19 22:49:56 +13:00
xshxdex98 74649ec993 Server browser: pings coloured by how good they are
The Join Game server browser shows each ping coloured: green under 80 ms,
yellow under 160, red above. A text colour hook of the menus'
(pc_menu_text_color) gives the ping its colour; the rest keep their own.

(cherry picked from commit 335c6522e9fb7aa33762e3f2cf27c518ac0e48ce, without that fork's
Online Games screen, the thresholds and colours kept in menu_functions.c)
2026-10-19 22:48:05 +13:00
xshxdex98 2759fc6db7 Server browser: each host's ping, timed over the tunnel to it
The PING column showed nothing, as a host was reached only on joining. The
browser now probes each listed host as a join would reach it: the tunnel
made with the listing's invite (a signalling request of its own token,
answered on its own topic), the shortest of three pings kept, and the
tunnel closed again. Hosts on any version answer, as it is the ordinary
join. A few are probed at once, each again every two minutes and on
REFRESH. The game sees nothing of a probe's peer, and a join of a host
being probed takes its tunnel up. A game with a password is not probed:
its listing hides its token. Direct Link's games show the open tunnel's
ping.

(cherry picked from commit 98889fc72bc8cfd765b765d6e86c973c2040f841, merged into OpenCE's
internet play: its retired sessions keep their identifier, and its
server browser's NAT advice is kept in the README)
2026-10-19 22:47:21 +13:00
xshxdex98 5ead9910a8 Linux: PlayStation controllers through the kernel's driver, as a setting
SDL drives a DualSense or DualShock 4 itself through its hidraw device,
which only udev rules (Steam's) open to the player; without them the
controller was not found at all. With input.playstation_kernel_driver on,
where the kernel has its driver of them (hid-playstation, hid-sony), the
game leaves the controllers to it: their buttons, sticks, triggers and
rumble, through the input devices a player can read, but not the
lightbar or the motion sensors SDL's own has. Off by default.

(cherry picked from commit fa1ff85ebd46ce183522baa5a91c9a29c9006c9f, made a setting, off
by default, as it gives up what SDL's driver has)
2026-10-19 22:46:09 +13:00
xshxdex98 336dc0d262 Server browsers: a game selected in yellow, as Custom Edition's
In Join Game's server browser a click selects a game, its row in the
yellow-outlined picture Custom Edition draws for it, and a click on the
selected game, a double click, A, Enter or JOIN joins it; one click
joined it before. The keys move the selection.

(cherry picked from commit 472d232246568ed2e3ee56bc93d97a3530feea54, without that fork's
Online Games screen; OpenCE's rows already take the focus only from a
click, not from the pointer passing over them)
2026-10-19 22:45:37 +13:00
xshxdex98 fb8a0e63ca Server browser: an empty list says how many games are on a newer version
An old build sees none of the public games (each list leaves out other
network versions), and said only that there were none. The hosts heard
listing a game of a newer version are now counted (by their keys' hashes,
forgotten as a game is), and the server browser's empty list says so:
"2 games are on a newer version: update the game to join".

(cherry picked from commit 4a4a4134519b76a5bcfd11e0e47cf397d7a228a2, made again on OpenCE's
server browser, whose listings come through p2p_lobby.c; that fork's
counted its own game list's)
2026-10-19 22:44:26 +13:00
Milenko 329d311c16 Campaign: new profiles start at the beginning, as on the Xbox
The debug build this port comes from unlocked every campaign level on
every difficulty for each new profile. Retail Xbox Halo does not: a new
profile starts at The Pillar of Autumn and each level opens when the one
before it is finished. New profiles now start that way.

- game.unlock_all_levels (off by default) keeps the old behavior for new
  profiles, for those who want it.
- profile_reset_campaign in the console clears the current profile's
  finished levels and last played level, after a confirmation
  ("profile_reset_campaign yes"). Profiles made by earlier versions had
  every level open and cannot be told apart from a real full clear, so
  nothing is changed automatically.

(cherry picked from commit 224d9a757575509efb0dedab094bd0d34df59e96, without its top README
table, which OpenCE does not have)
2026-10-19 22:42:30 +13:00
Milenko 87d0c46bf6 Draw more particles and lights a frame on desktop
A busy multiplayer fight fills the Xbox's per-frame lists of what a view
draws: 512 particle runs and 128 dynamic lights. Past them plasma bolts,
charge glows and flashlights stop drawing. The desktop builds now draw
2048 and 512. These lists are rebuilt every frame, outside the game state,
and nothing of them reaches the network. Android's and the web build keep
the Xbox's.

(cherry picked from commit f1abebdd6e89de292569ea466496fa0484476e0e; OpenCE already drew
2048 transparent geometry groups on every build, so only the particle runs
and lights are taken, with OpenCE's guards for the builds that keep the
Xbox's sizes)
2026-10-19 22:41:14 +13:00
Milenko 60e568235d High-res HUD: a map's PNGs decoded as it loads, on a thread of their own
The first frame that drew each HUD picture decoded its PNG, which held that
frame up. On the desktop builds a map's HUD PNGs (and its sprite sheets')
are now decoded as the map loads, on a thread of their own, so that the
first frame only uploads them; what is decoded and not drawn is let go when
the map is unloaded. Android and the web build decode each when it is
first drawn, as before.

(cherry picked from commits afa4feaee4935b118dbc6d94140587842205cbfe and
27a22a2ded1bc78323f7f4bf35033dd843f7b956, made again on OpenCE's high-res HUD, its sprite
sheets queued too, and not on the web build)
2026-10-19 22:40:09 +13:00
MrBruh b5099759a5 Drop the picked guards of defines OpenCE does not have
The full reference list pick left a light's clusters out under
HALO_SERVER, its dedicated server's define, and the debug.txt roll's
header check under HALO_XBOX_CONSOLE; OpenCE defines neither, so both
were dead or always true. The comment no longer cites a dedicated
server.
2026-10-19 22:37:15 +13:00
Milenko 7b91023137 Full reference lists warn once a map; the server's lights join no clusters
A dedicated server's debug.txt grew 2 GB in 12 hours, almost all of it
"maximum light cluster references per map (8192) exceeded", written each
time a light could not join a cluster: thousands of times a second on a
busy map. A full reference list now says so the first time a map, and the
times after are counted and told when the map's lists are let go or made
anew. What fits in the lists is as before.

The dedicated server draws nothing, and a light's clusters are only used
to draw (the lights of an object or the map, and a unit's illumination,
which only debug_unit_illumination reads, from the lights drawn that
frame). The server (HALO_SERVER) no longer joins lights to clusters, so
it does none of that work each tick and never fills the lists.

(cherry picked from commit 50cc6274fb5f7697c6f3c25394e15e22f87106f2)
2026-10-19 22:36:35 +13:00
Milenko 3a49815b2f debug.txt: the header check after a roll is the desktop builds' alone, as the roll is
(cherry picked from commit 6e57e4a04a6e906002c42ad2fedfaaeb3a02a15e)
2026-10-19 22:36:35 +13:00
Milenko fc67022b2e debug.txt: repeated lines counted, rolled to debug.old.txt at 64 MB
A line the same as the one before is counted rather than written again
("last line repeated N times", when a different line comes). When
debug.txt passes 64 MB it is renamed debug.old.txt (replacing the one
before) and a new one starts, with the header again for crash reports'
addresses. A game left running for days had no limit to its log.

(cherry picked from commit d4b46c829dcdaa53ee72d7d2901bc166115b0e69, without its dedicated
server README; the web build's copy of each line to the page's log is
kept)
2026-10-19 22:36:35 +13:00
Milenko 9c571c1bce Settings: name a config.toml that is not read on every desktop build
The desktop builds now name a config.toml.txt beside the real file
(Windows hides the .txt an editor may add, so the file looks right and
does nothing), and Linux names a config.toml in the folder the game was
started from when that is not the executable's:

  settings: .../config.toml.txt is not read: Windows saved it as
  config.toml.txt; rename it to config.toml

(cherry picked from commit b4f73a749f62cc5ed28092b7155d04638f5bb84d, without its macOS
check, and not on the web build)
2026-10-19 22:36:05 +13:00
Milenko dca73bbe65 Settings: words in any case, and an unknown one said in the log
display.mode = "Windowed" was not "windowed", so the window followed
display.fullscreen instead, without a word. The settings that take one
of a few words (display.mode, resolution_scaling, anti_aliasing, menus,
player_names, the chat, voice, co-op and streamer words,
crash_reports.upload and others) now take them in any case, and one that
is none of them is logged once:

  settings: display.mode = "Fullscreenn" is not "fullscreen",
  "borderless", "windowed" or empty; using display.fullscreen's

(cherry picked from commits b1d3eacadbc4047f6294c324b7d8e23009d3f2c1 and
80196e309a8af878309151cbec6794b8386759a8, made again with OpenCE's settings' words and
the port's own case compare, which the Android guest has)
2026-10-19 22:35:27 +13:00
Milenko e6998a4273 Settings: skip a line that cannot be read instead of the whole file
One TOML mistake, such as an unquoted word or a capitalized False, put
every setting back at its default. The line the parser stops at is now
skipped (in memory; the file is left as the player wrote it) and the
file read again, up to 16 times, so every other setting still counts.
Each skipped line is logged with its number and the likely fix:

  config.toml line 87 cannot be read (invalid value), so it is skipped:
  true and false are lowercase, high_res_text = false

  config.toml line 100 cannot be read (invalid value), so it is skipped:
  text needs quotes, menus = "pc"

(cherry picked from commit b3ee742ce7aef353e3f06af72b7cf83fff23544d, made again on
OpenCE's config_load: the file is not completed or rejoined while a line
of it is skipped, and the case compare is the port's own, which the
Android guest has)
2026-10-19 22:33:41 +13:00
Milenko 8a79394aff Netcode: a datagram's tick near its sender's latest; hits, identity and readiness only over a client's stream
(cherry picked from commit dd23663bb59fb7e7a821d456caae91c0b0a5217a)
2026-10-19 22:31:57 +13:00
xshxdex98 7b447b1065 Weapon HUD: no secondary warnings for one-magazine weapons
A one-magazine weapon's second magazine, read as empty, still set off the
secondary states: the secondary trigger ready, flash, reload and "no ammo
for reload" crosshair states, and the draw states of its total and loaded
ammunition (flashing, disabled), which coldsnap's and hugeass's master HUD
draws as NO FUEL beside the weapon's own NO AMMO. These now apply only to a
weapon with a second magazine.

(cherry picked from commit 488bd83eafaabf26a7e392eaf8b240b1319e07c3; OpenCE already cleared
the state first, kept the overlays off and checked two of the crosshair
states, so only the rest is taken, and no CHANGELOG.md)
2026-10-19 22:31:57 +13:00
Milenko 7351c3998e Discord: "In Menus" on every build
Only the 64-bit builds showed "In Menus" with the game's picture while not
hosting; the 32-bit ones cleared the activity, so Discord showed nothing.

(cherry picked from commit e69b5c9f48fb71282ef18efba8ae5c949ff55a7a)
2026-10-19 22:31:25 +13:00
xshxdex98 64084d77af LAN: a game search from off the client port answered directly
A second game on one computer listens on another port and hears none of the
host's broadcast advertisements, and the host answered searches no more
than once each advertisement interval. Such a searcher is now answered
directly every time; the broadcast keeps its interval.

(cherry picked from commit b49c83d1c871a23f76825bdcdc52a228167f1c37)
2026-10-19 22:30:58 +13:00
xshxdex98 1eb3db02d9 Netcode: a datagram's source port kept with it
The unreliable queue kept only a datagram's source address, so every
reader saw port 0. The host's answers to where a client's datagrams come
from (a second game on its computer, a direct answer to a game search) went
to port 0. The queue now keeps the port after the address.

(cherry picked from commit 781b98e9333c2cb85a85360267b24cc6656100c1)
2026-10-19 22:30:58 +13:00
xshxdex98 b6dba5a621 Netcode: a second game on the host's computer gets the host's per-tick state
Both games bound the client port (SO_REUSEADDR lets Windows share it and
hands each datagram to one of them), the host matched a distributed
datagram to the first machine at its address (its own), and sent every
client's per-tick datagrams to the fixed client port. The second game got
only the reliable messages: no units, no spawn, no co-op cutscene camera,
its camera left at the origin (the purple screen), and in PvP it waited
for space to clear.

A client now listens on any free port when another game has the client
port, the host takes a distributed datagram from the machine at its address
that isn't its own before its own, and answers each machine where its
datagrams come from. A game search from another port is answered there too.

(cherry picked from commit 0f4e71eba0787b8d3cd28c436cdb44ec6d79abda)
2026-10-19 22:30:58 +13:00
Milenko 4e1d97ee22 Network test: skip the intro movie before setting up the game
Hosting or joining with the intro movie still playing halted in
texture_cache_steal_memory (xbox_texture_cache.c #320): the movie holds
the texture cache's spare memory, which starting the map takes too. The
test now skips the movie, as a button press does, and waits for the menu
to settle again.

(cherry picked from commit 2d4a7deff6fda9bf3e8b9926a9353dd625be70b1)
(cherry picked from commit 47671d6b6ce24b693eb640c8398e78ef3e63a877)
2026-10-19 22:30:16 +13:00
Milenko 94209aaaf6 Hosts that run their own games clear the joins a finished game left queued
A machine that asked to join as a game ended, before the server switched
to the pregame, was left waiting behind the one the server holds: the
server refused every later join with "network_game_add_player() failed"
and sat in the lobby for good. A host that starts its next game by itself
(network_test.c's host, which the dedicated servers run) never recovered.
Those joins are now dropped when the next game starts. Only the host's own
bookkeeping changes; nothing on the wire does.

From JoshRob297's halo-ce-touch (18a6fc58), reworked for our tree, which
has no network_game_server_port_set_minimum_players.

Co-authored-by: JoshRob297 <99092299+JoshRob297@users.noreply.github.com>
(cherry picked from commit 4582817b2bb4241b53bfa4c523f02aa267595feb)
(cherry picked from commit be7362f2d0b9983e3e12a25f5c76871be5e9132f)
2026-10-19 22:30:16 +13:00
Milenko 89719c7422 Internet play: brokers.txt's list built in, for a game without the file
A game with no brokers.txt beside its config.toml (one run from somewhere
the builds did not put it) had no brokers, so no invites and no listings.
Without the file, the game now uses the same list (a test keeps the two
alike); an empty file still means no brokers.

(cherry picked from commit e728f63b590affb701dfc0ad3bde803bedd3b1c1, without its dedicated
server, macOS and 64-bit build parts, which OpenCE does not have)
2026-10-19 22:30:16 +13:00
MrBruh 66d787cf13 Declare log_address for the game's sources and tag map sharing's addresses
The picked log_address change declared the function inside
transport_address.c; the port's functions the game's sources call are
declared in halo_linux_source_fixups.h. Map sharing, which OpenCE added
since, logged a closed connection's address whole: it now goes through
log_address too. debug.log_addresses is in the settings table.
2026-10-19 22:29:50 +13:00
Milenko e708a64461 Logs show other machines' public addresses as tags, not whole
Players post debug.txt in public, and a host's log names everyone who
joined it. Every address the game logs now goes through one helper,
log_address: a public one is written as a tag (addr#3f2a9c), the same for
the same address all run long, so lines still match up, with its port as
it is. Local network, loopback and internet play's stand-in addresses stay
whole. debug.log_addresses in config.toml writes them all whole, for
debugging one's own network.

Display and logging only: nothing sent or compared changes.

(cherry picked from commit c76df1d00a88072d50af64cde39fb957fa5b842c, without its
64-bit-only xnet.c line)
2026-10-19 22:29:11 +13:00
Milenko c2e06963a6 CI: the ninja and ccache downloads checked against pinned hashes
(cherry picked from commit 8b64b14a13ddaa573b09bcf2006a8450af8d9a04, without that fork's 64-bit Windows
job; the four hashes checked against today's downloads)
2026-10-19 22:27:59 +13:00
Milenko 67f1719d0e Build tools: musl and SDL3 checked against pinned hashes and commit
The Android build's musl download and the Windows build's SDL3 package
are refused unless their SHA-256 matches the pinned one, and the Android
build's SDL3 clone unless its tag is the pinned commit.

(cherry picked from commit 11d25e2b1b7570ff1ae5da1537f886be66d5924e, without
its macOS build script, which OpenCE does not have; the hashes and the
commit checked against musl 1.2.5, SDL3-devel-3.4.16-VC.zip and
release-3.4.16 as downloaded today)
2026-10-19 22:27:24 +13:00
Milenko 4c736be46a Audio buffer as a setting
audio.buffer_frames sets the audio device's buffer in sample frames on the
desktop builds: 512 by default, as before (11 ms at 48 kHz), and up to
8192 for a machine whose sound cuts out when the mixer is late (2048 is
43 ms). Android keeps its 1024 and the web build SDL's own.
HALO_AUDIO_BUFFER_FRAMES overrides it.

(cherry picked from the audio part of commit
580fd78feeffba4e1ada8510f617a0103a49ce5c; OpenCE's windows already draw at
their size in pixels, and its macOS default and build changes do not
apply)
2026-10-19 22:25:54 +13:00
xshxdex98 6ec6e565b4 Custom Edition maps draw the port's high-res HUD
48 of the high-res HUD's textures have bitmaps Halo Custom Edition lays out
alike (the same sprites, the same size or twice it), compared against its
bitmaps.map (port/assets/hud/custom_edition.json). In a Custom Edition map,
such a bitmap that is Halo PC's own, read from bitmaps.map, is drawn with
the texture without the pixels' check, as the port's HUD looks; a map's own
HUD art, and the 21 sheets laid out otherwise (the meters, the reticles),
are drawn as they are.

(cherry picked from commit 503e78331a6885571af662037a79e7a59f5c4937, merged
into OpenCE's high-res HUD, which already had the loader's stock tag check
and a larger texture table)
2026-10-19 22:24:46 +13:00
MrBruh 61c328f0dc Take a Custom Edition enum with its bytes swapped when that is valid
Some Custom Edition maps' tools left shorts big-endian, as tag files store
them: Hornet's Nest's assault rifle muzzle flash light holds function
types of 256 where the stock light holds 1 ("zero"). The tag checker
reset such a value to 0 ("one"), so the light's functions read as one
where the map meant zero. A two-byte enum of a Custom Edition map whose
value is past its field's values now takes the value with its bytes
swapped when that is one of them, else 0 or none as before.

Ported from commit cc70ed67f86bc20a8e172ddf000eda0b1ca2e3e1, which made the
same repair at run time in periodic_functions.c; OpenCE's checker corrects
the value as the map loads, before the game reads it.
2026-10-19 22:23:11 +13:00
xshxdex98 ff6cbeb7f5 debug.gpu_stats: the frames that stall, and the textures uploaded
The per-second line averaged every count over its 60 frames, which hides
the frame that stalls. It also tells the textures uploaded in those
frames (how many, and their size: a texture cache filling up uploads
them again as the view turns), and the most draws and the longest time
of one frame.

(cherry picked from commit 68e58d36cb5321e95f87d9b30581458b1df0aaad)
2026-10-19 22:22:08 +13:00
Milenko e931bc7b44 debug.test_input "menu:<buttons>": menu buttons pressed one a second, for testing the menus
(cherry picked from commit 4b80d7dfa50f8a99db883ce61c9bf5a5199f20f1)
2026-10-19 22:21:59 +13:00
Jonas Volman a6e7a3a7a0 Port: keep blended colours within [0, 1]
Starting a system link game on Blood Gulch in the Windows build stopped
on two colour range asserts: rgb_colors_interpolate's result (a
structure decal's random tint) and a transparent shader stage's
animated constant colour. Both blend two valid colours by a factor in
[0, 1], and the native builds' x87 code can carry such values (and
periodic_function_evaluate's 255*(1.0f/255.0f)) at more than single
precision, a hair past 1. The blends are pinned to [0, 1] before the
asserts, and periodic functions return values in [0, 1].

(cherry picked from commit 5c1e49f189e09212d6bc9568649b1cdb7b1e005e, with
the changes marked port: in place of that fork's HALO_LINUX, which OpenCE
never defines, and without its README table)
2026-10-19 22:21:30 +13:00
MrBruh 167d67ec2f Raise the network version for the keep-alive's message table
The picked keep-alive fix moves the Xbox game's begin game, graceful exit
and pregame keep-alive field lists under their own messages and makes the
keep-alive a long, its size on the wire. No byte on the wire moves but the
keep-alive's last two, which were the sender's stack and are zero now
(tools/test_network_messages.py compares every message's bytes with the
old table's), but the change is one to what the machines send each other,
and network_format.txt records the table: version 31, recorded, and said
in NETCODE.md.
2026-10-19 22:12:00 +13:00
MrBruh 7153e0b717 Mark the picked fixes to the game's sources as the port's
Several of the fixes taken from the forks changed source/ without the
port: comment that marks a change from the original, and three removed
the notes on the original's bugs without saying they were fixed. Each
change now says so.
2026-10-19 22:05:16 +13:00
xshxdex98 81a79fdf74 Keep the map lists still under a resting pointer
The campaign's level list and the multiplayer map list moved on whenever
their first or last row had the focus, so a mouse resting on either end
scrolled the list every frame. They now move on only when the d-pad put
the focus there (list_scrolls_at_end), as every other list in the menus
does. The host screen's listing spinner also checks that its option
exists before reading whether it shows.

(cherry picked from part of commit c75850e945093518881d1ffa184dd145967422e1,
a larger tidy of that fork's menus; only these two fixes apply to OpenCE)
2026-10-19 22:03:40 +13:00
Milenko 0a32d97bae Disc setup: multi-language European discs
Some European discs (the Spanish/Italian one, for example) have no maps
folder at the root, only one per language (maps_es, maps_it, ...), so
setting up from such a disc image stopped with "the disc image has no maps
folder".

When there is no maps folder, the extractor now takes the language folder
for the system's language (the desktop's LC_ALL, LC_MESSAGES or LANG; the
Android device's locale; the browser's language), else maps_en, else the
first one, and copies it to maps as before. debug.txt says which one it
took.

(cherry picked from commit 6cb6dfa7332934f6d86c7b4feefb645e76f977bb, made
again on OpenCE's disc readers, and in the web build's xiso-worker.js with
a test)
2026-10-19 22:02:55 +13:00
Milenko 3c67ccc6c1 Linux: the mouse wheel works under X11 again
The portable build's own SDL was configured without XInput 2.1's scroll
classes: SDL's check links a test program against the system root's
libX11, whose libxcb the system root has not got, so the check failed.
Built that way, SDL still drops the wheel's button events as emulated by
XInput 2 but reads no scroll valuators, so under X11 the wheel sent
nothing. CMake's checks now link with --allow-shlib-undefined, and
tools/linux_sysroot.py requires SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_SCROLLINFO.

(cherry picked from commit 311f02bb50d4a0d2ffaf372a474ca0e8e98168c6, without
its 64-bit system root, which OpenCE does not have)
2026-10-19 22:00:22 +13:00
Milenko c90c5a2078 Controls Setup: Android keeps the keys' US names (its guest has no keyboard layouts)
(cherry picked from commit 9fa5fec148869ba145518d6e3cb66ad805403e57)
2026-10-19 21:59:38 +13:00
Milenko b68c0a650d Controls Setup: keys shown by the keyboard's own labels
A binding names a key by where it sits (its scancode, named as on a US
keyboard), so WASD stays under the fingers on any layout, as Halo PC's
DirectInput keys did. The menus showed those US names, so on a German
keyboard the zoom key "Z" (the key right of the left Shift, labeled Y)
showed as Z, and pressing the key labeled Z to rebind it showed Y. The
menus now show each key by the character the keyboard's layout gives it
(SDL_GetKeyFromScancode); keys with no character of their own keep their
names. config.toml keeps the US names, so a config means the same keys on
any keyboard.

(cherry picked from commit 86bf862d0ebf47f252fb41a0a77fdd52f96615f1, without
its dedicated server stub, and with the settings table in
port/linux/README.md)
2026-10-19 21:59:38 +13:00
Milenko 494523978e Settings: say why a config.toml change did nothing
- An unknown setting whose name belongs to one setting says which section
  it goes under (menus at the top of the file: under [display]).
- A file that cannot be parsed says every setting is at its default until
  it is fixed, and that a word value needs quotes.
- port/linux/README.md says so.

(cherry picked from commit d474fac1feb9b7faa55229d9e48c91aadadfc5d2, without
its macOS check, and with its README note in port/linux/README.md's
settings)
2026-10-19 21:58:46 +13:00
xshxdex98 592b01a7c6 test_linux_port.py: skip the Linux-target builds on other hosts
test_xdk_headers_compile_for_the_game and test_p2p_signatures_and_listings
compile for i686 Linux, and the p2p one runs what it builds. On Windows they
failed whenever clang was on the PATH: no Linux system headers, and shlex
stripped the backslashes from ninja's command. CI runs them on Linux.

(cherry picked from commit 6aa077faf95dd270fb2cea1b4caa65ef67e96dca)
2026-10-19 21:58:02 +13:00
Milenko f7f5c5b003 Linux: the portable build says when its path has a space
In a checkout whose path had a space, the portable Linux build failed in
SDL's configuration with errors that did not say why: CMake was given the
toolchain file's path unquoted, and SDL's build splits the system root's
include folders from pkg-config at their spaces. The paths are now quoted,
and the SDL step stops at once with a message saying to move the checkout;
port/linux/README.md says so too.

(cherry picked from commit 21e0aa6531e92547f0b8dc53120674da32207a1c)
2026-10-19 21:58:02 +13:00
xshxdex98 7fcb46d1df Gamepads: the log says each pad's kind and the device it is read through
debug.txt's gamepad line gives the pad's kind (ps5, xboxone, ...) and the device SDL reads it through: on Linux, a hidraw node when SDL's own driver has the pad (a DualSense's lights and rumble), an event node when the kernel's does. A player whose pad misbehaves can say which.

(cherry picked from commit ff238bfaae21b52a819de093e5141a028373e1f3)
2026-10-19 21:57:31 +13:00
xshxdex98 fc51992a7e Menus: a failing event function names its widget
"event handler function failed" said nothing of which: the gametype
editor logged it fifteen times. It names the function's number and the
widget's tag, taken before the function runs (it may delete the widget).

(cherry picked from commit 5f4494f42b1919dc1e38c6f8e168b646768e74f1)
2026-10-19 21:57:31 +13:00
Milenko f066c257c9 A sound refused for its format is named in the log
"attempt to play a sound that was not a mono 22k compressed sound..."
now says which sound tag, and its compression, encoding and sample
rate, so a report of it can be traced to the map that has it.

(cherry picked from commit e859daf04476ad2b0608f130e9b63ac0cf7140a8)
(cherry picked from commit 9e9104b26907b748ace50e004fd5e9f2c0167b11)
2026-10-19 21:57:31 +13:00
Milenko f3912112b2 Scripts' print and inspect on screen only with console_log = "all"
The campaign's scripts print their progress and music cues ("mission
script is running", "levels\b30\music\b30_01", the dialog lines), which
the Xbox never showed. They are the game's chatter now, on screen when
config.toml's game.console_log is "all", like the rest of it; print and
inspect typed at the console still answer whatever the setting is.

(cherry picked from commit 114453cc1a84be4fc5622053d2afb57c1ae58e7f)
2026-10-19 21:57:25 +13:00
Milenko 4126d5e3d2 Write watch: a write racing another thread's to the same page is no crash
mark_written cleared a page's protected mark before making the page
writable. A second thread whose write to that page faulted in between
found the mark clear and took the fault for a crash: Windows passed it on
to the crash reporter, and Linux and Android reported a crash and put back
the previous handler, so the next watched write ended the game. The I/O
thread's platform_contiguous_write and the main thread's writes meet this
way on a shared page.

A page made writable by the watch is now marked so (2), and a fault on it
is retried; a page the watch does not know (0: freed, or not watched) is
still a crash.

(cherry picked from commit 57baaec22eef2332ee69b1b4a79686e3bb8f0e3d, made
again on OpenCE's watches without the fork's 64-bit and macOS code)
2026-10-19 21:56:59 +13:00
MrBruh 7f625aa3a0 Name the build numbers in the gamescope update line
The picked line named the fork's release versions, which OpenCE's updater
does not have: it reads build numbers.
2026-10-19 21:56:02 +13:00
xshxdex98 465ab85e66 Updates: the log says why a build doesn't look
A build without a number, or one with update.auto off, now logs that it
does not look for a new version and why, rather than nothing.

(cherry picked from commit 05ee6d14c82009d0dd368adff01b96d63356f98b, with
OpenCE's conditions: a build number and update.auto)
2026-10-19 21:55:20 +13:00
Milenko feac00205d Updates: no question under gamescope
The update question is SDL's message box, a system dialog, which crashes
the game under gamescope (the Steam Deck's Game Mode). There the game does
not ask: it writes the new version in the log, and the player updates from
the desktop or with debug.update_answer. gamescope is known by
GAMESCOPE_WAYLAND_DISPLAY, XDG_CURRENT_DESKTOP, or Steam's SteamDeck and
SteamGamepadUI together, which Wine passes on to the Windows build.

(cherry picked from commit 1339ca420f710882dacdf1151a63f96db6211c29)
2026-10-19 21:54:57 +13:00
Milenko a3c65cd041 Updates: the replaced files put back when one cannot be replaced
(cherry picked from commit 26faf2ef088d088a9d0df0f4e195b0edc2fd4ab2)
2026-10-19 21:54:57 +13:00
Milenko 2e0bf83819 Updater: downloads and unpacked files bounded in size, release names checked
The self-updater now refuses a download larger than it expects (the
release check at 1 MB, the zip at 256 MB, in place of one 512 MB limit for
both), stops unpacking a stored entry once it passes its stated size (an
inflated one already stopped), accepts only plain release file names, and
unpacks the zip from the one copy it read.

(cherry picked from commit 2045acc0b6d2fe2306d10c9cc66b4342ae8ef90e, without
its check of a release's version name: OpenCE reads a build number)
2026-10-19 21:54:57 +13:00
Milenko 15f2417f6a Invites: only their first digits in the log
Players post their logs, and an invite lets anyone join while its host
runs. The hosting line and a new invite for a listed game now log the
link's first digits only; the whole link stays on the clipboard and in the
menus.

(cherry picked from commit e8c35a43bccc6047f1bf7494614876a0a6eb5d84, without
its macOS, startup-stash and dedicated server parts, which OpenCE does not
have)
2026-10-19 21:53:10 +13:00
Milenko 6e03bc9199 Discord: the application id taken only as digits
It goes into a file's path on macOS and into the handshake; an id that is
not a number is ignored, as an empty one is.

(cherry picked from commit 56b38e49b7af6be0054f5c13eb446a4f36baaacc)
2026-10-19 21:52:14 +13:00
Milenko 2de41ae5fd Internet play: a STUN server not found is looked up again
A STUN server whose name did not resolve was given all its attempts with
no address, and the only way back (attempts reset after a refresh's time)
needed an address. So a lookup that failed once, as when the game hosts or
joins before the network is up after a wake, left that server unused
until a restart: no public address was offered, and joins across NATs
failed unless UPnP forwarded a port. It is now looked up again every 25
seconds until found.

(cherry picked from commit 775aaf9adb92af58336b41010dc82cf397e67ade)
2026-10-19 21:52:14 +13:00
Milenko 4973c5f1d5 Internet play: a broker closed while its topics change asks for them again
broker_sync_topics went on after a subscribe or unsubscribe whose send
closed the broker (a send error, or its output full), and recorded every
wanted topic as had. broker_close had just forgotten them, and nothing
on reconnecting does, so the next sync found nothing to do: the broker
stayed without the host, join, slot or query topics until they changed
again. It now stops when the broker is no longer ready.

(cherry picked from commit e4bc27dcf68ea0de841bb1c097465cd67009cfbc)
2026-10-19 21:52:14 +13:00
Milenko b24b89f920 Internet play: a listing a closed broker never got is published again
broker_publish_listing answered 1 even when the publish's send closed
the broker, so its caller recorded the listing's version as published.
Closing reset that version and the broker's will cleared the slot, but
the caller then set it back, and the listing was missing from that broker
until the next republish (up to 30 seconds) or a tombstone was skipped.
It now answers whether the broker is still ready.

(cherry picked from commit dfe3514d75a5ca79e0403796da45ad6dbf55dea9)
2026-10-19 21:52:14 +13:00
Milenko c9f3d07eb5 Take a live game listing only within an hour of now
A browser took a retained listing only if its time was near its own, but a
live one at any age: anyone watching the brokers could publish an old, signed
listing of a host long gone again and fill browsers with dead games. A live
listing now has to be within an hour of this machine's clock, wide enough for
a host whose clock is off.

(cherry picked from commit fbdbd07300230e42ca92474b141eb8b78fae8683)
2026-10-19 21:52:14 +13:00
Milenko c827e29b63 Leave out tunnel addresses no machine can have
A joiner's offered addresses were all tried. Ones in 0.0.0.0/8, multicast,
reserved or broadcast, or with port 0, are now dropped before the host sends
anything to them. Loopback and LAN addresses stay, for two copies on one
machine or network.

(cherry picked from commit 69bd0d6a5669534a8b7fb3fa5d639af933c42381)
2026-10-19 21:52:14 +13:00
MrBruh d692e067cb Use the validator's own file check in the bitmap group fix
The picked change named the fork's file_contains and file_length, which
OpenCE's validator does not have: tag_validate_file_contains checks every
file of a Custom Edition map's offsets. The pixel data is moved to 0 only
once, so a map of no bytes cannot check its bitmaps forever.
2026-10-19 21:52:08 +13:00
Milenko ab2533a1a3 Validator: a bitmap emptied by its group stays clean
A bitmap whose pixels its group's data offset put outside the map was given
the start of the file as a negative offset, which the bitmap's own check
then corrected again: the tags as corrected were not clean when checked
again. It is now given the group's data, moved to the start of the file
when the data starts at its end. Found by fuzzing.

(cherry picked from commit 6b38c3df8daf16ab134f81287404f94ba5b07f06)
2026-10-19 21:51:49 +13:00
MrBruh 4f0313af55 Let Custom Edition models have more than 32 shaders
The map check cut a gbxmodel's shaders to 32, the tools' maximum, and set
the parts that used the rest to shader 0, so they drew with the wrong
shader. The game reads a model's shaders only through their block, by its
parts' shader indices, which the check holds to the block; Halo PC's
engine took more (h3_foundry's spartan has 56). The block's maximum is
now the tools' (TAG_SCHEMA_TOOL_BLOCK), as for the other blocks Custom
Edition's tools went past.

Ported from commit accc904940b00dcdbea3418c3f34bea5748a9a1e, which made the
same change in that fork's own loader. Reported by Sabriel.
2026-10-19 21:50:54 +13:00
Milenko 904fbbfc1e Network: the pregame keep-alive is a long, as on the wire
The packet table had begin game, graceful exit and keep-alive each on its
neighbor's field list (the Xbox game's table order is not their type
order), so a keep-alive's short was encoded and decoded as a long: the host
sent 2 bytes of stack past it, and a client wrote 2 bytes from the network
past it on its stack. The field lists now sit under the messages whose wire
they describe, and the keep-alive is a long. Not a byte on the wire moves:
begin game still carries a short (16 bits of its long), exit and keep-alive
a long, so OpenCE and earlier builds play as before; the keep-alive's 2
bytes that came off the stack are zero now. tools/test_network_messages.py
encodes every message under AddressSanitizer and compares the bytes with
upstream's table.

(cherry picked from commit ee32bdad42615402053291344e3c89f8bcc04161)
2026-10-19 21:49:02 +13:00
Milenko ce59b93165 Checkpoints: wait in game ticks, not frames
A checkpoint (game_save) waits for a safe moment and gives up after
240 ticks; it checks every 10. Those counts were advanced once a frame,
which on the Xbox was once a tick. At 60 frames a second or more a
checkpoint gave up in a few seconds or less, often before the fight it
waited for was over, so few checkpoints came: on Halo (a30) the player
could get only the first. The counts now advance once a game tick, as
the Xbox's did: 8 seconds at any frame rate.

tools/test_checkpoint_timing.py checks it at 30 to 990 frames a second.

(cherry picked from commit abc42998232b6261220a764e6de44641067ff2f5)
2026-10-19 21:49:02 +13:00
Milenko a321e98fd0 PC menus: the mouse wheel leaves a screen's button bar
A screen's button bar (SELECT and BACK under a list) steps sideways, so
once the wheel scrolled past a list's last row onto the bar it went back
and forth between the two buttons until a row was chosen again with the
mouse. A touch drag already left the bar with up and down, as the d-pad
does; the wheel now does the same.

(cherry picked from commit 2ddad079fa5435a70a383d757de16b960c421505)
2026-10-19 21:49:02 +13:00
xshxdex98 a9bfd7d4fa Menus: a tapped level, map or gametype is the one started
A tap on the touchscreen focuses a row and activates it in the same frame,
before the list's update has read which row has the focus, so New Game
started the level shown before (Pillar of Autumn on a new profile, as
players on Android saw), and the map and gametype lists took the entry
shown before too. Each list's choice is read again from its focus when it
is activated. A mouse hovers first, so the desktop builds were not seen to
do this.

(cherry picked from commit fba908137d3a3dfe8b61a5a84678f7c2bb4435b8)
2026-10-19 21:49:02 +13:00
Milenko 5e1cb4ced7 Network co-op: clients see the AI's grenades
Only the host runs the AI. An actor picks its unit's grenade type as it
gives it grenades, so on a client an AI unit kept no grenade type at all.
When the host's control told it to throw, unit_throw_grenade_begin found
no grenades of type NONE and the throw never began: a client saw no
grenade, then took the blast that the host's damage brought.

A client now gives an AI unit the type of the grenades it carries, as
the host's inventory says, when it has none or none of its type left,
and never in the middle of a throw.

(cherry picked from commit 92aaf6388fdfe37b640cacd162fd101dbae0ebe2)
2026-10-19 21:49:02 +13:00
Milenko 518a628553 Unit mouth debugging draws nothing for a unit without a head marker
debug_objects_unit_mouth_apeture placed its label at an uninitialized
marker when the unit had no head.

(cherry picked from commit a56597a9666a354a0a8f9e7f2e017cc418d4922a)
2026-10-19 21:48:48 +13:00
xshxdex98 c8cbc3e3cb Co-op: clients show the letterbox outside cinematics too
A cutscene that leaves the players their controls shows the black bars
without starting a cinematic; clients took the host's letterbox only while
a cinematic ran, so they had none.

(cherry picked from commit 43f646b586626fa8a154d87118abefe6d31d2ced)
2026-10-19 21:48:48 +13:00
xshxdex98 05d7fd38fc Server: players held for a map download are the pregame's again after the game
A machine still downloading the map when the game started has its players held out of it until the download finishes (OpenCE's). One whose download did not finish before the game ended came back to the pregame without its players, as the reset dropped the held ones; they are put back in the game's list instead, as the other players are kept.

(cherry picked from commit 6aa90bfb59557b8c98e2c8543aa4c42d9e3918c1)
2026-10-19 21:48:24 +13:00
Milenko 3f06bf815f No shield damage sound while an overshield drains
On a network client the overshield's drain arrives with the host's updates
after the HUD has taken its last shield value for the tick, so every frame
the shield looked a step lower than the HUD remembered and the shield
damage sound played for the whole overshield. The Xbox plays nothing.

The meter's flash already told the drain from a hit (a step of 0.05 or
less from past full); the sound now uses the same test, so a drain is
silent on host and client while a real hit on an overshield still flashes
and sounds.

(cherry picked from commit fd9c918313076ecc686209a0f4c75a6ef23340c4)
2026-10-19 21:48:24 +13:00
Milenko 2223f94579 Multiplayer: no Running Riot for a killer with no kills in a row
The kill announcement picked Running Riot whenever the killer's kills in a
row were a multiple of five, and zero is one. On the Xbox the killer had
just been credited with the kill, so it was never zero; a network client's
copy of the statistics can have the kill credited to no one or to someone
else until the host's statistics arrive, and announced Running Riot after
one or two kills.

A killer with no kills in a row now gets the plain kill message.

(cherry picked from commit 1b6cf950532f6d9590690c86c253def5395a132f)
2026-10-19 21:47:44 +13:00
Milenko 8453be8dc3 Team Oddball's built-in variant starts cleared
build_game_variant_team_oddball left its variant uninitialized while
every other builder clears it, so the fields it does not set (the name
and the flags beyond those it sets among them) were whatever was on the
stack.

(cherry picked from commit 4c3e7664aab234e1b56a84a3b3dd3c8d1bebf58a)
2026-10-19 21:47:44 +13:00
Milenko e0cf4f8809 Static vertex and index buffers: a failed creation leaves no buffer
A failed CreateVertexBuffer or CreateIndexBuffer may leave its output
unwritten, which was then tested uninitialized.

(cherry picked from commit 28f0a433093e4b7d6082123b45e19fd37beee262)
2026-10-19 21:47:44 +13:00
Milenko f1f33b05d1 Contrails of an unsupported render type release their buffers
A ground contrail (or another type the renderer lacks) left its
triangle and vertex buffers locked and allocated, and the rasterizer's
lock operation set, for every frame it was drawn.

(cherry picked from commit b335386569e840c601eaf238d7585c73fa60516c)
(cherry picked from commit 56f5d99b1d6e81c30c4021c2437b2bd71475c83d)
2026-10-19 21:47:44 +13:00
Milenko 88eb3e3c73 Sound: a map's close stops channels no sound owns any longer
A weapon's charging loop still on a channel as a network game ended
("still counted as playing ... let go", sound_cache_close) was finished
by the next map's sound_render against the next map's sound cache, which
halted the game as the next network game loaded (data.c: xbox sound index
is unused or changed). sound_dispose_from_old_map stops every channel
still holding a permutation, so its count is given back while the map's
sounds are there.

(cherry picked from commit 8e5b3f9f23beb9f015a0caf487caa82ada16c73e)
2026-10-19 21:47:44 +13:00
xshxdex98 88b0290186 Progress bar: a depth buffer released only if there is one
OpenCE's leak fix releases the surfaces the capture took; the device's
depth buffer may be none (D3DDevice_GetDepthStencilSurface's NOTFOUND),
and D3DResource_Release reads the resource it is given.

(cherry picked from commit ff654a774061c74d30f31ce986d7ebdefcafad74)
2026-10-19 21:47:44 +13:00
Milenko 572c674e43 Change Name in a game no longer crashes
The virtual keyboard kept its keyboard tag from the main menu's map after
that map was unloaded, so Change Name in Settings from a game's pause
menu opened it on a stale tag and the game stopped. The keyboard is now
let go with the old map's interface, as its tags are; at the main menu it
is set up again, and in a game Change Name does nothing.

(cherry picked from commit 4c05c5b3237330669f55c2bdb123b7cde4e4e056)
2026-10-19 21:47:44 +13:00
Milenko d161df18ed Network co-op: respawns keep working after everyone has died
When every player dies in network co-op, the host brings them back at
the last checkpoint without reverting. A revert restores the players'
all-dead flag from the saved game; this path left it set. With it set,
players_update_after_game neither respawns a player who dies nor ends
the game, so the next death, of one player or of all, left everyone
waiting for a respawn that never came. The flag is now cleared once a
player is back.

(cherry picked from commit 2e7c88b538b8aada54d0ce877740fb1be091e17d)
2026-10-19 21:47:44 +13:00
MrBruh 607da50209 Bound the elevator height error a client discards and raise the network version (#390)
A client on the same elevator discarded a vertical error of any size; it now
keeps its floor's height only within 4 world units, the platform's travel
over a round trip, so a teleport or fall in height still corrects. Network
version 30: every machine now carries an elevator's riders by the same
tick's movement, simulation they must agree on. distributed_riding_elevator
(was distributed_riding_moving_elevator) is named for elevators at rest too
and looks the elevator up as a machine, as bipeds.c finds it; the source/
changes are marked port:, the original's one-tick-late carry noted as fixed,
and device_machines.c's new functions moved to its public code.

Checked: ninja linux (debug) and ninja android build; pytest tools/harness
passes (492, with a new case and negative control for the bound);
network_format.txt recorded and its test passes.
2026-10-19 21:40:27 +13:00
MrBruh d490fd8bd4 Undo the map list's own return to the main menu after a match (#329)
The Xbox's postgame map select wrappers already carry
main_menu_if_no_history, with which the stock event code calls
main_goto_main_menu() when Back closes the last screen. The PC menus'
connected_map_select_wrapper, which menu_tags.c opens in their place,
was given the same flag by tools/port_settings.py in 4301ca88d, so the
hard-coded names and the network_game_abort() call in
widget_instance_go_back_to_previous were not needed, and they changed
stock split-screen behaviour (a split-screen game is a local server).
widget_instance_go_back_to_previous is as it was before 7d128e1bd.

Checked: the harness and touch menu tests (491 passed), test_web_build
(11 passed), ui_widget.c compiled for Linux and the Android guest.
2026-10-19 21:40:27 +13:00
MrBruh 9f6ea739b8 Take the mouse on focus and leave clicks alone in the XInput2 fallback (#381)
Without the keyboard focus, SDL_SetWindowRelativeMouseMode only sets
SDL_WINDOW_MOUSE_RELATIVE_MODE, so platform_mouse_capture(TRUE) at window
creation or when a menu closed while alt-tabbed went into the fallback
(hidden cursor, grab, warp) where relative mode works. It now releases the
mouse and clears the flag until SDL_EVENT_WINDOW_FOCUS_GAINED, whose call
then tests relative mode for real (SDL_SetWindowRelativeMouseMode returns
at once only when the flag is already set). The fallback needs no clearing
of its own: SDL clears the flag when relative mode fails.

The click that took the mouse back is removed: it undid F12's release on
any click, and the click also reached the game. The fallback does not need
it. The Linux README lists lib32-libxi.

Checked against SDL 3.4.16's SDL_video.c, SDL_mouse.c and SDL_keyboard.c;
sdl_platform.c compiles (-fsyntax-only) for Linux (debug and release),
Windows (clang, i686-pc-windows-msvc) and the web (emcc).
2026-10-19 21:40:27 +13:00
MrBruh 168a4718a8 Describe the disc image next to the executable at the first start (#377)
The first start now uses a disc image found next to the executable
without a file picker, and where no file picker can be shown it says to
put the image there and quits, instead of asking again without end. The
READMEs still described only the file picker. Checked against
platform_offer_game_data and data_find_image in sdl_platform.c: the
folder of the executable is searched, .iso and .xiso match in any case,
the question is still asked, and Windows runs the same code.
2026-10-19 21:40:27 +13:00
MrBruh a4ea7f478e Say that why a host deletes a flag or ball is not known (#349)
NETCODE.md and the comment in distributed_client_delete gave a release
host's unchecked assertions as the reason a host deletes a flag or ball;
that cause has not been found. They now say it is not known and that the
client follows the host's word whatever the reason. The notes on the
skipped assertions also say they cover every deletion of
distributed_client_delete, the client's own objects the host has not told
it of included, not only the host's word. Comments and documentation only.
2026-10-19 21:40:27 +13:00
MrBruh 1081f981fc Merge pull request #390 from eltanschauung/fix/coop-elevator-riders-upstream
Fix co-op elevator riders falling through floors
2026-10-19 21:16:09 +13:00
MrBruh d55174f3a0 Merge pull request #381 from actes2/opence-wayland-mouse-fix
Fix | Linux: Lock and Hide the mouse for Wayland/misc compositors
2026-10-19 21:16:09 +13:00
MrBruh 0393f54f26 Merge pull request #377 from crowtrx/first-start-without-file-dialog
Fix an endless loop asking for the disc image on Linux
2026-10-19 21:16:09 +13:00
MrBruh 4614e00eab Merge pull request #349 from OpenH1/client-flag-delete
Netcode: a client deletes the host's flag or ball without halting
2026-10-19 21:16:09 +13:00
MrBruh 7270ddc069 Merge pull request #329 from innerhat-dev/postgame-menu-begin-random
Allow a full begin_random list and return to the main menu after a match
2026-10-19 21:16:09 +13:00
MrBruh 63786f98e5 Merge pull request #373 from pastudan/web-index-cache-metal-waits
Fix web stutter on Macs: per-frame index cache buffers
2026-10-19 21:16:09 +13:00
MrBruh d8e77289db Merge pull request #370 from addisonbair/swap-stall
Log a frame the graphics driver holds for seconds
2026-10-19 21:15:57 +13:00
MrBruh a4a5b4633f Merge pull request #369 from addisonbair/nat-hint
The server browser says when this network's NAT stopped a join
2026-10-19 21:15:11 +13:00
MrBruh 79e5c979e0 Merge pull request #347 from johncranston303/fix/windows-borderless-alt-tab
Prevent Windows borderless mode from taking exclusive fullscreen
2026-10-19 21:15:11 +13:00
MrBruh 951ec3b017 Merge pull request #339 from FractumSeraph/map-share-game-start
A client is not started before the map it downloads is there
2026-10-19 21:15:11 +13:00
MrBruh 1330f0bdaf Merge pull request #310 from eltanschauung/fix/coop-cutscene-skip-crash
Fix co-op cutscene skip crashes
2026-10-19 21:15:11 +13:00
MrBruh 8295f446c7 Merge pull request #396 from OpenCommunityEdition/android-emulator-fcvt
Fix SIGILL on the x86 Android emulator: rewrite scalar float-to-integer conversions
2026-10-19 20:58:20 +13:00
MrBruh 7a1b683328 Merge pull request #415 from OpenCommunityEdition/testing
Switch OpenCE to the AGPL 3.0 or later, with the disc image readers w…
2026-10-19 20:58:05 +13:00
MrBruh 4b09168e7f Switch OpenCE to the AGPL 3.0 or later, with the disc image readers written again from a description of the format 2026-10-19 20:12:12 +13:00
Mootjuh c53c31c00b Cull the structure triangles the camera can't see 2026-10-19 07:36:40 +02:00
John Cranston 4cbec6c826 Preserve the F11 window mode when saving settings
Only apply the configured window mode when it changes so saving sensitivity or other settings preserves the F11 choice.

Checked with eight local regression assertions against the latest testing baseline. The original behavior and a negative control failed as expected. Live gameplay and a full build of this baseline were not checked.
2026-10-18 17:37:23 -07:00
MrBruh c208663539 Merge pull request #406 from OpenCommunityEdition/testing
Testing
2026-10-19 07:47:40 +13:00
chestahh 711aa46d0c Fix desktop visibility query ownership and asynchronous readback
Create and validate typed query objects, retain each batch until its results
are consumed, and publish completed counts in submission order with the
scale captured for each test. Read available queries directly on the CPU
on AMD and other vendors, avoiding the mapped delivery path that lost AMD
results. On NVIDIA, preserve throughput with disjoint batch storage and
zero-timeout polling of a fence placed after all query-buffer copies.
Keep previous counts while work is pending and quarantine failed batches.

Consolidate the renderer changes developed in GulchCE through
b0c5d017 and 95748a74ce13a77444a7bb3bfe236bf97cfbb21d, as validated at
e5347765275bf324513eca4d044b15b3f6fc12b8, onto OpenCE testing 0110c160.
Only d3d8_gl.c and gl.h change. No MCC or fork features, GLES behavior,
network protocol, build files, tests, or documentation are included.

Validation: all 18 external delayed-GPU and negative-control regression
cases pass against this upstream tree; Windows portable release builds.
The implementation matches the AMD-confirmed and NVIDIA-benchmarked
renderer after excluding the three MCC additions in the fork's file.
Android/web targets are unavailable on this Windows host; branch CI
provides those builds. Android GPU runtime confirmation remains pending.
2026-10-18 18:35:55 +01:00
Stefan MaierandClaude Opus 5.5 307d2a953c Merge fix/lan-join-bots: a lobby the bots fill is open to a person on the LAN too
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 19:09:46 +02:00
MrBruh 81a768bc81 Export the game functions the web page calls, so its loading notice hides once the menus draw and rooms reach the game 2026-10-18 23:49:26 +13:00
MrBruh 1b61b52929 Keep a browser's WebRTC channel from stalling under loss by reporting every gap and giving up old ones, and let the test's lossless run tolerate a dropped burst 2026-10-18 23:36:08 +13:00
neopetal ed54b29c7b Make nav menu sticky at desktop width 2026-10-18 11:19:15 +01:00
MrBruh 0110c16001 Merge bnunu/halo-1 main into testing, keeping OpenCE's code where both changed it and leaving out its matching tooling and logs 2026-10-18 22:31:23 +13:00
frankyfifeandClaude Opus 5.5 f396577e8f Add 5.1 surround sound
The mixer outputs stereo or 5.1 (audio.channels: "auto", "stereo" or
"5.1"; HALO_AUDIO_CHANNELS; Linux and Windows). On 5.1 the speaker config
reports AC-3, as an Xbox set to Dolby Digital, so the game sends its 2D
voices to the center and back mix bins itself; the speaker mix bins 0-5
are SDL's 5.1 channel order. 3D voices pan with equal power between
adjacent speakers at the ITU-R BS.775 angles, spread out when close or
above, at the stereo pan's power; stereo voices positioned in the world
pan their middle the same way and keep their width on the front pair.
The voices' resampling, low passes and reverb send are the stereo mix's;
the reverb plays from the front and back pairs, the voice chat from the
front pair, and the limiter takes all six channels. Stereo output mixes
as before. Android and the web stay stereo.

"auto" is the Xbox's own behaviour: the game asked the console's speaker
setting and mixed for 5.1 when Dolby Digital was on.

Checked on Windows with a 6-channel device: "sound: 5.1 surround" is
logged and the device opens; with "stereo", and with no 6-channel
device, the output is the stereo mix as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:07:57 +02:00
Jonas VolmanandClaude Opus 5.5 e2e62e706a Write the guest's scalar float-to-integer conversions in a form the emulator runs
On the x86 Android emulator every automated network test (debug.network_test
"join", "browse" or "host:<map>") stopped the app with SIGILL a few seconds in,
in hud_calculate_point. That was not an assertion: logcat's ndk_translation
line names the instruction, fcvtzs s0, s0, which clang makes of
(short)fast_ftol(point.x) (convert in the SIMD register, store its low half).
The emulator's ARM translation has none of the scalar conversions from
floating point to an integer in a SIMD register (fcvt{a,m,n,p,z}{s,u} s/d,
with or without fraction bits); the general-register and vector forms work.
The guest image had 141 of them, the HUD's the first to run once a game is
drawn. Devices run them, so only the emulator was affected.

tools/android_asm_convert.py now writes each as fmov to the destination, then
the vector form on it: the copy clears the other lanes, which convert 0.0 to
0, so the register and FPSR end as the scalar form leaves them (the game
reads FPSR through _statusfp).

Checked: on the emulator, each replacement against the general-register
form, 315 cases (every rounding mode, signed and unsigned, single and
double, saturating, NaN, infinity, denormal): the same register and FPSR,
except that the translation's own vector fixed-point form leaves out the
invalid flag on overflow (the guest has no fixed-point conversions). The
rebuilt image has none of the scalar forms left. debug.network_test =
"host:bloodgulch" now hosts and plays on the emulator (game started,
player states logged for 45 s, no signal); "join" searches for 150 s
without stopping. tools/test_android_asm_convert.py (new cases, and clang's
output through the pipeline), ci_build android debug and
tools/test_touch_layout.py pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-17 18:53:06 -07:00
eltanschauung 7a1a9d017c Exclude Monitors from co-op enemy scaling
Use the existing Monitor actor type to keep authored squad counts even when its encounter is hostile. Check the effective actor variant too, including starting-location overrides and major upgrades, before placing an extra actor. Ordinary placement and enemy squads retain their existing paths.

Ten focused regression checks pass, including negative controls for both guards. Only the host creates these actors; no message or protocol change is required.
2026-10-17 18:21:55 -04:00
medic-codeandClaude Opus 5.5 c6c02192ff Draw the match clock on the multiplayer HUD
The gametype's time limit ends a game, and its time left is drawn on the
scoreboard, but a game without one shows no time at all, and the
scoreboard is a button hold away. The clock players time the weapons by
was a stopwatch beside the television.

It counts up from the game's first tick, which is the tick the items'
respawn periods count from as well (game_engine_update_item_spawn's
game_time_get() % respawn_period), so an item is back on the map at every
multiple of its period on the clock: on Chill Out the overshield is up at a
minute, the rocket, camo and overshield at two. Elapsed rather than
remaining for the same reason: a game with a time limit is the one a
player most wants to time the rockets in, and its time left is on the
scoreboard already.

It is drawn at the bottom right, where the versions players know it from
put it, clear of the first person's weapon. The HUD's own text colour is
lost against a map as bright as it, so the clock is lifted toward white and
drawn whole. ticks_to_unicode_time_string leaves the minutes out below a
minute, which a countdown reaches only at its end but a clock counting up
starts at, so the digit is put back at the call.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01194FWhCaedcdGjEksr1H8w
2026-10-17 11:12:58 +02:00
medic-codeandClaude Opus 5.5 142ab20ba2 display.match_timer, off, and its row in the graphics settings
The match clock is opt-in: Custom Edition's HUD has no match clock, so the
HUD looks as it did unless a player asks for one. MATCH TIMER goes on the
graphics settings screen after GLOW INTENSITY. The screen is as
tools/ce_menus.py writes it with the row. Nothing draws the clock yet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01194FWhCaedcdGjEksr1H8w
2026-10-17 11:12:58 +02:00
eltanschauung 1b03880209 Keep co-op elevator riders aligned through reversals
Carry riders by the current collision transform rather than the previous tick's movement. Preserve supported riders' height through stopped-device predictions and delayed client echoes without suppressing normal jumps, departures or authoritative teleports. Local history only; network messages and protocol version are unchanged.

Validation on upstream main: 379 CPU/menu/assembly tests, including 32 focused elevator cases and negative controls; all three changed C files compile for Windows x86. Earlier native integrated-fork probes passed on b40/c40 at simulated 100/200 ms RTT through reversals and phase snaps.

(cherry picked from commit a38b7db0f4eb4ccc66f5445a6e9c4eef2fb0114a)
2026-10-17 04:17:09 -04:00
Dan PastusekandBridge e6fdb07c39 Scope zoom effect: a few passes at any resolution, not one per screen scale
A scope's zoom (the pistol's, the sniper rifle's 2x and 8x, any weapon whose
HUD has a convolution screen effect) draws a warp: copies of the screen a
radius apart, blended outside the scope's mask, in two full-screen passes on
the Xbox. To keep the copies from standing apart as ghosts at high
resolutions, f815e1cc split the radius into as many times the passes as the
screen's pixels to the Xbox's one, up to six: ten full-screen passes (and
their target copies) at 2160 lines. On an M4 Mac mini in Chrome (ANGLE on
Metal) at 3840x2160 that took a frame from 17-22 ms to 34 ms with the
pistol zoomed on b30 and from 16.7 ms to 22-56 ms with the sniper rifle on
a50, all of it GPU time: with the screen effect off, a zoomed frame took
what an unzoomed one did, though zoom raises the draws (the level's LOD and
culling: 230-350 draws to 470-640 on b30) nowhere near enough to matter.
It also narrowed the blur: N passes at a radius over N have 1/N of the
variance, under half the Xbox's at 2160 lines.

The Xbox's passes are now drawn as they were, at the effect's radius, and
two more, at a third and a ninth of it, put eight copies between each two:
up to nine screen pixels to the Xbox's one (2160 lines are 4.5) they stand
no farther apart than the Xbox's did in its own pixels, two more again up
to 81. The blur's variance is 6% more than the Xbox's. At 640x480 nothing
changes.

Checked at 3840x2160 (headless Chrome, device pixel ratio 2): b30 pistol
zoomed 17-22 ms, as unzoomed (was 34 ms); a50 sniper rifle 2x and 8x zoomed
16.7 ms, as unzoomed (was 22 ms, 56 ms in one view). New harness test
(tools/harness/tests/test_screen_effect_passes.py): the pass count and
radii, the gaps between the copies and the blur's width at screen scales
1 to 1000, with negative controls.

Co-authored-by: Bridge <agent@bridgedesktop.com>
2026-10-17 00:51:02 -07:00
hkmoddandClaude Opus 5.5 c91badc15b Fit the texture idle test to the HUD's refresh of cached bitmaps (#376)
xgpu_texture_cache_begin_frame now also reads the high-res HUD's
settings (#378), drops an entry's upscaled sheet (#380) and forgets the
recent lookups. The test's fake world gains those members and functions,
with settings that never change. Its 3 cases and 4 negative controls
pass.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:58:54 +02:00
hkmoddandClaude Opus 5.5 90bf6fcb3a Merge main (build-213) into the texture idle time branch
The one conflict was in xgpu_texture_cache_begin_frame's declarations.
Main gained the high-res HUD's refresh of cached bitmaps (#378) and here
the sweep counts time (idle_since, now); both are kept, declarations
before statements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:58:52 +02:00
hkmoddandClaude Opus 5.5 558f85f803 Tone map display.hdr from the resolved texture without copying it (#280)
With multisampling, the tone map reads the resolved back buffer and draws
into its multisampled renderbuffer, so it need not copy the texture first:
the copy is kept only for the case that draws into the texture it reads.
The shader takes each pixel with texelFetch, and the copy was a nearest
blit of the same format, so what is drawn is unchanged.

Checked in a 48-machine co-op at 2560x1440 with msaa4x, uncapped, in
alternating windows of one game: the tone map's GPU time falls from 236
to 224 us a frame, and with the presentation's resolve from 270 to 228 us.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:50:23 +02:00
hkmoddandClaude Opus 5.5 6337fb45d2 Merge main (build-211) into the HDR branch
The one conflict was the generated Graphics screen, which gained HIGH-RES
HUD on main (#380) and HDR and HDR DISPLAY here. It was resolved by
writing the screens again with tools/port_settings.py: the generator
gives the merged file byte for byte. tools/test_web_build.py's menu test
passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 23:50:02 +02:00
Ari WilsonandClaude Opus 5.5 a22dd332f7 Add the Master Chief Collection's Bumper Jumper button layout
Settings > Gamepads > Button Layout gets a sixth choice, Bumper Jumper as
the Master Chief Collection has it for Halo: Combat Evolved: jump on the
left bumper (the Duke's white), melee on the right (its black), switching
grenades on A, action and reload on B and the flashlight on X; the
triggers, stick clicks, Back and Start are the default layout's. The Edit
Profile picture, which shows the Xbox's pictures of its five layouts,
keeps the row's own picture for this one, of which the Xbox has none.

A layout the build does not know (a later build's) now gets the standard
buttons. With no case for it, every control was on A, start and back
with it, and input_abstraction_update_local_player_preferences' assertion
stopped the game, release builds too. Builds before this one still stop
when they load a profile saved with Bumper Jumper.

The buttons are mapped on each machine before its players' actions are
sent, and profiles are not sent (only names and colours), so
HALO_PORT_NETWORK_VERSION is unchanged.

Checked: tools/harness/tests/test_button_presets.py (every layout keeps
start and back and gives each control a button of its own, Bumper
Jumper's mapping, an unknown layout is the standard one, and three
negative controls), built 64-bit on macOS; the settings screens written
again with port_settings.settings_files(), which changed only Gamepads,
and test_web_build.py's and test_linux_port.py's menu checks; the units
that include player_profile.h and menu_functions.c compiled for i686
Linux against the portable system root. Not yet played with a controller,
and not built for Windows, Android or the web.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 14:23:35 -07:00
actes2 10b461b739 Linux: hold and center the mouse when XInput2 is missing
32-bit libSDL3 loads libXi.so.6 and libxkbcommon.so.0 with dlopen at run time. Where a 64-bit distribution's 32-bit SDL3 package leaves those out (such as Arch Linux's lib32-sdl3), SDL falls back to X11/XWayland without XInput2 and SDL_SetWindowRelativeMouseMode fails with SDL_Unsupported(), or leaves SDL_WINDOW_MOUSE_RELATIVE_MODE set before the window has focus so non-relative motion is dropped.

When SDL_SetWindowRelativeMouseMode does not take, platform_mouse_capture now clears SDL_WINDOW_MOUSE_RELATIVE_MODE, hides the cursor, grabs the mouse in the window (which lets XWayland's xwl_seat_maybe_lock_on_hidden_cursor lock the pointer and emulate warps), and warps the pointer back to the middle of the window after motion.

Checked with ninja linux and ninja android.
2026-10-16 12:26:12 -05:00
Addison Bair 623bc8ced5 StageKit: stage and instrument any scenario on the real engine, with no retail assets
tools/stagekit writes a scenario's map in code (a floor in a box, props, players' starts) and plays it headless, a tick a frame, the same every time. Every player is logged each second and tests check what happened: walking, an obstacle, an elevator ridden up and down. 20 tests, about 2 s, CI-safe.
2026-10-16 16:26:08 +00:00
Addison Bair 1a20d89b9d Test hooks: a tick a frame, cues at their ticks, a game of one machine logged
debug.fixed_step runs a game of one machine a tick a frame, each frame a tick's time, so it plays the same every time, faster than real time; debug.network_test_cues runs console lines at their ticks from the first tick every player is in; debug.network_test "log" logs a game of one machine, and the scripted player follows the game's clock. All off by default.
2026-10-16 16:16:01 +00:00
crowtrx ddfe8b0427 Fix an endless loop asking for the disc image on Linux
On Linux, SDL's file picker needs the desktop portal, which the 32-bit
game reaches through a 32-bit libdbus-1.so.3, or zenity. Where neither is
present, SDL reports an error, but the game took it for a cancelled
choice and asked the same question again, without end.

The game now looks first for a disc image (.iso or .xiso) next to the
executable, names it in the question and extracts it without a file
picker. When no picker can be shown, it says why (put the image next to
the game, or install zenity) and quits. Cancelling the picker still asks
again, and if extracting the image found fails, the next try opens the
picker.
2026-10-15 21:02:35 -06:00
hkmoddandClaude Opus 5.5 7c19ec27ea Drop idle textures after half a minute of time, not 1800 frames
The texture cache dropped a texture once it had gone 1800 frames without
being drawn, and checked every 600 frames: half a minute and ten seconds
at 60 frames a second. At 360 frames a second it is five seconds, so
looking away from part of a level for five seconds dropped its textures,
and turning back converted and uploaded them again; the faster the
display, the more often. On b30 at 357 frames a second, 105 textures were
dropped in 38 seconds of play.

The cache now sweeps every 10 seconds of time (SDL_GetTicks, which the
Android guest and the web have too) and drops the textures not drawn since
the sweep three sweeps before: 30 to 40 seconds after they were last
drawn, which is what it did at 60 frames a second. The frame counter still
orders the palette variants.

Checked with a harness test (tools/harness/tests/test_texture_idle.py)
that runs xgpu_texture_cache_begin_frame from the sources against a fake
clock: a texture last drawn 1 or 25 seconds in is dropped 30 to 40 seconds
later at 360 frames a second, and at 60 as before; on main the 360 cases
fail (dropped after 5.7 and 6.7 seconds) and the 60 one passes. Four
negative controls. Not measured: the time saved, which is small on an
RTX 4080 (each upload took 1.6 ms or less) and larger where conversion and
uploads cost more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 04:37:43 +02:00
hkmoddandClaude Opus 5.5 40c1db8abf Leave the host's bipeds fallen out of the map to the host on a client
biped_check_discard erases a biped that has fallen 2000 units below a
map it has left. On a client the biped is often the host's, whose
delete network_objects_may_delete refuses, and the host stops sending
the state of objects outside the map, so the biped stays there, falling,
and the check logged "is in a bad place ... erasing" every tick: a
co-op client's debug.txt had 6122 such lines for a few flood carriers
in three minutes (up to 3942 a minute), each a localtime, a vsnprintf,
a write and a flush on the game thread. The check now leaves the host's
bipeds to the host, as the falling damage erase already does (49350528).

Checked with a harness test (tools/harness/tests/test_biped_discard.py)
that runs biped_check_discard and network_objects_may_delete from the
sources: the host's biped on a client is neither logged nor deleted over
30 ticks, a client's own biped and the host's are erased once, and one
above the limit is left; without the new condition the client case fails.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 04:18:34 +02:00
Dan PastusekandBridge 2482087ea8 Web index cache written into each frame's own buffer, so Metal does not wait
The index cache (a3277d94) keeps an index array drawn twice the same in
one 8 MB buffer, and draws from it every frame. An array was written into
that buffer the moment it was kept, while queued draws read the buffer:
WebGL on Metal (ANGLE, which Chrome and Safari use on a Mac) waits for the
GPU to finish everything queued before such a write, as #262 found for the
stream and index uploads. While a level is explored arrays are kept every
few frames, so play hitched again and again, worse the longer one played:
one WebGL call of 20 to 40 ms every few frames, and Chrome's GPU process in
-[MTLCommandBuffer waitUntilCompleted] (macOS sample). Resolution and
window size made no difference.

Now there is a buffer for each frame of the ring, drawn from only in that
frame, as #262's chunks are. An array kept is listed, and written into a
frame's buffer as that frame begins (index_cache_begin_frame), when the GPU
is done with it; until its frame's buffer has it, a draw of it uploads its
indices as before. Android and the native builds are unchanged.

Checked on an M4 Mac mini, Chrome 155, b30 with the scripted walking bot
(HALO_TEST_INPUT=bot:1), six 10-second windows from a fresh load each:

  before: 60, 56.2, 57.6, 51.4, 52.6, 51.6 fps; frames over 25 ms
          3, 43, 24, 61, 57, 89; longest 152 ms
  after:  60, 59.9, 59.6, 60, 60, 60 fps; frames over 25 ms
          2, 6, 3, 2, 3, 0 (the same as with the cache bypassed)

The cache still serves 80 to 99% of indexed draws, as before. ninja web
builds; d3d8_gl.c's changed lines compile without warnings under -Wall;
port/web/tests/*.test.js pass, and tools/test_web_build.py passes but for
test_the_sockets_inside_the_page, which fails the same without this change
on macOS (getentropy undeclared in web_net.c, compiled with the host's cc).

Co-authored-by: Bridge <agent@bridgedesktop.com>

Bridge-Chat: #60
2026-10-15 11:55:41 -07:00
Jonas VolmanandClaude Opus 5.5 9980b9698e Co-op players choose their own friendly fire, and one away is hurt by all.
A network co-op game's pause menu has FRIENDLY FIRE ON or FRIENDLY FIRE OFF
(network.coop_own_friendly_fire, on unless changed). Two players hurt each
other only if both have it on, and then as the host's FRIENDLY FIRE says.
A player with no input for over 70 seconds is hurt by every player,
whatever either chose, until their next input: the choice does not shelter
someone who has left the controls. Enemies and AI allies are as before, and
no other kind of game changes.

Only the host deals damage, so only the host keeps the choices. A client's
input says its player's in a byte that was padding, and the host counts
each player's ticks without a button pressed or let go, or a stick or the
trigger held. The network version is 30 for that byte (29 is the Custom
Edition map names'): an older host would ignore a player's choice.

The button is in the pause menu because a co-op game had no way to its
settings: it opens the campaign's pause menu, which gets SETTINGS only in
single player. pause_campaign_patch lays the menu out as it does single
player's with SETTINGS: five rows, 30 apart, in the taller box. Like
SETTINGS, the button needs the PC version's menus.

Checked on Windows in two games of two hidden copies on a30, one player
hitting the other every 10 seconds, keys pressed by a script, once with the
host's player hit and once with a client's. Hits took shields with FRIENDLY
FIRE ON; none did after switching it OFF; with the player left idle, the
hits from 70 seconds on took shields again; and none did after the next
key. A multiplayer game's pause menu, opened on a client, still has RESUME
GAME, SETTINGS and LEAVE GAME. Not tried with a gamepad or in split screen.
Built and run here on Windows only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-15 00:47:10 -07:00
Addison Bair 689913a09e Log a frame the graphics driver holds for seconds
A player's game froze for about 48 s at a time, in the menus too, and online each freeze ended in "connection failed"; a dump showed the frame's swap waiting inside the graphics driver. The log now says so whenever showing a frame takes 2 s or more, so such a report points at the driver without a dump.
2026-10-15 06:46:38 +00:00
Addison Bair 9a19c441f7 The server browser says when this network's NAT stopped a join
A game the browser cannot reach shows "Could not reach <name>" for a few seconds. When this machine's NAT gives each destination its own port and no router forwards the tunnel's (what the log already reports), it now shows "Strict NAT, turn on UPnP: could not reach <name>", the advice first so that a long name is what gets cut.
2026-10-15 06:40:39 +00:00
BirchWoodGodandClaude Opus 5.5 d1cbce9e7d Test the latency meter's arithmetic in the harness
tools/harness/tests/test_latency_meter.py takes latency_meter_color from
latency_meter.c and, from network_distributed.c, the round trip timed by
when its tick was sent, its smoothing, the host's silence on a client and
a client's on the host, with the constants they use, and checks them in a
fake world: the colours and bars at 79/80, 149/150 and 249/250 ms; a tick
no longer kept (or never sent) gives no round trip; at most 9999 ms, also
across the millisecond clock's wrap; the first sample as it is, then an
eighth of each difference; a connection problem after more than 2000 ms
of silence, never before the host's first message, after the game or on
the host. Eight negative controls (a bound moved by one, the stale-tick
check or the ceiling taken out, a quarter's smoothing, no game-over test)
each fail their case. Two source checks: the setting is off by default
and the netcode refreshes the meter only with it on, and the scoreboard
draws a known ping alone in its colour.

Checked: python -m pytest -q tools/harness tools/test_touch_menu.py (358
passed, 16 of them these).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ucYZ9cvWn3nrnk7kK3S5X
2026-10-15 01:07:06 -05:00
BirchWoodGodandClaude Opus 5.5 3f2036eabe Show the scoreboard's pings in the latency meter's colours and measure
With display.latency_meter on, the scoreboard's Ping column agrees with
the meter: where this machine times a player's round trip itself (the
host: every client's, its own players' 0; a client: its own players'), the
column shows that figure, and each known ping is drawn on its own in the
meter's colour for it (green, yellow, red). The other players' pings on a
client are the host's measure in ticks, as the pings message brings them.
With the setting off, the scoreboard is drawn as before.

Without this the two disagreed on one screen: on a LAN the host's measure
in ticks reads 0 to 4 ms while the meter, which counts each machine's wait
for its next tick, reads 25 to 35; with 80 ms of netem the scoreboard said
81 and the meter 107. Nothing more is sent: the pings message still
carries the host's measure in ticks.

Game source change (port: comment): game_engine.c's scoreboard takes a
player's ping from latency_meter_player_ping (distributed_player_ping with
the setting off) and draws a known one alone at the row's fourth tab stop.

Checked: Linux debug and release, web and Android debug and release
build. With netem's 40 ms each way, the host's scoreboard showed 0 and
108 with "Max ping 108 ms", the joiner's 0 (the host's) and 99 with "Ping
99 ms", in the meter's colours; with the setting off the scoreboard looks
as origin/main's (team colours, the host's measure).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ucYZ9cvWn3nrnk7kK3S5X
2026-10-15 01:06:37 -05:00
BirchWoodGodandClaude Opus 5.5 313a1d63c8 Add a latency meter for network games, off by default
display.latency_meter (HALO_LATENCY_METER, default false) shows this
machine's round trip to the host at the screen's top right while a network
game is played: "Ping 45 ms" with four bars drawn as quads, green below
80 ms, yellow below 150, red from 150. The host shows "Max ping", its
slowest client's. A client that has heard nothing from the host for two
seconds shows "Connection problem", pulsing; the host logs a client silent
as long. It is not drawn in the menus, after the game, over a co-op
cutscene (but a connection problem), or when the host plays alone. It is a
setting, off, because the stock HUD has no such meter; only in config.toml.

Nothing more is sent, so the network version stays 29. The meter reuses
the round trips the distributed netcode already takes: the host each
client's from the host tick its input names, a client its own from the
client tick the host's state of its player (or, driving, its vehicle)
names. Those are counted in ticks; the meter times the same echoes in
milliseconds by when this machine sent the tick they name (the last 64
ticks' send times kept), smoothed as TCP smooths its own. A client also
notes when the host's latest message came. All machines, system link,
internet play's tunnel and a browser's WebRTC channel alike, carry these
messages, so the meter reads the same over each. What is shown is
refreshed in the tick twice a second, and only with the setting on;
halo.log then has the round trips every ten seconds ("latency: ...") and
each connection problem as it starts and ends.

Ported from the Halo CE for PS Vita port (BirchWoodGod, contributed under
CC0), where it is on by default.

Checked: Linux debug and release, web and Android debug and release
build; tools/network_format.py: the wire format is the one recorded. A
system link host and joiner in a network namespace with netem's 40 ms each
way: the meter read 89-123 ms on the joiner and 94-128 ms on the host (80
ms of network and each machine's wait for its next tick); all traffic
dropped for 5 s: "Connection problem" on the joiner after
2247 ms, the host "Max ping 2980 ms" in red and its log "machine 1 silent
for 2190 ms", both heard again after the blackout. On loopback with no
delay: 25-35 ms. With the setting off, the game logs the same lines as
origin/main (numbers apart) and config.toml differs only by the new
setting.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ucYZ9cvWn3nrnk7kK3S5X
2026-10-15 01:05:36 -05:00
BirchWoodGodandClaude Opus 5.5 317b33e406 Test the bots' lobby and local games with bots
tools/harness's bots_lobby takes network_game_server_port_bots from
network_server_manager.c, the players' functions from
network_game_manager.c and the bots' machines and names from bots.c, and
checks who joins a lobby, on which team, who leaves, and that no bot joins
a game other machines may join, another gametype, a game once started or a
lobby with no player. Each of its 8 negative controls (a guard or a team
rule taken out) fails its case.

tools/test_bots.py plays a local Slayer game with bots on Blood Gulch and a
Team Slayer game on Chill Out for 75 s each (debug.network_test "local:",
SDL's offscreen video driver) and checks that every bot walks, the bots
kill and die, the game ends cleanly with no assert, and that a system link
game gets no bot whatever bots.count asks. It needs the retail maps in
assets/maps and skips without them.

Checked: python -m pytest -q tools/harness tools/test_touch_menu.py, 361
passed; tools/test_bots.py, 3 passed in 4 minutes; test_linux_port.py and
the format tests, 214 passed, 8 skipped (Custom Edition maps, perfetto);
test_web_build.py, 10 passed. tools/test_death_timing.py does not compile
with clang 22 here, on origin/main too.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ucYZ9cvWn3nrnk7kK3S5X
2026-10-15 00:27:32 -05:00
BirchWoodGodandClaude Opus 5.5 4a275b608d Add bots to local Slayer games (bots.count, off by default)
Computer players for a game played on this computer alone: bots.count (0,
the default, to 15) of them join the lobby of a local split screen Slayer
game, as far as it has room, on the teams bots.teams asks for ("even", or
"against" the players), and follow the players' team changes there. A bot
is the one player of a machine of its own at the top of the machine indices
(113 up), which no real machine takes, so every machine of the game - only
this one - spawns, respawns and scores it as any player.
network_server_manager.c adds and removes them in the pregame;
players_update_before_game takes each bot's action of the tick from
port/linux/game/bots.c in place of its empty queue.

A bot looks for enemies (the AI's line of sight, its skill's reach and
field of view), reacts, turns at a limited speed with an aim error that
settles and leads by its weapon's projectile speed, fires in bursts or a
press a shot, throws grenades, strikes close up and strafes; otherwise it
goes where an enemy was last seen, to a better weapon lying near (the
action button once the game offers the swap), or about the map's starting
locations and item spawns. It walks the paths the campaign's AI finds:
path.c's searches over the walkable surfaces every stock multiplayer map
carries, on a copy of them less those with no room above (Longest's walls)
and those under scenery or machines its path's obstacle avoidance found no
way past (Sidewinder's blast door); stuck, it jumps, sidesteps and looks
again. The searches run in the tick, three a tick at most, so two runs of
the same input play the same. bots.skill sets reaction, sight, aim, turning
and bursts; debug.bot_trace logs each bot's state.

Nothing changes in system link or internet games: no bot joins a game that
accepts remote connections, and bots_update_actions returns unless a local
game runs, so nothing the machines send each other changes and the network
version stays the same. Other gametypes get no bots yet (their goals come
in a later change). The code is BirchWoodGod's, from the Halo CE for PS
Vita port's offline bots, contributed under CC0; this is their core.

Checked (Linux, debug and release builds, SDL's offscreen video driver,
debug.network_test "local:" with debug.test_input "bot:1" as the player):
- 150 s games on Blood Gulch (Slayer, 6 bots; Team Slayer, 7, legendary),
  Chill Out (Team Slayer, 5, heroic), Longest (Slayer, 8), Sidewinder (Team
  Slayer, 9), Hang 'em High (Team Slayer, 5, "against"), Damnation (Slayer,
  6, easy) and Prisoner (Slayer, 15): every bot walked 125-280 units, the
  bots killed 7-118 times and died, teams evened or all against the
  player, and every game ended cleanly with no assert. With
  debug.bot_trace, bots took up rocket launchers, shotguns and sniper
  rifles, and debug.txt had none of the distributed netcode's idle action
  lines.
- bots.count 0: a 60 s local game logs the same lines as origin/main with
  only the network test's local mode (numbers apart), and config.toml
  differs only by the new settings' lines (and the network test's
  comment). bots.count 6 in a system link
  game (host:) and in a local CTF game: no bot joins, nothing logged.
- ninja web and ninja android (Emscripten 6.0.10, NDK r27c) build, debug
  and release.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ucYZ9cvWn3nrnk7kK3S5X
2026-10-15 00:27:32 -05:00
BirchWoodGodandClaude Opus 5.5 1e8ca43cee Play a local split screen game in the network test
debug.network_test "local:<map>[:<variant>...]" sets up the game as the
Xbox menus' Multiplayer > Split Screen does (split_screen_game_initialize:
a server that accepts no remote connections, its client, the split screen
pregame screen) instead of hosting a system link game, then picks the map
and variant, adds controller 1's player and starts it as "host:" does. A
game no other machine can join had no automated way to be played; the bots
of the next commit play in such games.

Checked: "local:bloodgulch:slayer" on a build of origin/main with this
change alone loads and plays the game (one player, debug.test_input
"bot:1"), logs every second as "host:" does and ends with debug.exit_after;
"host:" games are as before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ucYZ9cvWn3nrnk7kK3S5X
2026-10-15 00:26:11 -05:00
biu788 f648b6cb24 Add third-person camera for Warthog and Scorpion passengers 2026-10-15 12:59:22 +08:00
BirchWoodGodandClaude Opus 5.5 2dea8f6c70 Keep a unicode string that ends in '|' from being read past its end.
parse_unicode_string took the character after every '|' and only then
looked for the 'n' of "|n", so a string ending in '|' skipped its
terminator and was drawn on through whatever followed it, until a zero.
Players' names, server messages and a map's string lists are drawn this
way, so any player can send one. Any other '|' also ate the character
after it, and kept the result of the character before (on a string's
first character, the parser's uninitialized one). The next character is
now taken only when it is 'n'; any other '|' is a character, as
parse_string has it. "|n" is unchanged.

Checked: new harness test unicode_line_breaks takes parse_unicode_string
from draw_string.c; its cases are bar-n-ends-a-line, bar-is-a-character and
bar-at-the-end. On the old code the last two fail, and each of its 2
negative controls (the next character taken whatever it is, the '|' left
with the last result) fails its case. tools/harness and test_touch_menu:
347 passed. ninja linux (debug and release) and ninja web build with no
new warnings; Android not built here.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011ucYZ9cvWn3nrnk7kK3S5X
2026-10-14 23:57:18 -05:00
John Cranston 27977a87dc Keep Windows borderless mode from taking exclusive fullscreen
NVIDIA's OpenGL driver can treat SDL's popup fullscreen window as exclusive even when no display mode is selected, blanking the monitor on Alt+Tab. Clear popup and topmost styles for borderless windows before context creation and presentation, including after SDL restores them. Explicit fullscreen keeps its existing behavior.

Checked: Windows release build; hidden native window probe covering styles, bounds, focus, repeated application and mode isolation; git diff --check. Live Alt+Tab was not tested. Android and web targets were unavailable; pytest was not installed.
2026-10-14 17:32:16 -07:00
Marco Cilloni a422135709 configure: add support for cross building with Clang+MSVC on Linux 2026-10-14 18:21:49 +02:00
Paul Hontz da22f9b453 Put the crash handler back over a library's at the renderer's device, and report SIGBUS, SIGILL, SIGFPE and SIGABRT too
memory_watch.c's SIGSEGV handler is installed before main (for the crash
report with the null renderer), and the device's memory_watch_initialize
returned early because it was already active. A library that installed its
own SIGSEGV handler in between (a GL driver as the window opened, a sound
library) then took the faults of the pages memory_watch_protect made
read-only: a crash or a hang at the first write to a texture.

memory_watch_initialize now asks which handler is installed and, where it
is not this file's, installs it again, chained to the one found; the
renderer's frame (memory_watch_begin_frame) checks the same, as a library
can install one at any time. A handler that chains back to this one ends
in the default action instead of a loop.

The same report (signal, registers, stack, calls, to the terminal and
debug.txt) now covers SIGBUS, SIGILL, SIGFPE and SIGABRT. Each is handed on
to the handler before it, or to the default action: a fault runs its
instruction again under it, and a signal sent (kill, abort) is raised again;
a sent signal that was ignored stays ignored. The registers are read by
name on x86-64 too, so that the file compiles there for its test.

Checked: tools/test_memory_watch.py (new; memory_watch.c compiled as it is
with a window of the test's own memory) installs a library's handler over
this one, then initialize: the watched write is noted and let through, the
library's handler gets only an unrelated fault (after the report), and the
next frame puts this one back after a handler that jumped out. Each signal
is reported once and ends the process with that signal. The old file, with
the same main (-m32), leaves the library's handler in place and dies at the
watched write. ninja linux builds.
2026-10-14 11:02:46 -04:00
Paul Hontz 313b6c2191 Report a crash on Linux from the start, also with the null renderer
The SIGSEGV handler that writes the crash report (the faulting address
and the calls) to the terminal and debug.txt is memory_watch.c's, and
only the renderer's device installed it (d3d8_gl.c): with
debug.null_renderer, as the network tests run, no device is made, and a
crash said nothing, as a looping sound's crash in null-renderer network
games did. A crash before the device was made went unreported too.
The handler is now installed when the program starts, as the Windows
build's crash handler is.

Checked: a null-renderer game sent SIGSEGV wrote the report to its log and
debug.txt; the crashes of a forced looping sound crash in null-renderer
games were reported with the faulting address.
2026-10-14 11:02:46 -04:00
Paul Hontz c94e7053e1 Stop a looping sound's track when its looping sound is gone, even in the millisecond it started
A carousel network game between two builds, null renderer on both
(the cross-build sync check's calibration), ended with the joining copy's
SIGSEGV. Its core dump (kept by systemd-coredump) shows
update_channel_for_looping_sound reading a NULL looping sound
(sound_manager.c:2912): the track's looping sound had been deleted by
process_looping_sounds (not refreshed since the last frame, around the
respawn), and the track had started in the same millisecond as the
frame (start_time 55674, render_time 55674, ticks_elapsed 0).
refresh_sound skips the tracking of a sound that has not started yet
(start_time >= render_time), and the tracking is what stops a track
whose looping sound is gone; so the track went on to update_channels.
That needs three frames in one millisecond: never on the Xbox, but the
null renderer runs up to 21 (measured in these games). The original's
bug; refresh_sound now stops such a track first.

Checked: a new asset-free test (tools/harness/tests/test_sound_orphan.py)
runs the real refresh_sound in frames in the same millisecond and later,
with a negative control (the test of the start time alone) failing it.
A build that skips every seventh frame's looping sound refreshes crashed
at the same line in 8 of 8 carousel games without the change, and
played 16 of 16 with it; 40+ unforced carousel games played through.
Sounds are each machine's own: nothing the machines send or agree on
changes.
2026-10-14 11:00:50 -04:00
Paul Hontz 956387d89f Netcode: a client deletes the host's flag or ball on its word without halting
A client on the Steam Frame, in an internet game on carousel, stopped on the
game's exception screen: "objects.c #829: !(weapon_is_flag(object_index))".
The host's object changes had told it to delete a weapon that on the client
is a flag or an oddball (weapon_is_flag reads the weapon tag's "must be
readied" bit, which in the maps only those two have), and
distributed_client_delete deleted it as it deletes any of the host's
objects. The game never deletes a flag or ball while a game type runs, and
asserts so twice: in object_delete_initial_recursive and in weapon_delete.
A release build's assertions only note it in debug.txt, so a release host
can delete one and tell its clients; a client built without --release then
halts, flat or VR alike.

A client follows the host's word: a flag or ball it deletes so is let go of
first (distributed_client_release_item takes it out of its carrier's hands,
as any weapon of the host's), the goal its game type showed at it is cleared
(game_engine_objective_weapon_deleted: CTF's flag and carrier goals,
oddball's ball goal), and the two assertions are not made for an object
distributed_client_delete deletes (network_objects_client_deleting). The
host and the game's own deletions keep them.

On spark, a host told its clients that each flag (one in the client's
player's hands) or the ball was deleted, as a host deleting one does, and
of it again the next tick. Before, a flat client and a VR client halted on
the same assertion as the Frame, in CTF and in oddball; now neither does,
the client's player lets go of the flag, the flag comes back when the host
tells of it again, host and client count the same items, and the player
is killed and respawns after it. A slayer game of deaths and respawns plays
as before.

Files:
  port/linux/game/network_objects.c
  source/objects/objects.c
  source/items/weapons.c
  source/game/game_engine.c, source/game/game_engine.h
  port/linux/NETCODE.md
2026-10-13 23:09:14 -04:00
Jonas Volman 2e376b992e Reconcile approved single-pixel S3TC decoder (+1 function, zero losses)
Apply only the Q-UP25 delta from de53e9bf, preserving both original-defect BUG comments and inferred length spelling. Fresh canonical checkpoint: +493 meaningful / +496 padded code and +76 data, zero losses; 1663 tests pass, 5 skipped, 159 subtests. Whole-board W3 unchanged at 4091; only s3tc.obj changes. Encoder and object admission remain held.
2026-10-13 17:02:57 -07:00
Jonas Volman ff2e07fac1 Replace parked stristr assembly with exact ordinary C (zero credit)
Use the natural C implementation from punpckhdq/halo 745c66b8. All 621 object fingerprints and inherited exact verdicts are unchanged; the single asm-implemented park is retired. Fresh full checkpoint: 1663 tests pass, 5 skipped, 159 subtests. Current scoring already counted the assembly: no additional function or byte credit.
2026-10-13 16:59:49 -07:00
Paul Hontz dfc738fcc6 Model Detail in the Graphics settings
Video Setup's Graphics screen gets a MODEL DETAIL row, which sets
display.model_detail. Its values are stock, native and highest. Its XML
is written by tools/port_settings.py's settings_files(), as
tools/ce_menus.py writes it; no other screen changes.

Checked: tools/test_web_build.py's test that the menus match their
generator; the screen opened with debug.menu_open shows the row with the
setting's value, above the help.
2026-10-13 18:38:27 -04:00
Paul Hontz 5db4184dc6 Texture Filtering in the Graphics settings
Video Setup's Graphics screen gets a TEXTURE FILTERING row, which sets
display.anisotropic_filtering. Its values are 0 (off, as on the Xbox),
2, 4, 8 and 16. Its XML is written by tools/port_settings.py's
settings_files(), as tools/ce_menus.py writes it; no other screen
changes.

Checked: tools/test_web_build.py's test that the menus match their
generator; the screen opened with debug.menu_open shows the row with the
setting's value, above the help.
2026-10-13 18:38:27 -04:00
Paul Hontz b83a259b53 Models' level of detail can be chosen by the display's resolution
The game chooses a model's level of detail by its size in pixels on the
Xbox's 480 lines, whatever the resolution, so at high resolutions distant
models drop to their simpler levels long before it would show.
display.model_detail (HALO_MODEL_DETAIL): "stock" (the default) chooses as
the Xbox did; "native" by the size on the display's lines (without
supersampling's factor); "highest" draws the models native does, each at its
most detailed level. The first-person weapon and the sky are unchanged.
Android draws 480 lines, so there native is stock.

Checked: the same b30 view at 854x480 and 2400x1315 gave the same sizes in
stock; at 1080p native measures 2.25 times as much and moves the corpses and
weapons up a level, highest puts everything drawn at its top level. The
level chosen is used only to draw (render_model's callers are the objects',
the first-person weapon's and the sky's drawing), so nothing a network game
agrees on changes; stock multiplies by exactly 1. Not checked with ssaa2x or
on a 4K display, nor built for Android or the web.
2026-10-13 18:33:50 -04:00
Paul Hontz c31d985492 Anisotropic filtering, 4x by default
The Xbox game never asks for anisotropic filtering: every sampler is linear
or point with an anisotropy of 1, so floors, walls and terrain seen at a
grazing angle blur into their small mip levels. display.anisotropic_filtering
(HALO_ANISOTROPIC_FILTERING) samples the map's mipmapped, linearly filtered
textures (base, detail, bump and environment maps) along the angle, at most
2, 4, 8 or 16 times and at most the GPU's limit; 0 filters as the Xbox did.
Textures the game renders itself are left alone: at 16x the water's ripple
map turned the far ocean into noise. Lightmaps have no mip levels and are
unchanged.

Checked: a10's cryo bay floor and b30's beach, off, 4x and 16x on the same
frozen frame (grates and sand stay sharp, the water is unchanged); about
+0.08 ms a frame on a10 at 1080p; tools/harness passes. Android and the web
apply it only where GL_EXT_texture_filter_anisotropic exists; not built here.
2026-10-13 18:04:31 -04:00
FractumSeraphandClaude Opus 5.5 62379e5614 A client is not started before the map it downloads is there
A client that joins a lobby on a Custom Edition map it does not have
downloads it by map sharing. When the host started the game meanwhile, the
host held the client's players out, as it should, but the client, whose
download began in the lobby, did not know the game had started and asked
for its player again; the host took the request as a late joiner's and
started it at once. The client then loaded a map it did not have yet:
cache_files_precache_map_begin's damaged disc error, which stops the game
for good. Stock build-201 does the same with its own host.

- The host (network_server_manager.c): a player asked for by a machine
  still downloading the map waits with those held at the start
  (network_game_server_hold_requested_player), and joins with them, the
  machine started as a late joiner, once its download is done
  (network_game_server_release_map_fetchers).
- The client (network_client_manager.c): a start that comes while the
  map is still being downloaded, from a host of an earlier build, is put
  off until the map is there (network_game_client_begin_game,
  network_game_client_idle_pregame), and dropped if the game it was for is
  over by then (another map, or another game).
- NETCODE.md's "Map sharing" says what happens when a host starts during a
  download (it said the host waited, which it has not since version 28).

Nothing sent changes: no network version.

Checked: the Linux CI steps, the web build and its tests, and the Windows
release build. End to end on Linux in Docker, the host starting the lobby
game at once while the client downloads (the case that stopped the game):
this build both ends (the host held the player and started it at game tick
296 once the map was there); build-201 hosting this build's client (the
start put off until the map was there); this build hosting build-201's
client (held, then played). Each client played the game.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-13 08:41:59 -05:00
justinfilip 36ea3fb80c Classify a nav marker before drawing it. 2026-10-13 08:06:03 -05:00
justinfilip 7d128e1bde Return to the main menu from the map list after a match. 2026-10-12 20:50:57 -05:00
justinfilip ecfee9b0b8 Allow a begin_random list that fills one word. 2026-10-12 20:50:57 -05:00
Gio aa51dfccc6 Port: Allow split-screen play in PC menus
On the "pc" menu style, a LAN game whose players were all on the host's
computer could not start a local splitscreen game. This patch fixes that
check.

START NOW only starts a countdown for a game that takes no remote connections, has two machines, or
is "alone" (server_alone). server_alone only passed if there was literally one player, making splitscreen play impossible.
Note the "xbox" menu style did not have this bug since its splitscreen
didn't accept remote connections at all.

server_alone becomes server_players_on_one_machine: TRUE if there is at
least one player and every player is on the same machine.
One player still qualifies. Machines that have joined without a player are not
counted, so a lone host's countdown is not stopped when one connects (the
per-tick server_ok_to_countdown check).

The countdown is fully controlled by the host machine, so there is no
change to the network protocol.

There's an existing test failure on test_elevator_prediction which also
exists on main, ignore.
2026-10-12 20:13:42 -05:00
jcompto95-techandClaude Opus 5.5 ad8b012089 Video Setup: an Extra Effects screen for the visual modifiers
Video Setup gets a third category, EXTRA EFFECTS, beside Graphics and FOV
and Viewmodels: a screen for the visual modifiers the stock game does not
have, so Graphics keeps to how the game is drawn. Shield Glow and Glow
Intensity move to it from Graphics; the settings themselves, their
defaults and their names are unchanged.

The screens were written again with tools/port_settings.py; only Video
Setup, Graphics and the new screen changed, and menus.json lists the new
screen.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jtk9vPUKbWd48oBMzXuzd
2026-10-12 18:28:03 -04:00
hkmoddandClaude Opus 5.5 0c3e9f9353 Show the PC menus' text in the language of the Custom Edition's loc.map
Each Custom Edition (English, French, German, Italian, Spanish, Japanese,
Korean, Chinese) has the PC version's menu string lists in its language
in loc.map, by the tags' names. The menus showed the English of
strings.xml whatever edition the maps came from. Now each <strings> names
its PC tag (map=) and each <string> that is the PC version's its index
there; menu_tags.c takes those strings from the loc.map in custom_maps
(or the Custom Edition install's maps folder), read through a
bounds-checked reader in custom_edition_cache.c. The strings the port
adds or rewrites have no index and stay English. A setting,
display.menu_language ("maps", "english"), keeps English for whoever
wants it.

strings.xml is written by ce_menus.py as before; port_settings.py's
OVERRIDE_ORIGINALS maps the lists the port rewrites to the PC strings
they keep. The text without the new attributes is unchanged.

The text is drawn by text_hires.c, as the English is. The pictures with
words (titles, the main menu's items) are still English. CJK editions'
characters are not in Overpass and fall back to the map's font.

Checked: the Windows build has no warnings. With an Italian Custom
Edition's loc.map, all 1164 strings with an index come from it, and the
Multiplayer, Settings and Item Options screens show Italian, accents
included (window hidden, debug.menu_open). With "english" the same
screens are as before (without a loc.map the code takes the same path,
not run). test_linux_port.py's menu tests pass. Android and the web were
not built.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 21:34:03 +02:00
hkmoddandClaude Opus 5.5 2fb25f8101 Merge main (build-201) into the HDR branch
Main's base vertex extension (#273) changed the same lines of gl.h and
gl_initialize as this branch's half float render targets. Both are kept:
the extension's optional entry points and base vertex detection, then the
half float check, and the log line names both.

Checked: the tree is the same as this branch rebased on main; the Windows
release build has no warnings; a 20-second bloodgulch run with HDR and GL
debugging had no GL errors; the menu generator test passes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-12 20:25:22 +02:00
eltanschauung 4a5505422c Resolve upstream map-sharing conflicts (#257)
Merge upstream/main and preserve its map-sharing includes and updates.

Use message aim-assist policy 87, clear of upstream map-sharing IDs 83-86. Raise network version 28 to 29 because this feature adds a required wire message; record the new format and update its documentation.

Tests compile production message IDs and reject collisions. 293 CPU/menu regressions and three menu/wire-format checks pass.
2026-10-12 14:05:54 -04:00
Steve RiceandClaude Opus 5.5 beb5fe7d35 Give a z-sprite's fragments the depth its DOT_ZW stage computes
nv2a_psh.c translated the DOT_ZW texture stage to a dot product and dropped the depth the stage replaces the fragment's depth with. Every z-sprite particle (a bullet impact's puff, for one) was depth tested as its flat card, so the surface it stands on cut it in half along a straight line through the hit point.

The game's effect shader (rasterizer_xbox_transparent_geometry.c, the z-sprite branch) feeds stages 2 and 3 so that their quotient is the depth of a point up to the sprite's radius nearer than its card, shaped by the second map, in the depth buffer's units (16777215 for the 24-bit buffer). The translated shader now writes that quotient over 16777215 to gl_FragDepth. Only shaders with a DOT_ZW stage change their text.

Checked on a macOS fork of this translator (OpenGL and Metal, a30, assault rifle fired at the lifeboat's floor): puffs are whole, and decals and hit positions are unchanged. Not built or run on this tree's Linux, Windows, Android or web builds.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011KLToxkJE32PPuVNUQEe9a
2026-10-12 10:35:38 -07:00
eltanschauung 1f47875802 Add extra weapon and pickup options for co-op hosts
Offer Per Player, Static Multiplier and None for authored campaign weapons, grenades, health kits, overshields and camouflage. Share amount rows with extra enemies, cap pickups at 8x, retain ammunition and checkpoint counts, and only place copies on clear nearby ground. Use ordinary host-created replicated objects without changing the wire protocol.

(cherry picked from commit 6f3a75507690a03382759f0f1b70c13e38abc851)
2026-10-12 12:43:46 -04:00
eltanschauung ddc75bc62b Use an exact two-thirds modifier for extra vehicles (#306)
Scale extra growth by the integer ratio 2/3 in both modes before rounding down. Default 50% Per Player now yields the first extra vehicle with four players. Update setting descriptions and count expectations. All 25 focused vehicle/menu tests and the Windows build pass.

(cherry picked from commit c1881dd5e73fa49b45c3b29b7eb74b9ba9e08b7c)
2026-10-12 12:37:39 -04:00
eltanschauung 9e435d02cf Halve extra vehicle growth before rounding down (#306)
Apply a flat 0.5 modifier to additional vehicles in per-player and static modes. Update generated setting descriptions and documentation. Verified all 25 focused vehicle/menu tests, including counts from 1 to 128 players, lifecycle checks and a negative control for the modifier. The combined Windows build and isolated startup test pass.

(cherry picked from commit c3a54123390e56603b4001fbba2ae94f450981c6)
2026-10-12 12:37:39 -04:00
eltanschauung 68f0d2d303 Add extra vehicle options for co-op hosts
Offer Per Player, Static Multiplier and None. Register authored campaign vehicles, anchor delivered cargo after ground contact, and replace player-driven vehicles after both bounding spheres clear the home with a 15 percent buffer. Keep host authority, pad collision checks, allocation limits and checkpoint budgets. Replicate ordinary vehicles without changing the wire protocol.

(cherry picked from commit 75abf60ed676b0b5b8a20de4f82068c9a3ba281f)
2026-10-12 12:37:39 -04:00
jcompto95-techandClaude Opus 5.5 30ddad86f6 The overshield rises up the body and stays lit, in its own color (display.overshield_effect, off)
With display.overshield_effect (Video Setup > Graphics > Overshield, off
by default: the game's own), this machine draws the overshield's flare
rising up the body from the feet as it charges (2 seconds; 3 from a
shield that was down), then lit, whole, for as long as it lasts, its
energy at 30% of its speed, in its own color (the powerup's, 253, 78,
116) whatever shield color its player chose; its glow rises and stays
with it, and with display.viewmodel_shield it comes up the first-person
arms. A hit on it plays what the projectile plays on an Elite's shield,
where that only shows and sounds. The rise is a height fade in the vertex
shader (d3d8_gl_set_height_fade).

Reworked after review: the setting the earlier version removed is back,
off by default, so the stock overshield is unchanged unless a player
turns it on. Only drawing and sounds change; no network change (the wire
format check passes). Checked: the changed units compile for Linux; menus
regenerated (only Graphics changed).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015jtk9vPUKbWd48oBMzXuzd
2026-10-12 06:59:37 -04:00
eltanschauung 3804028ab5 Reset every live input queue after checkpoint loads
Cutscene skipping in co-op restores a checkpoint. The legacy reset assumed player queue slot zero existed and dereferenced NULL when it was empty. Iterate the rebuilt live queues and restore each update counter, including remote players. Empty arrays are safe. The old reset fails six regression cases; all 278 standalone CPU tests pass with the fix. Message formats and network version are unchanged.
2026-10-12 03:41:05 -04:00
hkmoddandClaude Opus 5.5 1b496ca7de Keep a browser's window 8-bit with display.hdr_output, and name NVIDIA's setting
The web build reads the desktop settings, so display.hdr_output would
ask a browser's canvas for floating-point pixels it does not have. The
web build now keeps the window 8-bit, as Android does; the renderer
already keeps its scRGB path off under HALO_GLES.

With NVIDIA's driver on Windows, an OpenGL window with floating-point
pixels in fullscreen or borderless turns black, then oversaturated,
unless the NVIDIA Control Panel's "Vulkan/OpenGL present method" is
"Prefer layered on DXGI Swapchain". The README says so.

Checked: the Windows build; display.hdr_output on an HDR OLED display
with that setting. The web build was not built here (no Emscripten).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:31:43 +02:00
hkmoddandClaude Opus 5.5 8b2efdb4f2 Add HDR and HDR DISPLAY to Video Setup's Graphics screen
display.hdr and display.hdr_output could be set only in config.toml or
the environment. Two rows on the Graphics screen, after Glow Intensity,
set them as the screen's other rows set theirs; HDR DISPLAY is shown on
the desktop platforms only, as the setting applies there only. The
category's help names HDR.

Checked: the two generated screens are the only files that change, and
tools/test_web_build.py's check that the menus match their generator
passes; the Windows build opens the screen (debug.menu_open) with both
rows above the help.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:31:43 +02:00
hkmoddandClaude Opus 5.5 c65fd673d8 Document the HDR settings in the Linux README
The settings table gains display.hdr, display.hdr_exposure,
display.hdr_tone_mapping and display.hdr_output; "What operates" gains
"HDR", which says what the back buffer holds, where the tone mapping
runs and what the HUD and the menus keep; the game source changes name
the tone mapping in render/render.c.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:31:43 +02:00
hkmoddandClaude Opus 5.5 e7a85652f3 Add opt-in HDR rendering with tone mapping (display.hdr)
The back buffer and its multisampled renderbuffer become GL_RGBA16F
(GL_HALF_FLOAT on Android) when display.hdr is on, so blended light past
white is kept instead of clipped. A tone mapping pass over each window's
3D view, before the anti-aliasing and the HUD, brings it back into range:
neutral (identity below 0.8, a hue-preserving shoulder above), ACES
(Narkowicz) or extended Reinhard, after display.hdr_exposure. It writes
colour only, leaving the game's destination alpha alone.

The display blit becomes a draw that clamps to 1, or, with
display.hdr_output on desktop, writes scRGB to a floating-point window
up to the display's HDR headroom (SDL's window HDR properties); a driver
without such a window falls back to 8 bits. Android turns HDR on only
with ES 3.2 or GL_EXT_color_buffer_(half_)float and caps MSAA at the
samples RGBA16F allows. Settings are read between frames; toggling
display.hdr recreates the back buffer's storage.

Checked: the Windows build (clang, no warnings); bloodgulch and a30 with
MSAA, FXAA and SMAA, toggling each of the settings while playing with
HALO_GL_DEBUG, without GL errors; the frame rate unchanged, the tone
mapping pass 0.04 ms at 1080p; neutral leaves the picture as without
HDR below 0.8; display.hdr_output on an HDR OLED display. The Android
guest's sources pass clang -fsyntax-only for arm64_32; neither Android
nor the web build was run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-11 20:31:43 +02:00
Paul Hontz 6c8842c376 NVIDIA on Wayland: X11 first when there is no 32-bit egl-wayland
NVIDIA's EGL draws into a Wayland window through egl-wayland (or
egl-wayland2), which distributions ship 64-bit only: Arch's
lib32-nvidia-utils has libEGL_nvidia and libGLX_nvidia, and no package has
a 32-bit libnvidia-egl-wayland. SDL 3.4 prefers Wayland where the
compositor has fifo-v1 (KDE Plasma 6, GNOME), and its OpenGL there is EGL,
so the 32-bit game fell back to Mesa's llvmpipe: drawn on the processor,
a flickering window that never finished loading. On X11 (XWayland) SDL's
OpenGL is GLX, which the 32-bit driver has.

With NVIDIA's module loaded (/sys/module/nvidia), a Wayland session, and
neither libnvidia-egl-wayland.so.1 nor libnvidia-egl-wayland2.so.1
loadable by this process (the names NVIDIA's EGL loads them by,
/usr/share/egl/egl_external_platform.d), SDL now tries x11 before
wayland, and the log says so. SDL_VIDEO_DRIVER, when set, still decides.
OpenGL on llvmpipe or softpipe is also logged as drawn on the processor,
and port/linux/README.md has "NVIDIA on Wayland".

Only the 32-bit Linux build: the arm64 build's host is 64-bit.
2026-10-11 14:05:48 -04:00
eltanschauung 2689fcbe25 Add multiplayer host aim assist options
Let hosts block optional mouse magnetism without overwriting local preferences or altering controller, touch or bullet autoaim. Replicate a validated reliable policy on ready and change; raise the network version to 27. Validation: 9 focused CPU tests, Windows compilation, native two-peer policy changes and Player Options persistence/Cancel.
2026-10-11 02:43:00 -04:00
Jonas Volman 1a98636fc0 Replace remaining BSS pragmas with verified zero initialization 2026-10-09 05:14:47 -07:00
Jonas Volman 14ec9fc4a2 Remove three no-op BSS pragma blocks without byte changes 2026-10-09 04:23:56 -07:00
Jonas Volman 73677cf26d Remove empty header stubs and unused shader-stage enums
Zero credit: remove 51 guard-only headers, 50 project-list entries, four useless includes and two unused enum definitions. Preserve source assertion locations and both repositories existing READMEs. Clean rebuild, unchanged 8252-row strict snapshot, unchanged code/data credit and admissions, 1663 tests plus 159 subtests pass. Disclose 76 compiler-local label renumberings and two warning source-line shifts; runtime sections and relocations remain identical. No private assets or scratch tooling published.
2026-10-09 02:58:59 -07:00
Jonas Volman b43c70168a Merge reviewed byte-inert cinematic cleanup into halo-1 main 2026-10-06 15:41:45 -07:00
Jonas Volman a71a4ac135 Apply approved byte-inert cinematic shadow cleanup; record upstream exclusions 2026-10-06 15:40:46 -07:00
Jonas Volman 1b25ea9a37 Merge three independently verified biped and avoidance function gains into halo-1 main 2026-10-02 17:05:13 -07:00
Jonas VolmanandClaude Opus 5.5 fccf773db3 Reconcile actor test avoidance match (+1 function, +743 meaningful bytes)
Independently verified donor c694a43d4e3343eedebac48fe6f2b6052f679778 under Q-UP21 after the separately gated helper restoration. Fresh clean full gate against 09255f0e: cumulative +3 functions, +1238 meaningful / +1264 padded bytes, zero exact losses; 7483 of 7573 Halo functions, 1603071 of 1770166 code bytes, data 3311591 and objects 396 unchanged, parks 59 valid. Tools tests: 1663 passed, 5 skipped, 159 subtests. Full /W3 and unit /W4 multisets unchanged. All twenty cast ablations and layout controls passed; helper identity, real-call schedule and 284 ordered provider-link probes passed. The disclosed residual caller changes 4144 to 4128 bytes.

Retain the narrow per-function parentheses ruling, inferred scopes and collision_result placement, S6 correction, single-variable alternative and compiler-version caveat. No general hold, object admission, research candidate, scorer/verifier or compiler flag change. Fresh canonical receipts and source-policy boundaries are recorded in docs/object_matching_logs/biped_avoidance_canonical_reconciliation_20261002.md. Unrelated README changes and research preserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 17:04:04 -07:00
Jonas VolmanandClaude Opus 5.5 201442d377 Restore actor avoidance transform helper calls with the approved guard removal (zero credit)
Independently reconciled donor 41d3b992a5e5c0fbbb5f76c476d27f9c68031e82 without candidate F. Fresh clean full gate: no additional gains or losses, all prior function sections identical, one new uncredited 48-byte SELECT_ANY point_from_line3d copy identical to January, unchanged real-call schedule, warnings, data and object credit. Current-compiler cast ablation and layout controls pass, 284 ordered provider-link probes pass, 1663 tools tests pass. Six inferred casts and three byte-inert per-site parentheses are disclosed; all other actor_moving holds stay in force.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:49:29 -07:00
Jonas VolmanandClaude Opus 5.5 164026a7f1 Restore biped_jump helper call under the admitted two-site vector view (zero credit)
Independently reconciled donor 82ea0d5e9bcee8a1a48775aab6f0c351f5ee5e2a after the biped packet. Fresh clean full gate: zero additional gains or losses, all normalized objects unchanged, parks valid, warnings unchanged and 1663 tools tests passed. Current-compiler cast ablation is byte-inert; nine layout/alignment checks pass and a deliberately false control fails. Both current selected-provider link orders pass. Cast spelling remains inferred; no new parenthesis or general view-cast exception.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:47:08 -07:00
Jonas VolmanandClaude Opus 5.5 606d0a2458 Reconcile approved biped sight and placement matches (+2 functions, +495 meaningful bytes)
Independently verified donor edbdbf729e9b7c0c09557f1ccb45f94ad6c8a06a against canonical 09255f0e: fresh clean full build, strict whole-board sweep with zero losses, parks 61 to 59, unchanged data/object credit and warnings, 1663 tools tests passed. Folded helper identity and all selected-provider pair links passed. Per-site parentheses, descriptive constants and coupled jumping form remain narrowly disclosed as inferred; no general hold lifted. Unrelated canonical biped_accelerate shape and README edit preserved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-02 16:44:38 -07:00
Jonas Volman 862c393cd8 Merge five independently verified function gains into halo-1 main 2026-10-02 00:45:39 -07:00
Jonas Volman 09255f0e78 Reconcile main static storage: +1 exact function, zero losses
Approved coherent packet 41640b4d, independently clean-built after transport and plane-helper reconciliation. +538 meaningful / +544 padded bytes; main 95/95. Replace the invented packed aggregate with January's separate storage, add exactly eight private symbol rows and retire the frame-rate park. Names, six static scopes and exact main_game_render placement remain disclosed as inferred. Full stable sweep, parks, admission, fake scan and 1663 tools tests pass; no new warnings, data, objects or providers. Cumulative reconciliation +5 functions, +2121 meaningful / +2144 padded bytes, zero exact losses. Preserve dirty README and unrelated research. No PCH, scorer, verifier, status or held-source changes. Detailed independent receipts and limits recorded in docs/object_matching_logs/upstream_tmp_reconcile_20261002.md.
2026-10-02 00:44:12 -07:00
Jonas Volman 38fdd8cb24 Reconcile plane-helper pair: +2 exact functions, zero losses
Approved coherent packet 78294dd3 (Q-UP1), independently gated on canonical. Remove only outer helper parentheses, preserving /Od argument order, together with the attested float argument repair in item_accelerate. Items object remains identical. +1126 meaningful / +1136 padded bytes; data/object/provider sets unchanged. Fresh full build, stable sweep, admission, fake scan (26), parks and tests (1663 passed, 5 skipped, 159 subtests) pass; no new warnings. Retire only two exact parks. Remeasure four residuals on canonical, preserving previous measurements/rejection history: frustum 88.8082->90.11173; pill 97.21691->98.086395; polygon clip 80.76382->82.37186; lens flares 99.29274->99.198944 (disclosed decrease). Do not import unrelated lane fidelity changes or held parentheses/DD2/DD3/casts.
2026-10-02 00:34:46 -07:00
Jonas Volman 25f719236d Reconcile transport pair: +2 exact functions, zero losses
Independently reconciled lane e191c0f1 under Q-UP1. Header and definition return long together; January startup-store and cleanup topology retained. Retire only the two verified parks. Fresh clean build and stable sweep: +457 meaningful / +464 padded bytes, 0 losses, unchanged data and object status. Affected /W4 warning counts unchanged; inherited WSA narrowing moves to initialization. Admission/parks/fake scan pass; tools 1663 passed, 5 skipped, 159 subtests. No new providers or section/data changes beyond the two intended functions. README and unrelated research preserved.
2026-10-02 00:30:24 -07:00
Jonas Volman 356a8d412c Merge verified triangle and nav-point matches into halo-1 main
Preserve main README unchanged. Source/config/verification tree equals canonical 5e55d8f8; two exact Halo gains, zero regressions, +1998 meaningful bytes. No object or data-credit changes.
2026-10-01 19:41:01 -07:00
Jonas Volman 5e55d8f83a Reconcile exact triangle predicate and nav-point renderer (+1998 Halo bytes)
Cleaned punpck donor reconstructions; strict bytes and all relocations match January. Fresh cold whole-board gate: 2 gains, 0 losses; 1663 tests pass. Retire the two parks. Disclose six HUD /W3 C4244 narrowing warnings and six identical shared-inline helper copies; provider links pass both orders. No object or data credit changes; inherited README and research excluded.
2026-10-01 19:40:22 -07:00
589 changed files with 83109 additions and 8344 deletions

No files matched your search

+1 -1
View File
@@ -1,5 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: How to install
url: https://github.com/Cesarus85/ringfall-mjolnir-vr#install-on-meta-quest-3--3s
url: https://github.com/Cesarus85/mjolnir-vr#install-on-meta-quest-3--3s
about: Step-by-step installation for the Quest 3 / 3S and the Steam Frame.
+35 -20
View File
@@ -13,7 +13,7 @@ name: Build
# - a newer push to the same branch cancels a run still going;
# - pushes that only change documentation do not build;
# - Windows, whose minutes cost twice Linux's, builds only Windows;
# - Ringfall: Mjolnir VR builds only Android (the VR app): the Linux and
# - Mjolnir VR builds only Android (the VR app): the Linux and
# Windows jobs are kept, off (if: false), so that upstream's changes to
# them still merge;
# - artifacts are kept for three days.
@@ -24,7 +24,7 @@ name: Build
# gives the latest build; the last five are kept. Its web build is then the
# site on GitHub Pages (https://halocombatevolved.com/, port/web/README.md).
on:
# (Ringfall: Mjolnir VR: main only; its branches are tried on the headsets
# (Mjolnir VR: main only; its branches are tried on the headsets
# from local builds)
push:
branches: [main]
@@ -52,7 +52,7 @@ env:
jobs:
linux:
# (off: Ringfall: Mjolnir VR ships the Android app only)
# (off: Mjolnir VR ships the Android app only)
if: ${{ false }}
# Arch Linux has what the build needs as packages: clang 22 (for the
# profile-guided optimisation in pgo/), and CMake, pkg-config and
@@ -99,7 +99,7 @@ jobs:
- name: Test
run: |
python -m pytest -q tools/test_linux_port.py tools/test_android_asm_convert.py tools/test_host_watch_hash.py tools/test_touch_menu.py tools/harness tools/test_profile.py
python -m pytest -q tools/test_linux_port.py tools/test_android_asm_convert.py tools/test_android_mirror_uploads.py tools/test_android_ce_texture_cache.py tools/test_host_watch_hash.py tools/test_touch_menu.py tools/harness tools/test_profile.py tools/stagekit/tests tools/test_net_compare.py
python tools/test_light_storage.py
- name: Compile cache
@@ -125,10 +125,15 @@ jobs:
- name: Install the toolchain
run: |
mkdir -p "$RUNNER_TEMP/tools"
# (each download checked against the hash it had when it was pinned)
curl -fsSL -o ninja.zip https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-linux.zip
curl -fsSL -o ccache.tar.xz https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz
sha256sum -c - <<'EOF'
6f98805688d19672bd699fbbfa2c2cf0fc054ac3df1f0e6a47664d963d530255 ninja.zip
80cab87bd510eca796467aee8e663c398239e0df1c4800a0b5dff11dca0b4f18 ccache.tar.xz
EOF
unzip -q ninja.zip -d "$RUNNER_TEMP/tools" && rm ninja.zip
curl -fsSL https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-linux-x86_64.tar.xz \
| tar -xJ -C "$RUNNER_TEMP/tools" --strip-components=1 ccache-4.10.2-linux-x86_64/ccache
tar -xJf ccache.tar.xz -C "$RUNNER_TEMP/tools" --strip-components=1 ccache-4.10.2-linux-x86_64/ccache && rm ccache.tar.xz
echo "$RUNNER_TEMP/tools" >> "$GITHUB_PATH"
- uses: actions/checkout@v4
@@ -198,7 +203,7 @@ jobs:
retention-days: 3
windows:
# (off: Ringfall: Mjolnir VR ships the Android app only)
# (off: Mjolnir VR ships the Android app only)
if: ${{ false }}
# The runner image has LLVM, Python and Visual Studio's x86 libraries and
# Windows SDK.
@@ -212,8 +217,11 @@ jobs:
shell: pwsh
run: |
Invoke-WebRequest -OutFile ninja.zip https://github.com/ninja-build/ninja/releases/download/v1.12.1/ninja-win.zip
Expand-Archive ninja.zip -DestinationPath "$env:RUNNER_TEMP\tools"
Invoke-WebRequest -OutFile ccache.zip https://github.com/ccache/ccache/releases/download/v4.10.2/ccache-4.10.2-windows-x86_64.zip
# (each download checked against the hash it had when it was pinned)
if ((Get-FileHash ninja.zip -Algorithm SHA256).Hash -ne "F550FEC705B6D6FF58F2DB3C374C2277A37691678D6ABA463ADCBB129108467A") { throw "ninja.zip: unexpected SHA-256" }
if ((Get-FileHash ccache.zip -Algorithm SHA256).Hash -ne "6252F081876A9A9F700FAE13A5AEC5D0D486B28261D7F1F72AC11C7AD9DF4DA9") { throw "ccache.zip: unexpected SHA-256" }
Expand-Archive ninja.zip -DestinationPath "$env:RUNNER_TEMP\tools"
Expand-Archive ccache.zip -DestinationPath $env:RUNNER_TEMP
Copy-Item "$env:RUNNER_TEMP\ccache-4.10.2-windows-x86_64\ccache.exe" "$env:RUNNER_TEMP\tools"
Remove-Item ninja.zip, ccache.zip
@@ -271,7 +279,7 @@ jobs:
retention-days: 3
web:
# (off: Ringfall: Mjolnir VR ships the Android app only)
# (off: Mjolnir VR ships the Android app only)
if: ${{ false }}
# Emscripten (emsdk, the version below, cached) builds the web port's
# site (port/web/README.md); the tests check its graph, the page's
@@ -371,7 +379,6 @@ jobs:
with:
sparse-checkout: |
port/android
port/third_party/extract-xiso
tools
- uses: actions/download-artifact@v4
@@ -382,18 +389,26 @@ jobs:
- name: Package
run: |
mkdir release
# (Ringfall: Mjolnir VR publishes its Android builds only, under
# (Mjolnir VR publishes its Android builds only, under
# its own name: Updater.java looks for them; the desktop ports are
# built to keep them building)
for config in debug release; do
(cd "artifacts/halo-android-$config" &&
zip -qr "$GITHUB_WORKSPACE/release/ringfall-mjolnir-vr-android-$config.zip" .)
zip -qr "$GITHUB_WORKSPACE/release/mjolnir-vr-android-$config.zip" .)
done
# the Steam Frame's installer (port/android/STEAM_FRAME.md): its
# bundle with the release APK, and the desktop file that fetches it
python3 tools/steam_frame_bundle.py artifacts/halo-android-release/app-release.apk release "$GH_REPO"
# the APK itself, for sideloading on the Quest (SideQuest, adb)
cp artifacts/halo-android-release/app-release.apk release/RingfallMjolnirVR.apk
cp artifacts/halo-android-release/app-release.apk release/MjolnirVR.apk
# the same under the names before "Mjolnir VR" (Ringfall: Mjolnir
# VR, builds 302 to 313): their updaters (Updater.java, the Frame's
# launcher) and the links already shared ask for them
cp release/mjolnir-vr-android-debug.zip release/ringfall-mjolnir-vr-android-debug.zip
cp release/mjolnir-vr-android-release.zip release/ringfall-mjolnir-vr-android-release.zip
cp release/mjolnir-vr-steam-frame.zip release/ringfall-mjolnir-vr-steam-frame.zip
cp release/Install-Mjolnir-VR.desktop release/Install-Ringfall-Mjolnir-VR.desktop
cp release/MjolnirVR.apk release/RingfallMjolnirVR.apk
ls -l release
- name: Publish
@@ -408,15 +423,15 @@ jobs:
readme="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
{
printf '%s\n\n' "$subject"
printf '**Ringfall: Mjolnir VR** is an unofficial VR mod for Halo: Combat Evolved. It needs a disc image of your own, purchased Xbox copy of the game; no game files are included.\n\n'
printf '**Mjolnir VR** is an unofficial VR mod for Halo: Combat Evolved. It needs a disc image of your own, purchased Xbox copy of the game; no game files are included.\n\n'
printf '| Headset | Download | How to install |\n| --- | --- | --- |\n'
printf '| Meta Quest 3 / 3S | `RingfallMjolnirVR.apk` | [Install on Quest](%s#install-on-meta-quest-3--3s) |\n' "$readme"
printf '| Steam Frame | `Install-Ringfall-Mjolnir-VR.desktop` (open it in Desktop Mode) | [Install on Steam Frame](%s#install-on-steam-frame) |\n\n' "$readme"
printf 'The other files are for the built-in updater and the Steam Frame installer.\n\n'
printf '| Meta Quest 3 / 3S | `MjolnirVR.apk` | [Install on Quest](%s#install-on-meta-quest-3--3s) |\n' "$readme"
printf '| Steam Frame | `Install-Mjolnir-VR.desktop` (open it in Desktop Mode) | [Install on Steam Frame](%s#install-on-steam-frame) |\n\n' "$readme"
printf 'The other files are for the built-in updater and the Steam Frame installer (those named `ringfall-…` / `Ringfall…`: the same, for the builds before the name Mjolnir VR).\n\n'
printf 'Commit: %s\nBuild: %s\n' "$COMMIT_URL" "$RUN_URL"
} > notes.md
gh release create "$tag" release/* --target "$GITHUB_SHA" --latest \
--title "Ringfall: Mjolnir VR, build $GITHUB_RUN_NUMBER (${GITHUB_SHA:0:7})" --notes-file notes.md
--title "Mjolnir VR, build $GITHUB_RUN_NUMBER (${GITHUB_SHA:0:7})" --notes-file notes.md
echo "tag=$tag" >> "$GITHUB_OUTPUT"
# The Windows builds' executables and PDBs to Sentry, which turns the
@@ -458,7 +473,7 @@ jobs:
done
pages:
# (off: Ringfall: Mjolnir VR ships the Android app only)
# (off: Mjolnir VR ships the Android app only)
if: ${{ false }}
# The release's web build to GitHub Pages, which serves it at
# https://halocombatevolved.com/ (port/web/README.md, "Hosting"). Only
@@ -579,7 +594,7 @@ jobs:
title="Build failed"; color=15548997
fi
latest="$SERVER/$REPOSITORY/releases/latest"
downloads="[Quest]($latest/download/ringfall-mjolnir-vr-android-release.zip) · [Steam Frame]($latest/download/Install-Ringfall-Mjolnir-VR.desktop) ([all builds]($latest))"
downloads="[Quest]($latest/download/mjolnir-vr-android-release.zip) · [Steam Frame]($latest/download/Install-Mjolnir-VR.desktop) ([all builds]($latest))"
if [ -n "$RELEASE_TAG" ]; then
release="[$RELEASE_TAG]($SERVER/$REPOSITORY/releases/tag/$RELEASE_TAG)"
if [ "$PAGES" = success ]; then
+199
View File
@@ -0,0 +1,199 @@
name: Server image
# The dedicated server's container image (deploy/docker), made from a
# release's halo-linux-release.zip, and the Helm chart's checks
# (deploy/helm/opence-server).
#
# - After each successful Build of main (which publishes release build-<n>):
# the image of that release, checked, pushed to
# ghcr.io/opencommunityedition/opence-server as sha-<commit>, build-<n> and
# latest, and signed keyless with cosign (this workflow's GitHub identity).
# - Weekly, the latest release's image again, for Debian's fixes.
# - By hand, any release's (latest moves only for the newest).
#
# The checks (no game data in CI: it is never published): the image runs as
# 10001:10001; started on a read-only root without maps it writes its
# settings to /state, says "server: no usable maps" and exits 2; halo
# --version answers; the health check fails with nothing listening.
#
# Verify:
# cosign verify ghcr.io/opencommunityedition/opence-server:latest \
# --certificate-identity-regexp '^https://github\.com/OpenCommunityEdition/OpenCE/\.github/workflows/server-image\.yml@' \
# --certificate-oidc-issuer https://token.actions.githubusercontent.com
on:
workflow_run:
workflows: [Build]
types: [completed]
branches: [main]
schedule:
- cron: "23 5 * * 1"
workflow_dispatch:
inputs:
release:
description: "The release to build the image of: a tag (build-206) or latest"
default: latest
concurrency:
group: server-image-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: false
permissions:
contents: read
env:
IMAGE: ghcr.io/opencommunityedition/opence-server
jobs:
chart:
if: github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
- uses: azure/setup-helm@v4
- name: Lint
run: |
set -euo pipefail
chart=deploy/helm/opence-server
for values in "$chart"/ci/*-values.yaml; do
helm lint "$chart" --strict -f "$values"
helm template ci "$chart" -f "$values" > /dev/null
done
# the maps are never in the image: without game data the chart refuses to render
if helm template ci "$chart" > /dev/null 2>&1; then
echo "::error::the chart renders without gameData"; exit 1
fi
- name: Unit tests
run: |
set -euo pipefail
# (Helm 4 checks plugins' signatures, which helm-unittest does not publish)
if helm version --short | grep -q '^v3'; then verify=; else verify=--verify=false; fi
helm plugin install https://github.com/helm-unittest/helm-unittest $verify
helm unittest deploy/helm/opence-server
image:
if: >-
github.event_name != 'workflow_run' ||
(github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push')
runs-on: ubuntu-24.04
timeout-minutes: 20
permissions:
contents: read
packages: write
# keyless signing: the workflow's OIDC token gets a short-lived Sigstore certificate
id-token: write
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
- name: Release
id: release
env:
GH_TOKEN: ${{ github.token }}
EVENT: ${{ github.event_name }}
RUN_NUMBER: ${{ github.event.workflow_run.run_number }}
WANTED: ${{ inputs.release }}
run: |
set -euo pipefail
case "$EVENT" in
workflow_run) tag="build-$RUN_NUMBER" ;;
workflow_dispatch) tag="${WANTED:-latest}" ;;
*) tag=latest ;;
esac
newest="$(gh release view --repo "$GITHUB_REPOSITORY" --json tagName -q .tagName)"
if [ "$tag" = latest ]; then
tag="$newest"
fi
commit="$(gh release view "$tag" --repo "$GITHUB_REPOSITORY" --json targetCommitish -q .targetCommitish)"
gh release download "$tag" --repo "$GITHUB_REPOSITORY" --pattern halo-linux-release.zip --dir deploy/docker
echo "tag=$tag" >> "$GITHUB_OUTPUT"
echo "commit=$commit" >> "$GITHUB_OUTPUT"
echo "newest=$([ "$tag" = "$newest" ] && echo true || echo false)" >> "$GITHUB_OUTPUT"
echo "Release $tag (commit $commit; the newest: $newest)"
- name: Build
env:
TAG: ${{ steps.release.outputs.tag }}
COMMIT: ${{ steps.release.outputs.commit }}
run: |
set -euo pipefail
docker build --pull -t opence-server:ci \
--build-arg RELEASE=halo-linux-release.zip \
--label org.opencontainers.image.source="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY" \
--label org.opencontainers.image.revision="$COMMIT" \
--label org.opencontainers.image.version="$TAG" \
--label org.opencontainers.image.licenses=AGPL-3.0-or-later \
--label org.opencontainers.image.title="OpenCE dedicated server" \
deploy/docker
- name: Smoke test
run: |
set -euo pipefail
[ "$(docker image inspect -f '{{.Config.User}}' opence-server:ci)" = 10001:10001 ] \
|| { echo "::error::the image does not run as 10001:10001"; exit 1; }
docker run --rm --read-only --entrypoint /opt/opence/halo opence-server:ci --version | tee version.txt
grep -Eq '^OpenCE build-[0-9]+ \(network version [0-9]+\)$' version.txt \
|| { echo "::error::halo --version did not answer"; exit 1; }
# without maps, on a read-only root with /state the one writable folder
docker volume create smoke-state > /dev/null
status=0
timeout 60 docker run --name smoke --read-only --cap-drop ALL --security-opt no-new-privileges \
--tmpfs /tmp -v smoke-state:/state -e HALO_SERVER_WEB_PASSWORD=ci-smoke-password \
opence-server:ci > server.log 2>&1 || status=$?
cat server.log
docker rm -f smoke > /dev/null
[ "$status" = 2 ] || { echo "::error::the server without maps exited with $status, not 2"; exit 1; }
grep -qF 'server: no usable maps' server.log \
|| { echo "::error::no 'server: no usable maps' line"; exit 1; }
if grep -qF 'server: ready' server.log; then echo "::error::the server said it was ready"; exit 1; fi
docker run --rm -v smoke-state:/state --entrypoint /bin/bash opence-server:ci -c 'test -s /state/config.toml' \
|| { echo "::error::no /state/config.toml"; exit 1; }
# the health check, with nothing listening
if docker run --rm --entrypoint /opt/opence/healthz.sh opence-server:ci; then
echo "::error::the health check passed with no server"; exit 1
fi
docker volume rm smoke-state > /dev/null
- uses: docker/login-action@v3
if: github.repository == 'OpenCommunityEdition/OpenCE'
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: sigstore/cosign-installer@v3
if: github.repository == 'OpenCommunityEdition/OpenCE'
- name: Push and sign
if: github.repository == 'OpenCommunityEdition/OpenCE'
env:
TAG: ${{ steps.release.outputs.tag }}
COMMIT: ${{ steps.release.outputs.commit }}
NEWEST: ${{ steps.release.outputs.newest }}
IDENTITY: ^https://github\.com/${{ github.repository }}/\.github/workflows/server-image\.yml@
run: |
set -euo pipefail
tags=("sha-${COMMIT:0:7}" "$TAG")
if [ "$NEWEST" = true ]; then
tags+=(latest)
fi
for tag in "${tags[@]}"; do
docker tag opence-server:ci "$IMAGE:$tag"
docker push "$IMAGE:$tag"
done
ref="$(docker image inspect -f '{{index .RepoDigests 0}}' "$IMAGE:$TAG")"
test -n "$ref"
cosign sign --yes "$ref"
cosign verify "$ref" --certificate-identity-regexp "$IDENTITY" \
--certificate-oidc-issuer https://token.actions.githubusercontent.com > /dev/null
{
echo "Pushed and signed $ref as ${tags[*]}."
echo
echo "Verify: cosign verify $IMAGE:$TAG --certificate-identity-regexp '$IDENTITY' --certificate-oidc-issuer https://token.actions.githubusercontent.com"
} >> "$GITHUB_STEP_SUMMARY"
+34 -11
View File
@@ -15,19 +15,20 @@ end.
| Path | Contents |
| --- | --- |
| `source/` | The game: 466 C files of the decompilation, compiled as they are with few changes (each marked, below) |
| `port/linux/src/` | The platform layer the three ports share: Direct3D 8 on OpenGL (`d3d8_gl.c`), DirectSound and XInput on SDL3, files, threads, memory, sockets, settings (`port_config.c`), the mods folder (`port_mods.c`), internet play (`p2p*.c`) |
| `port/linux/game/` | The port's game-side code, compiled as the game's sources are: the distributed netcode (`network_*.c`), co-op, map sharing (`map_share*.c`), the menus (`menu_tags.c`, `menu_functions.c`), Custom Edition maps (`custom_edition_*.c`, `cache_file_formats.c`), the tag validator (`tag_validate.c`, `tag_schema_*.c`), mods (`mods.c`, `mod_*.c`), streamer mode's word filter (`text_filter*.c`), touch, FOV and more |
| `port/linux/src/` | The platform layer the three ports share: Direct3D 8 on OpenGL (`d3d8_gl.c`), DirectSound and XInput on SDL3, files, threads, memory, sockets, settings (`port_config.c`), the mods folder (`port_mods.c`), internet play (`p2p*.c`), the dedicated server's platform side (`server_*.c`: the mode, the log, the rotation's grammar, HTTP, RCON, the master servers' publisher) and the master servers' list (`master_list.c`) |
| `port/linux/game/` | The port's game-side code, compiled as the game's sources are: the distributed netcode (`network_*.c`), co-op, OpenCE's gametypes (`game_modes.c`, `infection.c`, `gun_game.c`), map sharing (`map_share*.c`), the menus (`menu_tags.c`, `menu_functions.c`), Custom Edition maps (`custom_edition_*.c`, `cache_file_formats.c`), the tag validator (`tag_validate.c`, `tag_schema_*.c`), mods (`mods.c`, `mod_*.c`), streamer mode's word filter (`text_filter*.c`), the dedicated server's director, commands, gametypes and status (`server_*.c`), touch, FOV and more |
| `port/linux/include/` | The port's headers: the limits (`halo_port_limits.h`, with `HALO_PORT_NETWORK_VERSION`), capacities (`halo_port_capacity.h`), the prefix header, `halo_linux_source_fixups.h` (port functions the game's sources call) |
| `port/include/xdk/` | Stand-ins for the Xbox SDK's headers (declarations only) |
| `port/windows/` | The Windows build's own files (`win32_*.c`, headers) |
| `port/android/` | The Android app: the guest runtime, the host library (`host/`), the Java app (`app/`), host imports (`host_imports.list`) |
| `port/web/` | The web build: its runtime (`src/`: entry, sockets inside the page, memory watch), the page and its service worker (`site/`), the SDL port, tests |
| `port/assets/` | What the builds embed or ship: high-res HUD (`hud/`), fonts, titles, menus (`menus/`), icons, network brokers |
| `port/assets/` | What the builds embed or ship: high-res HUD (`hud/`), fonts, titles, menus (`menus/`), icons, network brokers and master servers, the dedicated server's web page (`server_ui/`) |
| `port/third_party/` | Vendored libraries, each with a README naming its upstream, version and checksum |
| `port/tools/` | Stand-alone tools (`cache_file_report.c`) |
| `tools/` | Build scripts (`linux_build.py`, `windows_build.py`, `android_build.py`, `web_build.py`, `ci_build.py`, `web_serve.py`), generators (`ce_menus.py`, `port_settings.py`, `hud_assets.py`, `title_assets.py`, `embed_assets.py`, `xdk_headers.py`) and tests |
| `docs/` | Longer design notes (`custom_edition_caches.md`, `mods.md`) |
| `tools/` | Build scripts (`linux_build.py`, `windows_build.py`, `android_build.py`, `web_build.py`, `ci_build.py`, `web_serve.py`), generators (`ce_menus.py`, `port_settings.py`, `hud_assets.py`, `title_assets.py`, `embed_assets.py`, `server_ui_embed.py`, `xdk_headers.py`), the dedicated server's protocol simulator and remote console (`server_sim.py`, `opence_rcon.py`), tests, and `stagekit/` (scenarios staged and instrumented on the real engine, no retail assets) |
| `docs/` | Longer design notes (`custom_edition_caches.md`, `mods.md`, `dedicated_server.md`, `master_protocol.md`) |
| `pgo/` | Profile-guided optimisation profiles |
| `deploy/` | Running a dedicated server: systemd, Docker, Pterodactyl, Helm, PufferPanel, MCSManager, example gametypes |
| `assets/` | Game data for local runs (gitignored: `maps/`, `custom_maps/`) |
| `.github/workflows/` | CI: builds every platform on each push, publishes releases from `main` |
@@ -39,7 +40,7 @@ ninja linux # build/linux/halo
ninja android # the Android guest image and native libraries
ninja android_apk # the APK (Gradle)
ninja web # build/web/site (Emscripten: port/web/README.md)
ninja windows # on Windows only
ninja windows # on Windows, or on Linux after configure.py --windows-cross
python tools/ci_build.py linux release # what CI builds
```
@@ -83,8 +84,10 @@ setting (`game.custom_edition`), checked at run time with
```sh
python -m pytest -q tools/harness tools/test_touch_menu.py # the engine's functions in a fake world
python -m pytest -q tools/stagekit/tests # scenarios on the real engine, no retail assets (Linux)
python -m pytest -q tools/test_linux_port.py # the build, the maps' checks (needs assets/maps)
python -m pytest -q tools/test_mods.py # mods played over a map (needs assets/maps)
python -m pytest -q tools/test_bots.py # the bots in local games (needs assets/maps)
python -m pytest -q tools/test_cache_file_formats.py tools/test_bmp_files.py tools/test_profile.py
python tools/test_touch_layout.py # the Android touch layout (JDK 17+)
python tools/test_light_storage.py
@@ -92,10 +95,16 @@ python tools/test_death_timing.py
python -m pytest -q tools/test_web_build.py # the web build's graph, sockets, menus
node --test "port/web/tests/*.test.js" # the web page's importer and service worker
node port/web/tests/webrtc_native.mjs chromium firefox # the native builds' WebRTC with browsers (Playwright)
python -m pytest -q tools/test_dedicated_server.py # the dedicated server with clients (needs assets/maps)
python -m pytest -q tools/test_server_sim.py tools/test_egg.py # the server's web page and protocol simulator, the egg
python -m pytest -q tools/test_net_compare.py # net_compare.py's judging of logs, its copies and their processes
python tools/net_compare.py --a build/linux/halo --b <other build> --data <game data> --swap
# two builds in one network game, in step (retail maps: local only)
```
`tools/harness/README.md` explains how to add an asset-free test: the code
under test is taken from the sources, not copied.
under test is taken from the sources, not copied. `tools/stagekit/README.md`
explains how to add a scenario: the real engine, with no retail assets.
Running the game without a person at it:
@@ -104,6 +113,9 @@ Running the game without a person at it:
several copies play on one machine on different loopback addresses
(`HALO_NET_ADDRESS`, `HALO_NET_BROADCAST`). `NETCODE.md` describes the
test settings.
- `halo --server` is a dedicated server (`docs/dedicated_server.md`), and
`halo --probe [<invite>]` prints a game's advertisement as JSON and exits;
`tools/test_dedicated_server.py` runs both with clients.
- `debug.exit_after`, `debug.hidden_window`, `debug.null_renderer`,
`debug.menu_open` (start on one menu screen), `debug.telnet_console`.
- Use a virtual display (Xvfb, with `SDL_VIDEO_DRIVER=x11`) for windowed
@@ -190,10 +202,18 @@ otherwise.
### Third-party code and licences
The repository is CC0. Vendored code goes in `port/third_party/<name>`,
copied unchanged, with a README naming the upstream, the version or commit,
the checksum and what uses it. GPL code (OpenSauce, Reclaimer) may be read
as documentation of file formats, never copied.
The repository is `AGPL-3.0-or-later` (`LICENSE`); the commits before the
change, and the releases built from them, stay CC0 (`LICENSES/CC0-1.0.txt`).
The README's "Licence" section says what each part is under. Vendored code
goes in `port/third_party/<name>`, copied unchanged, with a README naming
the upstream, the version or commit, the licence, the checksum and what uses
it. Its licence must let it be combined with the AGPL 3.0: MIT, BSD (without
an advertising clause), ISC, zlib, Apache 2.0, MPL 2.0, LGPL or GPL 3.0 or
later, public domain. GPL-2.0-only code and the 4-clause BSD licence cannot
be. Code taken from another project, GPL 3.0 code included, keeps its
notices and its licence, and says where it came from.
The decompilation's upstream, punpckhdq/halo, is AGPL 3.0 from 17 October
2026; bnunu/halo-1 is CC0.
### Commits and pull requests
@@ -217,6 +237,8 @@ as documentation of file formats, never copied.
| [port/web/README.md](port/web/README.md) | The web build, the page, the game data in the browser, limits, how it operates, hosting on GitHub Pages |
| [port/include/xdk/README.md](port/include/xdk/README.md) | How the SDK declarations were written and are checked |
| [docs/custom_edition_caches.md](docs/custom_edition_caches.md) | Loading and converting Custom Edition maps, and the evidence for each layout |
| [docs/dedicated_server.md](docs/dedicated_server.md) | The dedicated server: its command line, exit codes, commands, HTTP API, RCON, events and files |
| [docs/master_protocol.md](docs/master_protocol.md) | The master servers' protocol: publishing, the probe, the signed list |
| [docs/mods.md](docs/mods.md) | Mods: folders of Halo PC tag files whose sounds, bitmaps, text and models play over a map's on one machine |
| [port/assets/text_filter/README.md](port/assets/text_filter/README.md) | Streamer mode's words: Surge AI's list, the review, the allowed words |
| [port/assets/menus/README.md](port/assets/menus/README.md) | The menu files' format and how to write them again |
@@ -224,5 +246,6 @@ as documentation of file formats, never copied.
| [port/assets/menus/UNWIRED.md](port/assets/menus/UNWIRED.md) | Menu functions that do nothing yet |
| [port/assets/fonts/README.md](port/assets/fonts/README.md) | The fonts and their licences |
| [tools/harness/README.md](tools/harness/README.md) | Asset-free regression tests |
| [tools/stagekit/README.md](tools/stagekit/README.md) | Scenarios staged and instrumented on the real engine, no retail assets |
| `port/third_party/*/README.md` | Each vendored library |
| [AUTHORS.md](AUTHORS.md) | Art credits |
+2
View File
@@ -10,6 +10,8 @@
weapons' reticles): redraws by MrBruh (`port/assets/hud`), based on
reference photos by Aerocatia. The sniper rifle's zoom labels (2x, 10x)
are set in Overpass (`port/assets/fonts`).
- **The menus' mouse cursor** (the blue arrow the menus show for the
mouse): by pugzysixtyfour (`port/assets/cursor`).
## Third-party art
+661
View File
@@ -0,0 +1,661 @@
GNU AFFERO GENERAL PUBLIC LICENSE
Version 3, 19 November 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The GNU Affero General Public License is a free, copyleft license for
software and other kinds of works, specifically designed to ensure
cooperation with the community in the case of network server software.
The licenses for most software and other practical works are designed
to take away your freedom to share and change the works. By contrast,
our General Public Licenses are intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.
Developers that use our General Public Licenses protect your rights
with two steps: (1) assert copyright on the software, and (2) offer
you this License which gives you legal permission to copy, distribute
and/or modify the software.
A secondary benefit of defending all users' freedom is that
improvements made in alternate versions of the program, if they
receive widespread use, become available for other developers to
incorporate. Many developers of free software are heartened and
encouraged by the resulting cooperation. However, in the case of
software used on network servers, this result may fail to come about.
The GNU General Public License permits making a modified version and
letting the public access it on a server without ever releasing its
source code to the public.
The GNU Affero General Public License is designed specifically to
ensure that, in such cases, the modified source code becomes available
to the community. It requires the operator of a network server to
provide the source code of the modified version running there to the
users of that server. Therefore, public use of a modified version, on
a publicly accessible server, gives the public access to the source
code of the modified version.
An older license, called the Affero General Public License and
published by Affero, was designed to accomplish similar goals. This is
a different license, not a version of the Affero GPL, but Affero has
released a new version of the Affero GPL which permits relicensing under
this license.
The precise terms and conditions for copying, distribution and
modification follow.
TERMS AND CONDITIONS
0. Definitions.
"This License" refers to version 3 of the GNU Affero General Public License.
"Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.
"The Program" refers to any copyrightable work licensed under this
License. Each licensee is addressed as "you". "Licensees" and
"recipients" may be individuals or organizations.
To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy. The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.
A "covered work" means either the unmodified Program or a work based
on the Program.
To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy. Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.
To "convey" a work means any kind of propagation that enables other
parties to make or receive copies. Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.
An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License. If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.
1. Source Code.
The "source code" for a work means the preferred form of the work
for making modifications to it. "Object code" means any non-source
form of a work.
A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.
The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form. A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.
The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities. However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work. For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.
The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.
The Corresponding Source for a work in source code form is that
same work.
2. Basic Permissions.
All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met. This License explicitly affirms your unlimited
permission to run the unmodified Program. The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work. This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.
You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force. You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright. Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.
Conveying under any other circumstances is permitted solely under
the conditions stated below. Sublicensing is not allowed; section 10
makes it unnecessary.
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.
When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.
4. Conveying Verbatim Copies.
You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.
You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.
5. Conveying Modified Source Versions.
You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:
a) The work must carry prominent notices stating that you modified
it, and giving a relevant date.
b) The work must carry prominent notices stating that it is
released under this License and any conditions added under section
7. This requirement modifies the requirement in section 4 to
"keep intact all notices".
c) You must license the entire work, as a whole, under this
License to anyone who comes into possession of a copy. This
License will therefore apply, along with any applicable section 7
additional terms, to the whole of the work, and all its parts,
regardless of how they are packaged. This License gives no
permission to license the work in any other way, but it does not
invalidate such permission if you have separately received it.
d) If the work has interactive user interfaces, each must display
Appropriate Legal Notices; however, if the Program has interactive
interfaces that do not display Appropriate Legal Notices, your
work need not make them do so.
A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit. Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.
6. Conveying Non-Source Forms.
You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:
a) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by the
Corresponding Source fixed on a durable physical medium
customarily used for software interchange.
b) Convey the object code in, or embodied in, a physical product
(including a physical distribution medium), accompanied by a
written offer, valid for at least three years and valid for as
long as you offer spare parts or customer support for that product
model, to give anyone who possesses the object code either (1) a
copy of the Corresponding Source for all the software in the
product that is covered by this License, on a durable physical
medium customarily used for software interchange, for a price no
more than your reasonable cost of physically performing this
conveying of source, or (2) access to copy the
Corresponding Source from a network server at no charge.
c) Convey individual copies of the object code with a copy of the
written offer to provide the Corresponding Source. This
alternative is allowed only occasionally and noncommercially, and
only if you received the object code with such an offer, in accord
with subsection 6b.
d) Convey the object code by offering access from a designated
place (gratis or for a charge), and offer equivalent access to the
Corresponding Source in the same way through the same place at no
further charge. You need not require recipients to copy the
Corresponding Source along with the object code. If the place to
copy the object code is a network server, the Corresponding Source
may be on a different server (operated by you or a third party)
that supports equivalent copying facilities, provided you maintain
clear directions next to the object code saying where to find the
Corresponding Source. Regardless of what server hosts the
Corresponding Source, you remain obligated to ensure that it is
available for as long as needed to satisfy these requirements.
e) Convey the object code using peer-to-peer transmission, provided
you inform other peers where the object code and Corresponding
Source of the work are being offered to the general public at no
charge under subsection 6d.
A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.
A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling. In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage. For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product. A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.
"Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source. The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.
If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information. But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).
The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed. Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.
Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.
7. Additional Terms.
"Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law. If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.
When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it. (Additional permissions may be written to require their own
removal in certain cases when you modify the work.) You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.
Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:
a) Disclaiming warranty or limiting liability differently from the
terms of sections 15 and 16 of this License; or
b) Requiring preservation of specified reasonable legal notices or
author attributions in that material or in the Appropriate Legal
Notices displayed by works containing it; or
c) Prohibiting misrepresentation of the origin of that material, or
requiring that modified versions of such material be marked in
reasonable ways as different from the original version; or
d) Limiting the use for publicity purposes of names of licensors or
authors of the material; or
e) Declining to grant rights under trademark law for use of some
trade names, trademarks, or service marks; or
f) Requiring indemnification of licensors and authors of that
material by anyone who conveys the material (or modified versions of
it) with contractual assumptions of liability to the recipient, for
any liability that these contractual assumptions directly impose on
those licensors and authors.
All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10. If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term. If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.
If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.
Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.
8. Termination.
You may not propagate or modify a covered work except as expressly
provided under this License. Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).
However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.
Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.
Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License. If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.
9. Acceptance Not Required for Having Copies.
You are not required to accept this License in order to receive or
run a copy of the Program. Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance. However,
nothing other than this License grants you permission to propagate or
modify any covered work. These actions infringe copyright if you do
not accept this License. Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.
10. Automatic Licensing of Downstream Recipients.
Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License. You are not responsible
for enforcing compliance by third parties with this License.
An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations. If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.
You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License. For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.
11. Patents.
A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based. The
work thus licensed is called the contributor's "contributor version".
A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version. For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.
Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.
In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement). To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.
If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients. "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.
If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.
A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License. You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.
Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.
12. No Surrender of Others' Freedom.
If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all. For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.
13. Remote Network Interaction; Use with the GNU General Public License.
Notwithstanding any other provision of this License, if you modify the
Program, your modified version must prominently offer all users
interacting with it remotely through a computer network (if your version
supports such interaction) an opportunity to receive the Corresponding
Source of your version by providing access to the Corresponding Source
from a network server at no charge, through some standard or customary
means of facilitating copying of software. This Corresponding Source
shall include the Corresponding Source for any work covered by version 3
of the GNU General Public License that is incorporated pursuant to the
following paragraph.
Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU General Public License into a single
combined work, and to convey the resulting work. The terms of this
License will continue to apply to the part which is the covered work,
but the work with which it is combined will remain governed by version
3 of the GNU General Public License.
14. Revised Versions of this License.
The Free Software Foundation may publish revised and/or new versions of
the GNU Affero General Public License from time to time. Such new versions
will be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the
Program specifies that a certain numbered version of the GNU Affero General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation. If the Program does not specify a version number of the
GNU Affero General Public License, you may choose any version ever published
by the Free Software Foundation.
If the Program specifies that a proxy can decide which future
versions of the GNU Affero General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.
Later license versions may give you additional or different
permissions. However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
Also add information on how to contact you by electronic and paper mail.
If your software can interact with users remotely through a computer
network, you should also make sure that it provides a way for users to
get its source. For example, if your program is a web application, its
interface could display a "Source" link that leads users to an archive
of the code. There are many ways you could offer source, and different
solutions will be better for different programs; see section 13 for the
specific requirements.
You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU AGPL, see
<https://www.gnu.org/licenses/>.
View File
File renamed without changes.
+40 -16
View File
@@ -1,22 +1,25 @@
<p align="center">
<img src="port/android/steam_frame_grid/library.png" width="640" alt="Ringfall: Mjolnir VR">
<img src="port/android/steam_frame_grid/library.png" width="640" alt="Mjolnir VR">
</p>
# Ringfall: Mjolnir VR
# Mjolnir VR
**A VR mod for Halo: Combat Evolved** (the original Xbox game) on the
**Meta Quest 3 / 3S** and the **Steam Frame**. Play the campaign and
multiplayer in full 6DoF virtual reality, with your hands in the game.
Ringfall: Mjolnir VR runs on your headset by itself, without a PC. It
Mjolnir VR runs on your headset by itself, without a PC. It
brings no game files: it uses a disc image of **your own, purchased copy**
of the game.
> **Unofficial fan project.** Ringfall: Mjolnir VR is a free,
> **Unofficial fan project.** Mjolnir VR is a free,
> non-commercial fan project. It is not affiliated with, endorsed,
> sponsored or approved by Microsoft, Xbox Game Studios, Halo Studios or
> Bungie. See [Legal](#legal).
Until build 313 it was called *Ringfall: Mjolnir VR*. Installed builds
update to the new name by themselves, and the old links lead here.
## Contents
- [What you get](#what-you-get)
@@ -86,14 +89,14 @@ that it updates itself.
2. **Install [SideQuest](https://sidequestvr.com/setup-howto)** (the
"Advanced Installer") on your computer and connect the Quest with a
USB cable. In the headset, allow USB debugging for this computer.
3. **Download `RingfallMjolnirVR.apk`** from the
3. **Download `MjolnirVR.apk`** from the
[latest release](../../releases/latest) and drag it onto the SideQuest
window. It installs the game.
4. **Copy your disc image** to the Quest's `Download` folder: in
SideQuest, open the file manager (the folder icon), go to `Download`
and drag the `.iso` file in.
5. **In the headset**, open your *Library*, choose *Unknown Sources* and
start **Ringfall: Mjolnir VR**. Select **Choose disc image** and pick
start **Mjolnir VR**. Select **Choose disc image** and pick
your file in `Download`. The game copies what it needs (about 1.8 GB,
a minute or two) and starts.
@@ -108,14 +111,14 @@ No computer and no keyboard needed.
*Switch to Desktop*.
2. **Put your disc image** in the `Downloads` folder (for example from a
USB stick or memory card with the file manager, Dolphin).
3. **Download `Install-Ringfall-Mjolnir-VR.desktop`** from the
3. **Download `Install-Mjolnir-VR.desktop`** from the
[latest release](../../releases/latest) with the web browser.
4. **Open it**: in Dolphin, open `Downloads` and double-click the file.
If you are asked whether to run it, choose to continue.
5. **Answer the dialogs.** The installer finds your disc image, copies
what the game needs, adds **Ringfall: Mjolnir VR** to your Steam
what the game needs, adds **Mjolnir VR** to your Steam
library and offers to switch back to Gaming Mode.
6. Start **Ringfall: Mjolnir VR** from your library (under *Non-Steam*).
6. Start **Mjolnir VR** from your library (under *Non-Steam*).
The game updates itself: when a new version is out, it is downloaded
while you play and used from the next start on. Your settings, saves and
@@ -155,7 +158,7 @@ telemetry.
## Credits
Ringfall: Mjolnir VR stands on the work of others:
Mjolnir VR stands on the work of others:
- **[OpenCE](https://github.com/OpenCommunityEdition/OpenCE)** (Open
Community Edition): the port of the decompiled game to Linux, Windows
@@ -170,8 +173,9 @@ Ringfall: Mjolnir VR stands on the work of others:
- **[HaloCE-VR](https://github.com/astromaddie/HaloCE-VR)** by astromaddie
(CC0): the Steam Frame work, whose findings (such as quieting Mesa's
trace markers) are used here.
- **[extract-xiso](https://github.com/XboxDev/extract-xiso)**: the disc
image readers follow its format handling.
- **[xboxdevwiki](https://xboxdevwiki.net/XDVDFS)**: its description of
the Xbox's disc file system, which the disc image readers are written
from.
- The libraries and fonts in [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
Thank you all.
@@ -185,7 +189,7 @@ port it is built on.
## Legal
Ringfall: Mjolnir VR is an unofficial, free, non-commercial fan project.
Mjolnir VR is an unofficial, free, non-commercial fan project.
It is not affiliated with, endorsed, sponsored or approved by Microsoft
Corporation, Xbox Game Studios, Halo Studios or Bungie. Halo, Halo: Combat
Evolved and Xbox are trademarks of Microsoft Corporation; they are named
@@ -198,6 +202,26 @@ distributed. You need your own, legally purchased copy of the game. If
you enjoy this mod, please support the creators of the original by buying
their games.
This project's own code is released under [CC0 1.0](LICENSE.md), as the
decompilation it builds on. Third-party code and fonts keep their own
licenses: see [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
### Licence
Mjolnir VR is free software: you can give it to others and change
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, version 3 of the License or (at your option)
any later version (`AGPL-3.0-or-later`), as OpenCE, which it builds on, is.
It comes with no warranty. The full text is in [LICENSE](LICENSE).
- **From build 312 on.** The AGPL applies from the commit that took in
OpenCE's change of licence (19 October 2026), and to each release built
from it or a later one. Earlier releases, and the source at every earlier
commit, were released under [CC0 1.0](LICENSES/CC0-1.0.txt) and stay
that way.
- **Hosts and servers.** If you change the game and let other persons play
with your version over a network (for example, as the host of an
internet game), the AGPL asks you to offer them the source of your
version. The game as released has its source here, and each release's
source is its tag (`build-<n>`).
- **Third-party code and fonts** keep their own licences: see
[THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).
- **Halo is not covered.** The licence covers the work of this project's
and OpenCE's authors. It gives no rights in Halo, its maps or anything
else that Microsoft owns.
+10 -8
View File
@@ -1,14 +1,16 @@
# Third-party notices
Ringfall: Mjolnir VR's own code is released under [CC0 1.0](LICENSE.md).
It includes or builds on the following, under their own licenses; each
license's full text is in the file named.
Mjolnir VR is released under the GNU Affero General Public
License, version 3 or later ([LICENSE](LICENSE)); releases before build 312
were released under [CC0 1.0](LICENSES/CC0-1.0.txt). It includes or builds
on the following, under their own licenses; each license's full text is in
the file named.
## Code
| Component | Used for | License | Text |
| --- | --- | --- | --- |
| [OpenCE](https://github.com/OpenCommunityEdition/OpenCE) and the decompilation ([bnunu/halo-1](https://github.com/bnunu/halo-1), [punpckhdq/halo](https://github.com/punpckhdq/halo)) | the game's code, the port | CC0 1.0 | [LICENSE.md](LICENSE.md) |
| [OpenCE](https://github.com/OpenCommunityEdition/OpenCE) and the decompilation ([bnunu/halo-1](https://github.com/bnunu/halo-1), [punpckhdq/halo](https://github.com/punpckhdq/halo)) | the game's code, the port | AGPL 3.0 or later (OpenCE from 19 October 2026, punpckhdq/halo from 17 October 2026; CC0 1.0 before); bnunu/halo-1: CC0 1.0 | [LICENSE](LICENSE), [LICENSES/CC0-1.0.txt](LICENSES/CC0-1.0.txt) |
| [HaloCE-Quest-VR](https://github.com/moistman42069/HaloCE-Quest-VR) | the arm IK, forearm twist and finger poses (`port/linux/game/vr_arms.c`) | CC0 1.0 | (its repository) |
| [HaloCE-VR](https://github.com/astromaddie/HaloCE-VR) | Steam Frame findings | CC0 1.0 | (its repository) |
| [SDL 3](https://libsdl.org) | windows, input, sound | zlib | (in SDL's source, `LICENSE.txt`) |
@@ -22,11 +24,11 @@ license's full text is in the file named.
| [tomlc17](https://github.com/cktan/tomlc17) | reading `config.toml` | MIT | [port/third_party/tomlc17/LICENSE](port/third_party/tomlc17/LICENSE) |
| [stb](https://github.com/nothings/stb) | drawing the game's text sharply (stb_truetype) | MIT or public domain | [port/third_party/stb/LICENSE](port/third_party/stb/LICENSE) |
| [SMAA](https://www.iryoku.com/smaa/) | anti-aliasing (flat screens; off in VR) | MIT | [port/third_party/smaa/LICENSE](port/third_party/smaa/LICENSE) |
| [extract-xiso](https://github.com/XboxDev/extract-xiso) | reading disc images (followed by `XisoExtractor.java`, `steam_frame_xiso.py`, `xiso.c`) | BSD-style (in@fishtank.com) | [port/third_party/extract-xiso/LICENSE.TXT](port/third_party/extract-xiso/LICENSE.TXT) |
The disc image readers include this acknowledgement, as extract-xiso's
license asks: *This product includes software developed by in
&lt;in@fishtank.com&gt;.*
The disc image readers (`XisoExtractor.java`, `steam_frame_xiso.py`,
`xiso.c`) are written from a description of the Xbox's disc file system
([xboxdevwiki's XDVDFS page](https://xboxdevwiki.net/XDVDFS)), not from
extract-xiso, which earlier releases followed.
## Fonts
+43 -5
View File
@@ -16,6 +16,11 @@ from tools.linux_build import check_profile_options, generate_linux_build, linux
from tools.web_build import generate_web_build, web_configure_inputs
from tools.windows_build import generate_windows_build, windows_configure_inputs
def is_windows() -> bool:
return os.name == "nt"
# arguments
parser = argparse.ArgumentParser()
parser.add_argument(
@@ -89,6 +94,38 @@ parser.add_argument(
type=str,
help="Emscripten's emcc for `ninja web` (default: emcc on the PATH, then EMSDK's or ~/emsdk's)",
)
# no need to spam those extra flags when running on Windows
if not is_windows():
parser.add_argument(
"--windows-cross",
action="store_true",
help="generate the Windows build (`ninja windows`) on Linux, cross-compiling "
"with clang against an MSVC toolchain (--windows-vctools-dir and --windows-sdk-dir), "
"and make it the default target",
)
parser.add_argument(
"--windows-cc",
metavar="BINARY",
help="compiler for the Windows cross build, `ninja windows` (default: clang). "
"Only clang is supported for now.",
)
parser.add_argument(
"--windows-vctools-dir",
metavar="DIR",
type=Path,
help="the Visual C++ tools of the MSVC toolchain a --windows-cross build compiles "
"and links against: the versioned folder under VC/Tools/MSVC, the one with `include` "
"and `lib` (default: VCToolsInstallDir)",
)
parser.add_argument(
"--windows-sdk-dir",
metavar="DIR",
type=Path,
help="the Windows SDK a --windows-cross build compiles and links against: the "
"folder with `Include` and `Lib`, each with a versioned folder (default: WindowsSdkDir)",
)
args = parser.parse_args()
try:
check_profile_options(args.profile, args.pgo)
@@ -110,10 +147,11 @@ sln = SimpleNamespace(
android_guest_cc=args.android_guest_cc,
web_emcc=args.web_emcc,
)
def is_windows() -> bool:
return os.name == "nt"
if not is_windows():
sln.windows_cc = args.windows_cc
sln.windows_cross = args.windows_cross
sln.windows_vctools_dir = args.windows_vctools_dir
sln.windows_sdk_dir = args.windows_sdk_dir
# build.ninja
@@ -159,7 +197,7 @@ n.newline()
# the build for this computer, where it could be generated (the Windows
# build is left out when SDL cannot be fetched, for instance)
default = "windows" if is_windows() else "linux"
default = "windows" if is_windows() or sln.windows_cross else "linux"
if f"\nbuild {default}: " in out.getvalue():
n.comment("Default rule: the build for this computer")
n.default(default)
+3
View File
@@ -0,0 +1,3 @@
*
!healthz.sh
!*.zip
+2
View File
@@ -0,0 +1,2 @@
# a release zip copied here to build the image from (README.md, "Building it")
*.zip
+60
View File
@@ -0,0 +1,60 @@
# syntax=docker/dockerfile:1
#
# The dedicated server (docs/dedicated_server.md) as a container image, made
# from a release's halo-linux-release.zip (the portable build: halo, its
# libSDL3.so.0, brokers.txt, masters.txt):
#
# docker build -t opence-server deploy/docker
# docker build -t opence-server --build-arg RELEASE=https://github.com/OpenCommunityEdition/OpenCE/releases/download/build-206/halo-linux-release.zip deploy/docker
# docker build -t opence-server --build-arg RELEASE=halo-linux-release.zip deploy/docker (a zip in deploy/docker)
#
# The game data is never in the image: mount the folder that holds maps/ at
# /data, read-only. /state is the only folder the server writes (config.toml,
# the save root with its map cache, the logs), so the root can be read-only.
# deploy/docker/README.md says how to run it.
FROM debian:bookworm-slim AS release
RUN apt-get update \
&& apt-get install -y --no-install-recommends unzip \
&& rm -rf /var/lib/apt/lists/*
# a URL, or a file beside this Dockerfile
ARG RELEASE=https://github.com/OpenCommunityEdition/OpenCE/releases/latest/download/halo-linux-release.zip
ADD ${RELEASE} /tmp/halo-linux-release.zip
COPY healthz.sh /opt/opence/healthz.sh
RUN unzip -q /tmp/halo-linux-release.zip -d /opt/opence \
&& test -f /opt/opence/halo \
&& chmod 0755 /opt/opence/halo /opt/opence/healthz.sh \
&& if [ -f /opt/opence/halo-server ]; then chmod 0755 /opt/opence/halo-server; fi
FROM debian:bookworm-slim
# The 32-bit C runtime; the release's own libSDL3.so.0 needs nothing more for
# a server, which opens no window or sound device. ca-certificates: the
# master servers and the update check are HTTPS.
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y --no-install-recommends libc6:i386 libgcc-s1:i386 ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd -g 10001 opence \
&& useradd -u 10001 -g 10001 -d /state -M -s /usr/sbin/nologin opence \
&& mkdir -p /data /state \
&& chown 10001:10001 /state
COPY --from=release /opt/opence /opt/opence
ENV HALO_SERVER=1 \
HALO_CONFIG_FILE=/state/config.toml \
HALO_DATA_ROOT=/data \
HALO_SAVE_ROOT=/state/saves \
HALO_LOG_ROOT=/state/logs \
HALO_NET_TUNNEL_PORT=2302 \
HALO_SERVER_WEB_BIND=0.0.0.0 \
HALO_SERVER_WEB_PORT=8080 \
HOME=/state
VOLUME ["/state"]
# Internet play's tunnel, and the web page, API and RCON (publish it on the
# host's loopback, or behind a proxy with TLS). System link's 5150, 5151 and
# 5153 are for a local network only.
EXPOSE 2302/udp 8080/tcp
USER 10001:10001
WORKDIR /state
HEALTHCHECK --interval=15s --timeout=3s --start-period=60s --retries=3 CMD ["/opt/opence/healthz.sh"]
STOPSIGNAL SIGTERM
ENTRYPOINT ["/opt/opence/halo", "--server"]
+134
View File
@@ -0,0 +1,134 @@
# The dedicated server in a container
`ghcr.io/opencommunityedition/opence-server` is the dedicated server
(`docs/dedicated_server.md`) as a container image: a release's
`halo-linux-release.zip` on Debian 12 with the 32-bit C runtime, run as
`halo --server` by the user 10001. CI builds it from each release
(`.github/workflows/server-image.yml`) and signs it with cosign; the tags are
`latest`, the release's (`build-206`) and `sha-<commit>`.
The game data is never in the image. Mount the folder that holds `maps/`
(from your own copy of the game: port/linux/README.md, "Game data") at
`/data`, read-only. Without it the server exits with code 2 and says which
maps it looked for.
## Running it
```sh
docker run -d --name halo --restart unless-stopped \
--read-only --cap-drop ALL --security-opt no-new-privileges --tmpfs /tmp \
-p 2302:2302/udp -p 127.0.0.1:8080:8080 \
-v /srv/halo/data:/data:ro -v halo-state:/state \
-e HALO_SERVER_NAME="My server" \
-e HALO_SERVER_ROTATION="bloodgulch:ctf, sidewinder:team_slayer" \
-e HALO_SERVER_WEB_PASSWORD=changeme-please \
ghcr.io/opencommunityedition/opence-server:latest
docker logs -f halo
```
Or with Compose: `compose.yaml` beside this file runs the same, with the
settings taken from the shell or a `.env` file
(`HALO_DATA=/srv/halo/data`, `HALO_SERVER_NAME=...`). Its `https` profile
adds Caddy in front of the web port, with a certificate for
`HALO_WEB_DOMAIN`:
```sh
HALO_DATA=/srv/halo/data docker compose -f deploy/docker/compose.yaml up -d
HALO_WEB_DOMAIN=halo.example.org docker compose -f deploy/docker/compose.yaml --profile https up -d
```
The Compose file puts both on a network of its own, `172.30.80.0/24`, with
Caddy at the fixed address `172.30.80.10` and the server's
`HALO_SERVER_WEB_TRUSTED_PROXY` set to it: the server believes Caddy's
`X-Forwarded-For`, `-Host` and `-Proto`, so its rate limits and log name the
visitor rather than Caddy, and the session cookie is `Secure`. If that
subnet overlaps one of the host's, change the subnet, Caddy's
`ipv4_address` and the variable together.
`docker stop` sends SIGTERM: the game in progress goes to its postgame,
the players are told, the listing is withdrawn, and the server exits 0
within the 15 seconds Compose waits (`docker stop -t 15` otherwise).
## Folders
| Path | What |
| --- | --- |
| `/opt/opence` | The release: `halo`, `libSDL3.so.0`, `brokers.txt`, `masters.txt`, `healthz.sh`, the licences (read-only) |
| `/data` | The game data: `maps/`, and if you have them `custom_maps/`, `gametypes/` and `init.txt` (yours, read-only) |
| `/state` | The only folder written: `config.toml` (`HALO_CONFIG_FILE`), `publisher.key` beside it, the save root `saves/` with the map cache (about 115 MB), `logs/` (`debug.txt`, `bans.txt`, `cheaters.txt`) |
The image sets `HALO_CONFIG_FILE=/state/config.toml` rather than linking
`config.toml` beside the executable into the volume: the settings file is
then in the volume from the first start, and nothing in `/opt/opence` is
written. The server writes every setting there at the first start, with
the generated web password if none was given.
## Settings
Every setting is an environment variable (port/linux/README.md, "Dedicated
server", and docs/dedicated_server.md). A variable that is set wins over
`config.toml`, and the web page's settings cannot change it. The image sets:
| Variable | Value |
| --- | --- |
| `HALO_SERVER` | `1` |
| `HALO_CONFIG_FILE` | `/state/config.toml` |
| `HALO_DATA_ROOT` | `/data` |
| `HALO_SAVE_ROOT` | `/state/saves` |
| `HALO_LOG_ROOT` | `/state/logs` |
| `HALO_NET_TUNNEL_PORT` | `2302` |
| `HALO_SERVER_WEB_BIND` | `0.0.0.0` (within the container; publish the port on `127.0.0.1` or behind TLS) |
| `HALO_SERVER_WEB_PORT` | `8080` |
The ones most often given: `HALO_SERVER_NAME`, `HALO_SERVER_ROTATION`,
`HALO_SERVER_MAX_PLAYERS`, `HALO_SERVER_PASSWORD`, `HALO_SERVER_PUBLIC`,
`HALO_SERVER_MOTD`, `HALO_SERVER_WEB_PASSWORD`, `HALO_NET_PUBLIC_ADDRESS`,
`HALO_SERVER_PUBLISHER_KEY` (the master servers' key, as 64 hex
characters; `docker run --rm -v halo-state:/state <image> --keygen` makes one
into the volume instead), `HALO_SERVER_INSTANCE`, `HALO_SERVER_REGION`,
`HALO_SERVER_LOG_FORMAT=json`.
A tunnel port other than 2302 is published as the same number on both sides
(`-e HALO_NET_TUNNEL_PORT=2303 -p 2303:2303/udp`), as the server offers its
own port to joiners. Behind a NAT that STUN cannot see through, give the
public address and port in `HALO_NET_PUBLIC_ADDRESS`.
## Health
`HEALTHCHECK` runs `/opt/opence/healthz.sh`, which asks `GET /healthz` on
the web port (bash's `/dev/tcp`: the image has no curl) and is healthy on a
200: the server is hosting (lobby, loading, playing or postgame) and its
frames run. With `HALO_SERVER_WEB_PORT=0` it always passes.
## Building it
```sh
docker build -t opence-server deploy/docker # the latest release
docker build -t opence-server --build-arg RELEASE=https://github.com/OpenCommunityEdition/OpenCE/releases/download/build-206/halo-linux-release.zip deploy/docker
```
A build of your own (`python tools/ci_build.py linux release` leaves
`dist/halo-linux-release/`) goes in as a zip beside the Dockerfile:
```sh
(cd dist/halo-linux-release && zip -qr ../../deploy/docker/halo-linux-release.zip .)
docker build -t opence-server --build-arg RELEASE=halo-linux-release.zip deploy/docker
```
`RELEASE` is a URL or a file beside the Dockerfile. The image is 32-bit
x86 and runs on amd64 hosts only.
## Networking
Bridge networking works for internet play: the tunnel port is published one
to one, and the server needs no hole punching of its own. System link
(UDP 5150 and 5151, TCP 5150 and 5153) finds other machines only with
`--network host`.
Verify an image's signature:
```sh
cosign verify ghcr.io/opencommunityedition/opence-server:latest \
--certificate-identity-regexp '^https://github\.com/OpenCommunityEdition/OpenCE/\.github/workflows/server-image\.yml@' \
--certificate-oidc-issuer https://token.actions.githubusercontent.com
```
+92
View File
@@ -0,0 +1,92 @@
# The dedicated server with Docker Compose (deploy/docker/README.md):
#
# docker compose -f deploy/docker/compose.yaml up -d
# docker compose -f deploy/docker/compose.yaml --profile https up -d (with Caddy in front of the web port)
#
# HALO_DATA is the folder that holds maps/ (and custom_maps/, gametypes/),
# mounted read-only; settings come from the environment below or from a
# .env file beside this one.
name: opence
services:
server:
image: ${OPENCE_IMAGE:-ghcr.io/opencommunityedition/opence-server:latest}
restart: unless-stopped
read_only: true
cap_drop: [ALL]
security_opt: ["no-new-privileges:true"]
tmpfs:
- /tmp
ports:
- "${HALO_NET_TUNNEL_PORT:-2302}:${HALO_NET_TUNNEL_PORT:-2302}/udp"
# (the web page on the host's loopback only; Caddy reaches it on the
# compose network)
- "127.0.0.1:${HALO_SERVER_WEB_PORT:-8080}:${HALO_SERVER_WEB_PORT:-8080}/tcp"
volumes:
- ${HALO_DATA:-./data}:/data:ro
- state:/state
# A variable named without a value is passed only when it is set (in the
# shell or .env): one that is set wins over config.toml, and sv_set
# cannot change it.
environment:
- HALO_NET_TUNNEL_PORT=${HALO_NET_TUNNEL_PORT:-2302}
- HALO_SERVER_WEB_PORT=${HALO_SERVER_WEB_PORT:-8080}
- HALO_SERVER_NAME
- HALO_SERVER_ROTATION
- HALO_SERVER_MAX_PLAYERS
- HALO_SERVER_PASSWORD
- HALO_SERVER_PUBLIC
- HALO_SERVER_MOTD
# (8 characters or more; unset: one is made at the first start, printed
# in the log and kept in the state volume's config.toml)
- HALO_SERVER_WEB_PASSWORD
- HALO_NET_PUBLIC_ADDRESS
- HALO_SERVER_PUBLISHER_KEY
- HALO_SERVER_INSTANCE
- HALO_SERVER_REGION
- HALO_SERVER_LOG_FORMAT
# Caddy's address on the network below (the https profile): its
# X-Forwarded-For, -Host and -Proto are believed, so the page's rate
# limits and log name the visitor, and its session cookie is Secure.
# Nothing else has this address.
- HALO_SERVER_WEB_TRUSTED_PROXY=172.30.80.10
networks:
- opence
stop_grace_period: 15s
# HTTPS for the web page, with a certificate from Let's Encrypt for
# HALO_WEB_DOMAIN (which must resolve to this host, ports 80 and 443 open).
caddy:
image: caddy:2
profiles: [https]
restart: unless-stopped
depends_on: [server]
ports:
- "80:80/tcp"
- "443:443/tcp"
- "443:443/udp"
command: ["caddy", "reverse-proxy", "--from", "${HALO_WEB_DOMAIN:-halo.example.org}", "--to", "server:${HALO_SERVER_WEB_PORT:-8080}"]
volumes:
- caddy-data:/data
- caddy-config:/config
networks:
opence:
# (server.web_trusted_proxy above; outside the range Docker hands
# out, so no other container takes it)
ipv4_address: 172.30.80.10
# A fixed subnet, so that Caddy's address is known in advance. Containers
# other than Caddy get addresses from ip_range only. Change it (and the two
# addresses above) if it overlaps a network of the host's.
networks:
opence:
ipam:
config:
- subnet: 172.30.80.0/24
ip_range: 172.30.80.128/25
gateway: 172.30.80.1
volumes:
state:
caddy-data:
caddy-config:
+18
View File
@@ -0,0 +1,18 @@
#!/bin/bash
# The image's health check: GET /healthz on the web port, healthy on a 200
# (the server answers 200 while it hosts and its frames run, 503 otherwise).
# Bash's /dev/tcp, as the image has no curl.
port="${HALO_SERVER_WEB_PORT:-8080}"
# (no web port: nothing to ask)
if [ -z "$port" ] || [ "$port" = 0 ]; then
exit 0
fi
{ exec 3<>"/dev/tcp/127.0.0.1/$port"; } 2>/dev/null || exit 1
printf 'GET /healthz HTTP/1.1\r\nHost: 127.0.0.1:%s\r\nConnection: close\r\n\r\n' "$port" >&3 || exit 1
IFS=' ' read -r -t 3 version status _ <&3 || exit 1
exec 3<&-
case "$version" in
HTTP/1.*) ;;
*) exit 1 ;;
esac
[ "$status" = 200 ]
+29
View File
@@ -0,0 +1,29 @@
# Big team slayer: first team to 50 kills, vehicles as Halo PC places them.
# Play it with server.rotation entries such as bloodgulch:btb_slayer.
base = "team_slayer"
name = "BTB Slayer"
[universal]
teams = true
score_to_win = 50
lives = 0
respawn_time = 5
health = 100
weapon_set = "normal"
vehicle_set = "default"
radar = true
friend_indicators = true
[options]
time_limit = 20
friendly_fire = "shields_only"
friendly_fire_penalty = 5
vehicle_respawn_time = 60
auto_team_balance = true
radar_players = "friends"
team_vehicles = "pc"
[slayer]
no_death_bonus = false
no_kill_penalty = false
kill_in_order = false
+27
View File
@@ -0,0 +1,27 @@
# Capture the flag as players remember it: three captures, the flag must be
# at home to score.
base = "ctf"
name = "Classic CTF"
[universal]
teams = true
score_to_win = 3
respawn_time = 5
weapon_set = "normal"
vehicle_set = "default"
radar = true
[options]
time_limit = 25
friendly_fire = "off"
vehicle_respawn_time = 90
auto_team_balance = true
radar_players = "friends"
team_vehicles = "pc"
[ctf]
assault = false
reset_on_capture = false
flag_must_reset = false
flag_at_home_to_score = true
single_flag_time = 0
+17
View File
@@ -0,0 +1,17 @@
# King of the hill whose hill moves about the map, for teams.
base = "team_king"
name = "Moving Hill"
[universal]
teams = true
score_to_win = 3
respawn_time = 5
radar = true
[options]
time_limit = 15
friendly_fire = "off"
auto_team_balance = true
[king]
moving_hill = true
+23
View File
@@ -0,0 +1,23 @@
# Free for all slayer to 25 kills, starting with a pistol and an assault rifle.
base = "slayer"
name = "Lone Wolves"
[universal]
teams = false
score_to_win = 25
respawn_time = 3
health = 100
radar = false
[options]
time_limit = 15
radar_players = "none"
loadout = "custom"
primary_weapon = "pistol"
secondary_weapon = "assault_rifle"
team_vehicles = "pc"
[slayer]
no_death_bonus = false
no_kill_penalty = false
kill_in_order = false
+2
View File
@@ -0,0 +1,2 @@
#!/bin/sh
exec "$(dirname "$0")/halo" --server "$@"
+3
View File
@@ -0,0 +1,3 @@
# Not part of the packaged chart: unit tests and CI values files.
tests/
ci/
+17
View File
@@ -0,0 +1,17 @@
apiVersion: v2
name: opence-server
description: >-
The OpenCE dedicated server: a headless Halo: Combat Evolved host that plays games one after
another, with no window, sound or player of its own. The game data (maps) is mounted from a
volume you provide.
type: application
version: 0.1.0
kubeVersion: ">=1.29.0-0"
# Informational only: which image runs is set by image.repository, image.tag and image.digest.
appVersion: "latest"
home: https://github.com/OpenCommunityEdition/OpenCE
sources:
- https://github.com/OpenCommunityEdition/OpenCE/tree/main/deploy/helm/opence-server
keywords:
- halo
- game-server
+111
View File
@@ -0,0 +1,111 @@
# opence-server
The OpenCE dedicated server (`docs/dedicated_server.md`) on Kubernetes: one
pod of the image `ghcr.io/opencommunityedition/opence-server`
(`deploy/docker`), its tunnel port behind a UDP Service, its web page behind
a ClusterIP Service, probes on `GET /healthz`, and a NetworkPolicy.
The game data is never in the image or the chart: give a volume that holds
`maps/` from your own copy of the game.
## Quick start
```sh
kubectl create namespace halo
# a claim (or an NFS export) holding maps/, read-only is enough
helm install halo deploy/helm/opence-server -n halo \
--set gameData.existingClaim=halo-maps \
--set server.name="My server" \
--set persistence.enabled=true
kubectl -n halo logs -f deploy/halo-opence-server
```
The admin password of the web page is made at the first install and kept in
the release's Secret (NOTES.txt prints the command that shows it), unless
`web.password` or `web.existingSecret` gives one. Reach the page with
`kubectl -n halo port-forward deploy/halo-opence-server 8080`, or put an
Ingress with TLS in front of the `-web` Service (and allow its namespace
in `networkPolicy.webFrom`).
## Values
`values.yaml` describes each value. Each one under `server`, `web`,
`network` and `publisherKey` is one of the server's `HALO_*` variables:
| Value | Variable |
| --- | --- |
| `server.name` | `HALO_SERVER_NAME` (15 characters) |
| `server.rotation` (a list) | `HALO_SERVER_ROTATION`, joined with commas |
| `server.maxPlayers` | `HALO_SERVER_MAX_PLAYERS` |
| `server.public` | `HALO_SERVER_PUBLIC` |
| `server.lobbySeconds` | `HALO_SERVER_LOBBY_SECONDS` |
| `server.motd` | `HALO_SERVER_MOTD` |
| `server.logFormat` | `HALO_SERVER_LOG_FORMAT` |
| `server.instance`, `server.region` | `HALO_SERVER_INSTANCE`, `HALO_SERVER_REGION` |
| `server.masterPublish` | `HALO_SERVER_MASTER_PUBLISH` |
| `server.password` | `HALO_SERVER_PASSWORD` (from a Secret) |
| `publisherKey` | `HALO_SERVER_PUBLISHER_KEY` (from a Secret) |
| `web.port` | `HALO_SERVER_WEB_PORT` (0: none, and no probes) |
| `web.password`, `web.existingSecret` | `HALO_SERVER_WEB_PASSWORD` (from a Secret) |
| `web.moderatorPassword` | `HALO_SERVER_WEB_MODERATOR_PASSWORD` (from a Secret) |
| `network.tunnelPort` | `HALO_NET_TUNNEL_PORT` |
| `network.publicAddress` | `HALO_NET_PUBLIC_ADDRESS` |
| `customMaps` | `HALO_CUSTOM_MAPS_ROOT=/custom_maps` |
The chart also sets `HALO_SERVER=1`, `HALO_CONFIG_FILE=/state/config.toml`,
`HALO_DATA_ROOT=/data`, `HALO_SAVE_ROOT=/state/saves`,
`HALO_LOG_ROOT=/state/logs`, `HALO_SERVER_CONSOLE=false` (a pod has no
standard input) and, with a web port, `HALO_SERVER_WEB_BIND=0.0.0.0` (the
kubelet's probes reach the pod's address). Any other setting goes in
`extraEnv`, which comes last and so overrides the chart's.
A variable the chart sets wins over `config.toml`, and neither `sv_set` nor
the web page's settings can change it. So the values under `server` are
unset by default (empty, `[]` or `null`): the chart then sets no variable,
and the setting is `config.toml`'s (or the server's default, which
`values.yaml` names), changeable from the web page and kept in the state
volume. Give a value only for a setting you want fixed.
## Web password
With neither `web.password` nor `web.existingSecret`, the chart makes an
admin password at the first install and keeps it in the release's Secret;
on an upgrade it finds that Secret again with `lookup`. `helm template`,
and GitOps tools that render with it (Argo CD, Flux's dry runs,
Kustomize's Helm support), have no cluster to look in: each render makes a
new password, and the Secret changes at every sync. There, create the Secret
yourself and name it:
```sh
kubectl -n halo create secret generic halo-web \
--from-literal=web-password="$(openssl rand -base64 18)" \
--from-literal=web-moderator-password="$(openssl rand -base64 18)"
helm template halo deploy/helm/opence-server -n halo \
--set gameData.existingClaim=halo-maps --set web.existingSecret=halo-web
```
(or a SealedSecret or an External Secrets object of the same name).
`web.key` and `web.moderatorKey` name its keys; the moderator's is
optional.
## Networking
`service.type` is `LoadBalancer` with `externalTrafficPolicy: Local` by
default, so that the server sees the players' own addresses (its bans and
limits are by address). `NodePort` works too; `ClusterIP` is for tests. The
tunnel's Service port and `network.tunnelPort` should be the same number, as
the server offers its own port to joiners; behind a NAT that STUN cannot see
through, give the forwarded address in `network.publicAddress`.
The NetworkPolicy lets anyone reach the tunnel port and only `webFrom` the
web port, and lets the pod reach DNS, TCP 1883 (the MQTT brokers) and 443
(the master servers) and any UDP port on public addresses.
## Tests
```sh
helm lint deploy/helm/opence-server --strict -f deploy/helm/opence-server/ci/full-values.yaml
helm unittest deploy/helm/opence-server
```
`.github/workflows/server-image.yml` runs both.
@@ -0,0 +1,87 @@
# Every option the chart has, for lint and the schema check (not installed: the NFS server is made
# up).
image:
tag: build-206@sha256:0000000000000000000000000000000000000000000000000000000000000000
imagePullSecrets:
- name: registry-credentials
gameData:
nfs:
server: nfs.example.com
path: /exports/halo
subPath: xbox
customMaps:
existingClaim: halo-custom-maps
server:
name: Example server
rotation: [bloodgulch:ctf_classic, sidewinder:team_slayer+score=50, hangemhigh:king_moving]
maxPlayers: 24
public: true
lobbySeconds: 20
motd: Welcome
logFormat: json
instance: eu-1
region: eu
masterPublish: true
password:
existingSecret: halo-join
key: password
publisherKey:
existingSecret: halo-publisher
key: seed
web:
port: 8080
existingSecret: halo-web
key: admin
moderatorKey: moderator
network:
tunnelPort: 2303
publicAddress: halo.example.com:2303
extraEnv:
- name: HALO_SERVER_EMPTY_SECONDS
value: "60"
persistence:
enabled: true
storageClass: standard
annotations:
example.com/keep: "true"
service:
type: LoadBalancer
port: 2303
nodePort: 30703
annotations:
example.com/address: 192.0.2.10
externalTrafficPolicy: Local
loadBalancerSourceRanges: [0.0.0.0/0]
tolerations:
- key: dedicated
operator: Equal
value: games
effect: NoSchedule
podAnnotations:
example.com/scrape: "true"
podLabels:
team: games
probes:
liveness:
periodSeconds: 30
readiness:
enabled: false
networkPolicy:
webFrom:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: ingress-nginx
extraEgress:
- to:
- ipBlock:
cidr: 203.0.113.0/24
ports:
- protocol: TCP
port: 8443
extraObjects:
- apiVersion: v1
kind: ConfigMap
metadata:
name: '{{ .Release.Name }}-extra'
data:
hello: world
@@ -0,0 +1,6 @@
# The smallest install that renders: no maps (an emptyDir in their place), so the server exits with
# code 2 and the pod goes into CrashLoopBackOff. A real install gives gameData.existingClaim or
# gameData.nfs instead.
gameData:
volume:
emptyDir: {}
@@ -0,0 +1,33 @@
OpenCE dedicated server {{ .Chart.Version }}: {{ include "opence-server.fullname" . }} in namespace {{ .Release.Namespace }}.
Rotation: {{ join ", " .Values.server.rotation | default "the server's default" }}.
{{- if kindIs "invalid" .Values.server.public }}
Listed in everyone's server browser{{ with .Values.server.name }} as "{{ . }}"{{ end }}, unless config.toml or the web page turns server.public off.
{{- else if .Values.server.public }}
Listed in everyone's server browser{{ with .Values.server.name }} as "{{ . }}"{{ end }}.
{{- else }}
Not listed: players join with the invite link from the log, or on the LAN.
{{- end }}
The log (the ready line, players, games):
kubectl -n {{ .Release.Namespace }} logs -f deploy/{{ include "opence-server.fullname" . }}
Players reach UDP port {{ .Values.service.port }} through Service {{ include "opence-server.fullname" . }} ({{ .Values.service.type }}).
{{- if eq .Values.service.type "ClusterIP" }}
A ClusterIP Service is not reachable from outside the cluster: set service.type to LoadBalancer or
NodePort for internet play.
{{- end }}
{{- if gt (int .Values.web.port) 0 }}
The web page, API and remote console:
kubectl -n {{ .Release.Namespace }} port-forward deploy/{{ include "opence-server.fullname" . }} {{ .Values.web.port }}
open http://127.0.0.1:{{ .Values.web.port }}/
{{- if not .Values.web.existingSecret }}
The admin password:
kubectl -n {{ .Release.Namespace }} get secret {{ include "opence-server.secretName" . }} -o jsonpath='{.data.{{ .Values.web.key }}}' | base64 -d
{{- end }}
{{- end }}
@@ -0,0 +1,84 @@
{{/* The objects' name: fullnameOverride, else the release name if it contains the chart's name,
else <release>-<chart>. */}}
{{- define "opence-server.fullname" -}}
{{- if .Values.fullnameOverride -}}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- if contains $name .Release.Name -}}
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
{{- else -}}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
{{- end -}}
{{- end -}}
{{- end }}
{{- define "opence-server.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
{{- end }}
{{- define "opence-server.labels" -}}
{{ include "opence-server.selectorLabels" . }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
helm.sh/chart: {{ printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- define "opence-server.selectorLabels" -}}
app.kubernetes.io/name: {{ include "opence-server.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}
{{/* repository:tag, repository:tag@digest, or repository@digest; an empty tag is the appVersion. */}}
{{- define "opence-server.image" -}}
{{- $image := .Values.image -}}
{{- $ref := $image.repository -}}
{{- $tag := toString ($image.tag | default .Chart.AppVersion) -}}
{{- if $image.digest }}{{ $tag = regexReplaceAll "@.*$" $tag "" }}{{ if hasPrefix "sha256:" $tag }}{{ $tag = "" }}{{ end }}{{ end -}}
{{- if hasPrefix "sha256:" $tag }}{{ $ref = printf "%s@%s" $ref $tag }}
{{- else if $tag }}{{ $ref = printf "%s:%s" $ref $tag }}{{ end -}}
{{- if and $image.digest (not (contains "@" $ref)) }}{{ $ref = printf "%s@%s" $ref $image.digest }}{{ end -}}
{{- $ref -}}
{{- end }}
{{- define "opence-server.stateClaim" -}}
{{- .Values.persistence.existingClaim | default (printf "%s-state" (include "opence-server.fullname" .)) -}}
{{- end }}
{{/* The chart's Secret: the web passwords it makes or is given, the join password, the publisher
key. */}}
{{- define "opence-server.secretName" -}}
{{- printf "%s-secrets" (include "opence-server.fullname" .) -}}
{{- end }}
{{/* The Secret holding the web password: web.existingSecret, else the chart's. */}}
{{- define "opence-server.webSecret" -}}
{{- .Values.web.existingSecret | default (include "opence-server.secretName" .) -}}
{{- end }}
{{- define "opence-server.hasGameData" -}}
{{- with .Values.gameData -}}
{{- if or .existingClaim (and .nfs.server .nfs.path) .volume }}true{{ end -}}
{{- end -}}
{{- end }}
{{- define "opence-server.hasCustomMaps" -}}
{{- with .Values.customMaps -}}
{{- if or .existingClaim (and .nfs.server .nfs.path) .volume }}true{{ end -}}
{{- end -}}
{{- end }}
{{/* A volume source of gameData or customMaps (the dict), read-only. */}}
{{- define "opence-server.volumeSource" -}}
{{- if .existingClaim }}
persistentVolumeClaim:
claimName: {{ .existingClaim }}
readOnly: true
{{- else if and .nfs.server .nfs.path }}
nfs:
server: {{ .nfs.server }}
path: {{ .nfs.path }}
readOnly: true
{{- else }}
{{- toYaml .volume }}
{{- end }}
{{- end }}
@@ -0,0 +1,198 @@
{{- if not (include "opence-server.hasGameData" .) }}
{{- fail "gameData: set existingClaim, nfs.server and nfs.path, or volume - the server needs the game's maps, which are never in the image" }}
{{- end }}
{{- $fullname := include "opence-server.fullname" . }}
{{- $secret := include "opence-server.secretName" . }}
{{- $webPort := int .Values.web.port }}
{{- $env := list }}
{{- $env = append $env (dict "name" "HALO_SERVER" "value" "1") }}
{{- $env = append $env (dict "name" "HALO_CONFIG_FILE" "value" "/state/config.toml") }}
{{- $env = append $env (dict "name" "HALO_DATA_ROOT" "value" "/data") }}
{{- $env = append $env (dict "name" "HALO_SAVE_ROOT" "value" "/state/saves") }}
{{- $env = append $env (dict "name" "HALO_LOG_ROOT" "value" "/state/logs") }}
{{- if include "opence-server.hasCustomMaps" . }}
{{- $env = append $env (dict "name" "HALO_CUSTOM_MAPS_ROOT" "value" "/custom_maps") }}
{{- end }}
{{- /* (a pod has no standard input to read commands from) */}}
{{- $env = append $env (dict "name" "HALO_SERVER_CONSOLE" "value" "false") }}
{{- $env = append $env (dict "name" "HALO_NET_TUNNEL_PORT" "value" (toString (int .Values.network.tunnelPort))) }}
{{- with .Values.network.publicAddress }}
{{- $env = append $env (dict "name" "HALO_NET_PUBLIC_ADDRESS" "value" .) }}
{{- end }}
{{- with .Values.server.name }}
{{- if gt (len .) 15 }}
{{- fail "server.name: 15 characters at most" }}
{{- end }}
{{- $env = append $env (dict "name" "HALO_SERVER_NAME" "value" .) }}
{{- end }}
{{- with .Values.server.rotation }}
{{- $env = append $env (dict "name" "HALO_SERVER_ROTATION" "value" (join ", " .)) }}
{{- end }}
{{- /* (a value left null is not set, so that config.toml, sv_set and the web page's settings can
change it) */}}
{{- if not (kindIs "invalid" .Values.server.maxPlayers) }}
{{- $env = append $env (dict "name" "HALO_SERVER_MAX_PLAYERS" "value" (toString (int .Values.server.maxPlayers))) }}
{{- end }}
{{- if not (kindIs "invalid" .Values.server.public) }}
{{- $env = append $env (dict "name" "HALO_SERVER_PUBLIC" "value" (toString .Values.server.public)) }}
{{- end }}
{{- if not (kindIs "invalid" .Values.server.lobbySeconds) }}
{{- $env = append $env (dict "name" "HALO_SERVER_LOBBY_SECONDS" "value" (toString (int .Values.server.lobbySeconds))) }}
{{- end }}
{{- with .Values.server.motd }}
{{- $env = append $env (dict "name" "HALO_SERVER_MOTD" "value" .) }}
{{- end }}
{{- with .Values.server.logFormat }}
{{- $env = append $env (dict "name" "HALO_SERVER_LOG_FORMAT" "value" .) }}
{{- end }}
{{- with .Values.server.instance }}
{{- $env = append $env (dict "name" "HALO_SERVER_INSTANCE" "value" .) }}
{{- end }}
{{- with .Values.server.region }}
{{- $env = append $env (dict "name" "HALO_SERVER_REGION" "value" .) }}
{{- end }}
{{- if not (kindIs "invalid" .Values.server.masterPublish) }}
{{- $env = append $env (dict "name" "HALO_SERVER_MASTER_PUBLISH" "value" (toString .Values.server.masterPublish)) }}
{{- end }}
{{- if .Values.server.password.existingSecret }}
{{- $env = append $env (dict "name" "HALO_SERVER_PASSWORD" "valueFrom" (dict "secretKeyRef" (dict "name" .Values.server.password.existingSecret "key" .Values.server.password.key))) }}
{{- else if .Values.server.password.value }}
{{- $env = append $env (dict "name" "HALO_SERVER_PASSWORD" "valueFrom" (dict "secretKeyRef" (dict "name" $secret "key" .Values.server.password.key))) }}
{{- end }}
{{- if .Values.publisherKey.existingSecret }}
{{- $env = append $env (dict "name" "HALO_SERVER_PUBLISHER_KEY" "valueFrom" (dict "secretKeyRef" (dict "name" .Values.publisherKey.existingSecret "key" .Values.publisherKey.key))) }}
{{- else if .Values.publisherKey.value }}
{{- $env = append $env (dict "name" "HALO_SERVER_PUBLISHER_KEY" "valueFrom" (dict "secretKeyRef" (dict "name" $secret "key" .Values.publisherKey.key))) }}
{{- end }}
{{- $env = append $env (dict "name" "HALO_SERVER_WEB_PORT" "value" (toString $webPort)) }}
{{- if gt $webPort 0 }}
{{- /* (the kubelet's probes reach the pod's own address, not its loopback) */}}
{{- $env = append $env (dict "name" "HALO_SERVER_WEB_BIND" "value" "0.0.0.0") }}
{{- $env = append $env (dict "name" "HALO_SERVER_WEB_PASSWORD" "valueFrom" (dict "secretKeyRef" (dict "name" (include "opence-server.webSecret" .) "key" .Values.web.key))) }}
{{- if .Values.web.existingSecret }}
{{- $env = append $env (dict "name" "HALO_SERVER_WEB_MODERATOR_PASSWORD" "valueFrom" (dict "secretKeyRef" (dict "name" .Values.web.existingSecret "key" .Values.web.moderatorKey "optional" true))) }}
{{- else if .Values.web.moderatorPassword }}
{{- $env = append $env (dict "name" "HALO_SERVER_WEB_MODERATOR_PASSWORD" "valueFrom" (dict "secretKeyRef" (dict "name" $secret "key" .Values.web.moderatorKey))) }}
{{- end }}
{{- end }}
{{- $probe := dict "httpGet" (dict "path" "/healthz" "port" "web") }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ $fullname }}
labels:
{{- include "opence-server.labels" . | nindent 4 }}
spec:
# One server owns the tunnel port and the address players reach it at.
replicas: 1
strategy:
{{- toYaml .Values.strategy | nindent 4 }}
selector:
matchLabels:
{{- include "opence-server.selectorLabels" . | nindent 6 }}
template:
metadata:
labels:
{{- include "opence-server.selectorLabels" . | nindent 8 }}
{{- with .Values.podLabels }}
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
# The server never calls the Kubernetes API.
automountServiceAccountToken: false
enableServiceLinks: false
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.priorityClassName }}
priorityClassName: {{ . }}
{{- end }}
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: opence-server
image: {{ include "opence-server.image" . | quote }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
{{- toYaml $env | nindent 12 }}
{{- with .Values.extraEnv }}
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: tunnel
containerPort: {{ .Values.network.tunnelPort }}
protocol: UDP
{{- if gt $webPort 0 }}
- name: web
containerPort: {{ $webPort }}
protocol: TCP
{{- end }}
{{- if gt $webPort 0 }}
{{- range $name := list "startup" "readiness" "liveness" }}
{{- $p := index $.Values.probes $name }}
{{- if $p.enabled }}
{{ $name }}Probe:
{{- toYaml (merge (omit $p "enabled") $probe) | nindent 12 }}
{{- end }}
{{- end }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
volumeMounts:
- name: game-data
mountPath: /data
readOnly: true
{{- with .Values.gameData.subPath }}
subPath: {{ . }}
{{- end }}
# config.toml, publisher.key, the save root and its map cache, the logs
- name: state
mountPath: /state
{{- if include "opence-server.hasCustomMaps" . }}
- name: custom-maps
mountPath: /custom_maps
readOnly: true
{{- with .Values.customMaps.subPath }}
subPath: {{ . }}
{{- end }}
{{- end }}
- name: tmp
mountPath: /tmp
volumes:
- name: game-data
{{- include "opence-server.volumeSource" .Values.gameData | trim | nindent 10 }}
- name: state
{{- if .Values.persistence.enabled }}
persistentVolumeClaim:
claimName: {{ include "opence-server.stateClaim" . }}
{{- else }}
emptyDir:
sizeLimit: {{ .Values.persistence.emptyDirSizeLimit }}
{{- end }}
- name: tmp
emptyDir:
sizeLimit: 64Mi
{{- if include "opence-server.hasCustomMaps" . }}
- name: custom-maps
{{- include "opence-server.volumeSource" .Values.customMaps | trim | nindent 10 }}
{{- end }}
@@ -0,0 +1,4 @@
{{- range .Values.extraObjects }}
---
{{ tpl (toYaml .) $ }}
{{- end }}
@@ -0,0 +1,66 @@
{{- if .Values.networkPolicy.enabled }}
{{- $np := .Values.networkPolicy }}
# In: the players' UDP on the tunnel port, and the web port from webFrom alone. Out: DNS, TCP to
# the MQTT brokers and the master servers, UDP to the internet (STUN, the players' ports); nothing
# on the private ranges.
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: {{ include "opence-server.fullname" . }}
labels:
{{- include "opence-server.labels" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "opence-server.selectorLabels" . | nindent 6 }}
policyTypes:
- Ingress
- Egress
ingress:
- ports:
- protocol: UDP
port: {{ .Values.network.tunnelPort }}
{{- with $np.from }}
from:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if and $np.webFrom (gt (int .Values.web.port) 0) }}
- ports:
- protocol: TCP
port: {{ .Values.web.port }}
from:
{{- toYaml $np.webFrom | nindent 8 }}
{{- end }}
{{- with $np.extraIngress }}
{{- toYaml . | nindent 4 }}
{{- end }}
egress:
- to:
{{- toYaml $np.dns.to | nindent 8 }}
ports:
- protocol: UDP
port: 53
- protocol: TCP
port: 53
{{- if or $np.internet.tcpPorts $np.internet.udp }}
- to:
- ipBlock:
cidr: {{ $np.internet.cidr }}
{{- with $np.internet.except }}
except:
{{- toYaml . | nindent 14 }}
{{- end }}
ports:
{{- range $np.internet.tcpPorts }}
- protocol: TCP
port: {{ . }}
{{- end }}
{{- if $np.internet.udp }}
# every UDP port: STUN (19302, 3478) and the players' own
- protocol: UDP
{{- end }}
{{- end }}
{{- with $np.extraEgress }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
@@ -0,0 +1,44 @@
{{- $data := dict }}
{{- if and (gt (int .Values.web.port) 0) (not .Values.web.existingSecret) }}
{{- $password := .Values.web.password }}
{{- if $password }}
{{- if lt (len $password) 8 }}
{{- fail "web.password: 8 characters or more (the server refuses a shorter one beyond loopback)" }}
{{- end }}
{{- else }}
{{- /* made once, then kept from the Secret the release already has */}}
{{- $existing := lookup "v1" "Secret" .Release.Namespace (include "opence-server.secretName" .) }}
{{- if and $existing $existing.data (hasKey $existing.data .Values.web.key) }}
{{- $password = index $existing.data .Values.web.key | b64dec }}
{{- else }}
{{- $password = randAlphaNum 24 }}
{{- end }}
{{- end }}
{{- $_ := set $data .Values.web.key ($password | b64enc) }}
{{- with .Values.web.moderatorPassword }}
{{- if lt (len .) 8 }}
{{- fail "web.moderatorPassword: 8 characters or more" }}
{{- end }}
{{- $_ := set $data $.Values.web.moderatorKey (. | b64enc) }}
{{- end }}
{{- end }}
{{- if and .Values.server.password.value (not .Values.server.password.existingSecret) }}
{{- $_ := set $data .Values.server.password.key (.Values.server.password.value | b64enc) }}
{{- end }}
{{- if and .Values.publisherKey.value (not .Values.publisherKey.existingSecret) }}
{{- if not (regexMatch "^[0-9a-f]{64}$" .Values.publisherKey.value) }}
{{- fail "publisherKey.value: the 64 lower-case hex characters of the seed (halo --server --keygen)" }}
{{- end }}
{{- $_ := set $data .Values.publisherKey.key (.Values.publisherKey.value | b64enc) }}
{{- end }}
{{- if $data }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "opence-server.secretName" . }}
labels:
{{- include "opence-server.labels" . | nindent 4 }}
type: Opaque
data:
{{- toYaml $data | nindent 2 }}
{{- end }}
@@ -0,0 +1,23 @@
{{- if and .Values.web.service.enabled (gt (int .Values.web.port) 0) }}
# The web page, its API and the remote console, inside the cluster only: for an Ingress with TLS,
# or kubectl port-forward.
apiVersion: v1
kind: Service
metadata:
name: {{ include "opence-server.fullname" . }}-web
labels:
{{- include "opence-server.labels" . | nindent 4 }}
{{- with .Values.web.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: ClusterIP
selector:
{{- include "opence-server.selectorLabels" . | nindent 4 }}
ports:
- name: web
port: {{ .Values.web.service.port }}
targetPort: web
protocol: TCP
{{- end }}
@@ -0,0 +1,40 @@
# The tunnel port, UDP: the one port players need.
apiVersion: v1
kind: Service
metadata:
name: {{ include "opence-server.fullname" . }}
labels:
{{- include "opence-server.labels" . | nindent 4 }}
{{- with .Values.service.labels }}
{{- toYaml . | nindent 4 }}
{{- end }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: {{ .Values.service.type }}
{{- if ne .Values.service.type "ClusterIP" }}
{{- with .Values.service.externalTrafficPolicy }}
externalTrafficPolicy: {{ . }}
{{- end }}
{{- end }}
{{- if eq .Values.service.type "LoadBalancer" }}
{{- with .Values.service.loadBalancerClass }}
loadBalancerClass: {{ . }}
{{- end }}
{{- with .Values.service.loadBalancerSourceRanges }}
loadBalancerSourceRanges:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
selector:
{{- include "opence-server.selectorLabels" . | nindent 4 }}
ports:
- name: tunnel
port: {{ .Values.service.port }}
targetPort: tunnel
protocol: UDP
{{- if and (ne .Values.service.type "ClusterIP") .Values.service.nodePort }}
nodePort: {{ .Values.service.nodePort }}
{{- end }}
@@ -0,0 +1,21 @@
{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: {{ include "opence-server.stateClaim" . }}
labels:
{{- include "opence-server.labels" . | nindent 4 }}
{{- with .Values.persistence.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
accessModes:
{{- toYaml .Values.persistence.accessModes | nindent 4 }}
{{- with .Values.persistence.storageClass }}
storageClassName: {{ . }}
{{- end }}
resources:
requests:
storage: {{ .Values.persistence.size }}
{{- end }}
@@ -0,0 +1,221 @@
suite: deployment
templates:
- templates/deployment.yaml
set:
gameData.existingClaim: halo-maps
tests:
- it: refuses to render without game data, which is never in the image
set:
gameData.existingClaim: ""
asserts:
- failedTemplate:
errorPattern: "gameData: set existingClaim"
- it: mounts an existing claim read-only at /data
asserts:
- equal:
path: 'spec.template.spec.volumes[0]'
value: { name: game-data, persistentVolumeClaim: { claimName: halo-maps, readOnly: true } }
- contains:
path: 'spec.template.spec.containers[0].volumeMounts'
content: { name: game-data, mountPath: /data, readOnly: true }
- it: mounts an NFS export read-only, with a subPath
set:
gameData: { existingClaim: "", nfs: { server: nfs.example.com, path: /halo }, subPath: xbox }
asserts:
- equal:
path: 'spec.template.spec.volumes[0]'
value: { name: game-data, nfs: { server: nfs.example.com, path: /halo, readOnly: true } }
- contains:
path: 'spec.template.spec.containers[0].volumeMounts'
content: { name: game-data, mountPath: /data, readOnly: true, subPath: xbox }
- it: takes any other volume source
set:
gameData: { existingClaim: "", volume: { emptyDir: {} } }
asserts:
- equal:
path: 'spec.template.spec.volumes[0]'
value: { name: game-data, emptyDir: {} }
- it: runs one replica, replaced not rolled, hardened
asserts:
- equal: { path: spec.replicas, value: 1 }
- equal: { path: spec.strategy.type, value: Recreate }
- equal: { path: spec.template.spec.automountServiceAccountToken, value: false }
- equal: { path: spec.template.spec.securityContext.runAsNonRoot, value: true }
- equal: { path: spec.template.spec.securityContext.runAsUser, value: 10001 }
- equal: { path: spec.template.spec.securityContext.seccompProfile.type, value: RuntimeDefault }
- equal: { path: 'spec.template.spec.containers[0].securityContext.readOnlyRootFilesystem', value: true }
- equal: { path: 'spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation', value: false }
- equal: { path: 'spec.template.spec.containers[0].securityContext.capabilities.drop', value: [ALL] }
- equal: { path: spec.template.spec.nodeSelector, value: { kubernetes.io/os: linux, kubernetes.io/arch: amd64 } }
- equal: { path: spec.template.spec.terminationGracePeriodSeconds, value: 15 }
- exists: { path: 'spec.template.spec.containers[0].resources.limits.memory' }
- it: sets the server's paths and mode
asserts:
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER, value: "1" } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_CONFIG_FILE, value: /state/config.toml } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_DATA_ROOT, value: /data } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SAVE_ROOT, value: /state/saves } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_LOG_ROOT, value: /state/logs } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_CONSOLE, value: "false" } }
- it: maps the values to the HALO_ variables
set:
server:
name: Test server
rotation: [bloodgulch:ctf, "sidewinder:team_slayer+score=50"]
maxPlayers: 24
public: false
lobbySeconds: 30
motd: Hello
logFormat: json
instance: eu-1
region: eu
masterPublish: false
network: { tunnelPort: 2303, publicAddress: "halo.example.com:2303" }
asserts:
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_NAME, value: Test server } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_ROTATION, value: "bloodgulch:ctf, sidewinder:team_slayer+score=50" } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_MAX_PLAYERS, value: "24" } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_PUBLIC, value: "false" } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_LOBBY_SECONDS, value: "30" } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_MOTD, value: Hello } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_LOG_FORMAT, value: json } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_INSTANCE, value: eu-1 } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_REGION, value: eu } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_MASTER_PUBLISH, value: "false" } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_NET_TUNNEL_PORT, value: "2303" } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_NET_PUBLIC_ADDRESS, value: "halo.example.com:2303" } }
- equal: { path: 'spec.template.spec.containers[0].ports[0]', value: { name: tunnel, containerPort: 2303, protocol: UDP } }
- it: leaves empty values to config.toml
asserts:
- notContains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_NAME, value: "" } }
- notContains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_MOTD, value: "" } }
- notContains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_NET_PUBLIC_ADDRESS, value: "" } }
- it: leaves the settings the values do not give to config.toml, sv_set and the web page
asserts:
- notExists: { path: 'spec.template.spec.containers[0].env[?(@.name == "HALO_SERVER_ROTATION")]' }
- notExists: { path: 'spec.template.spec.containers[0].env[?(@.name == "HALO_SERVER_MAX_PLAYERS")]' }
- notExists: { path: 'spec.template.spec.containers[0].env[?(@.name == "HALO_SERVER_PUBLIC")]' }
- notExists: { path: 'spec.template.spec.containers[0].env[?(@.name == "HALO_SERVER_LOBBY_SECONDS")]' }
- notExists: { path: 'spec.template.spec.containers[0].env[?(@.name == "HALO_SERVER_LOG_FORMAT")]' }
- notExists: { path: 'spec.template.spec.containers[0].env[?(@.name == "HALO_SERVER_MASTER_PUBLISH")]' }
- it: sets a false or zero value that is given
set:
server: { public: false, masterPublish: false, lobbySeconds: 0 }
asserts:
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_PUBLIC, value: "false" } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_MASTER_PUBLISH, value: "false" } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_LOBBY_SECONDS, value: "0" } }
- it: refuses a name longer than the game's 15 characters (the values' schema, or the template)
set:
server.name: "A name too long!"
asserts:
- failedTemplate:
errorPattern: "server.name|/server/name|15 characters"
- it: takes the web password from the chart's Secret, bound beyond loopback for the probes
release: { name: opence-server }
asserts:
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_WEB_PORT, value: "8080" } }
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_WEB_BIND, value: 0.0.0.0 } }
- contains:
path: 'spec.template.spec.containers[0].env'
content: { name: HALO_SERVER_WEB_PASSWORD, valueFrom: { secretKeyRef: { name: opence-server-secrets, key: web-password } } }
- contains: { path: 'spec.template.spec.containers[0].ports', content: { name: web, containerPort: 8080, protocol: TCP } }
- it: takes the passwords and the publisher key from existing Secrets
set:
web: { existingSecret: halo-web, key: admin, moderatorKey: moderator }
server.password: { existingSecret: halo-join, key: password }
publisherKey: { existingSecret: halo-publisher, key: seed }
asserts:
- contains:
path: 'spec.template.spec.containers[0].env'
content: { name: HALO_SERVER_WEB_PASSWORD, valueFrom: { secretKeyRef: { name: halo-web, key: admin } } }
- contains:
path: 'spec.template.spec.containers[0].env'
content: { name: HALO_SERVER_WEB_MODERATOR_PASSWORD, valueFrom: { secretKeyRef: { name: halo-web, key: moderator, optional: true } } }
- contains:
path: 'spec.template.spec.containers[0].env'
content: { name: HALO_SERVER_PASSWORD, valueFrom: { secretKeyRef: { name: halo-join, key: password } } }
- contains:
path: 'spec.template.spec.containers[0].env'
content: { name: HALO_SERVER_PUBLISHER_KEY, valueFrom: { secretKeyRef: { name: halo-publisher, key: seed } } }
- it: probes GET /healthz on the web port
asserts:
- equal: { path: 'spec.template.spec.containers[0].startupProbe.httpGet', value: { path: /healthz, port: web } }
- equal: { path: 'spec.template.spec.containers[0].readinessProbe.httpGet', value: { path: /healthz, port: web } }
- equal: { path: 'spec.template.spec.containers[0].livenessProbe.httpGet', value: { path: /healthz, port: web } }
- equal: { path: 'spec.template.spec.containers[0].startupProbe.failureThreshold', value: 60 }
- it: drops a probe that is turned off
set:
probes.liveness.enabled: false
asserts:
- notExists: { path: 'spec.template.spec.containers[0].livenessProbe' }
- exists: { path: 'spec.template.spec.containers[0].readinessProbe' }
- it: has no web port, password or probes with web.port 0
set:
web.port: 0
asserts:
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_WEB_PORT, value: "0" } }
- notContains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_SERVER_WEB_BIND, value: 0.0.0.0 } }
- lengthEqual: { path: 'spec.template.spec.containers[0].ports', count: 1 }
- notExists: { path: 'spec.template.spec.containers[0].startupProbe' }
- notExists: { path: 'spec.template.spec.containers[0].livenessProbe' }
- it: puts extraEnv after the chart's variables, so it can override them
set:
extraEnv: [{ name: HALO_SERVER_LOBBY_SECONDS, value: "5" }]
asserts:
- equal:
path: 'spec.template.spec.containers[0].env[-1:]'
value: { name: HALO_SERVER_LOBBY_SECONDS, value: "5" }
- it: keeps the state in an emptyDir without persistence
asserts:
- contains: { path: spec.template.spec.volumes, content: { name: state, emptyDir: { sizeLimit: 1Gi } } }
- lengthEqual: { path: spec.template.spec.volumes, count: 3 }
- it: uses the claim with persistence
release: { name: opence-server }
set:
persistence.enabled: true
asserts:
- contains: { path: spec.template.spec.volumes, content: { name: state, persistentVolumeClaim: { claimName: opence-server-state } } }
- it: mounts a custom_maps claim read-only, with its variable
set:
customMaps: { existingClaim: halo-custom-maps, subPath: ce }
asserts:
- contains: { path: 'spec.template.spec.containers[0].env', content: { name: HALO_CUSTOM_MAPS_ROOT, value: /custom_maps } }
- contains:
path: spec.template.spec.volumes
content: { name: custom-maps, persistentVolumeClaim: { claimName: halo-custom-maps, readOnly: true } }
- contains:
path: 'spec.template.spec.containers[0].volumeMounts'
content: { name: custom-maps, mountPath: /custom_maps, readOnly: true, subPath: ce }
- it: takes a tag with a digest, and lets digest replace it
set:
image.tag: build-206@sha256:1111111111111111111111111111111111111111111111111111111111111111
image.digest: sha256:2222222222222222222222222222222222222222222222222222222222222222
asserts:
- equal:
path: 'spec.template.spec.containers[0].image'
value: ghcr.io/opencommunityedition/opence-server:build-206@sha256:2222222222222222222222222222222222222222222222222222222222222222
- it: uses the appVersion as the default tag
asserts:
- equal: { path: 'spec.template.spec.containers[0].image', value: "ghcr.io/opencommunityedition/opence-server:latest" }
@@ -0,0 +1,39 @@
suite: network policy
templates:
- templates/networkpolicy.yaml
tests:
- it: lets anyone reach the tunnel port, and nothing else in
asserts:
- equal: { path: spec.policyTypes, value: [Ingress, Egress] }
- equal: { path: spec.ingress, value: [{ ports: [{ protocol: UDP, port: 2302 }] }] }
- it: allows DNS, TCP 1883 and 443 and all UDP to public addresses only
asserts:
- equal: { path: 'spec.egress[0].ports', value: [{ protocol: UDP, port: 53 }, { protocol: TCP, port: 53 }] }
- equal: { path: 'spec.egress[1].to[0].ipBlock.cidr', value: 0.0.0.0/0 }
- contains: { path: 'spec.egress[1].to[0].ipBlock.except', content: 10.0.0.0/8 }
- contains: { path: 'spec.egress[1].to[0].ipBlock.except', content: 192.168.0.0/16 }
- equal: { path: 'spec.egress[1].ports', value: [{ protocol: TCP, port: 1883 }, { protocol: TCP, port: 443 }, { protocol: UDP }] }
- it: lets webFrom reach the web port
set:
networkPolicy.webFrom: [{ namespaceSelector: { matchLabels: { kubernetes.io/metadata.name: ingress-nginx } } }]
asserts:
- equal:
path: 'spec.ingress[1]'
value: { ports: [{ protocol: TCP, port: 8080 }], from: [{ namespaceSelector: { matchLabels: { kubernetes.io/metadata.name: ingress-nginx } } }] }
- it: narrows the players' sources and follows the tunnel port
set:
network.tunnelPort: 2303
networkPolicy.from: [{ ipBlock: { cidr: 198.51.100.0/24 } }]
asserts:
- equal:
path: spec.ingress
value: [{ ports: [{ protocol: UDP, port: 2303 }], from: [{ ipBlock: { cidr: 198.51.100.0/24 } }] }]
- it: renders nothing when off
set:
networkPolicy.enabled: false
asserts:
- hasDocuments: { count: 0 }
@@ -0,0 +1,21 @@
suite: persistence
templates:
- templates/state-pvc.yaml
release:
name: opence-server
tests:
- it: makes no claim without persistence
asserts:
- hasDocuments: { count: 0 }
- it: makes the state claim with persistence
set:
persistence: { enabled: true, size: 3Gi, storageClass: fast }
asserts:
- equal: { path: metadata.name, value: opence-server-state }
- equal: { path: spec.resources.requests.storage, value: 3Gi }
- equal: { path: spec.storageClassName, value: fast }
- it: makes none for an existing claim
set:
persistence: { enabled: true, existingClaim: mine }
asserts:
- hasDocuments: { count: 0 }
@@ -0,0 +1,48 @@
suite: secret
templates:
- templates/secret.yaml
release:
name: opence-server
tests:
- it: makes a web password when none is given
asserts:
- hasDocuments: { count: 1 }
- isKind: { of: Secret }
- equal: { path: metadata.name, value: opence-server-secrets }
- matchRegex: { path: data.web-password, pattern: "^[A-Za-z0-9+/]{32}$" }
- it: keeps a given web password, join password and publisher key
set:
web.password: correct-horse
server.password.value: letmein
publisherKey.value: "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
asserts:
- equal: { path: data.web-password, value: Y29ycmVjdC1ob3JzZQ== }
- equal: { path: data.password, value: bGV0bWVpbg== }
- exists: { path: data.publisher-key }
- it: refuses a short web password
set:
web.password: short
asserts:
- failedTemplate:
errorPattern: "8 characters or more"
- it: refuses a publisher key that is not 64 hex characters
set:
publisherKey.value: not-a-key
asserts:
- failedTemplate:
errorPattern: "64 lower-case hex"
- it: makes none when every secret comes from elsewhere
set:
web.existingSecret: halo-web
asserts:
- hasDocuments: { count: 0 }
- it: makes none without a web port or secrets
set:
web.port: 0
asserts:
- hasDocuments: { count: 0 }
@@ -0,0 +1,43 @@
suite: service
templates:
- templates/service.yaml
- templates/service-web.yaml
release:
name: opence-server
tests:
- it: exposes the tunnel port over UDP on a load balancer that keeps the players' addresses
template: templates/service.yaml
asserts:
- equal: { path: metadata.name, value: opence-server }
- equal: { path: spec.type, value: LoadBalancer }
- equal: { path: spec.externalTrafficPolicy, value: Local }
- equal: { path: 'spec.ports[0]', value: { name: tunnel, port: 2302, targetPort: tunnel, protocol: UDP } }
- it: ignores externalTrafficPolicy and nodePort on a ClusterIP Service
template: templates/service.yaml
set:
service: { type: ClusterIP, nodePort: 30702 }
asserts:
- notExists: { path: spec.externalTrafficPolicy }
- notExists: { path: 'spec.ports[0].nodePort' }
- it: sets a fixed node port
template: templates/service.yaml
set:
service: { type: NodePort, nodePort: 30702 }
asserts:
- equal: { path: 'spec.ports[0].nodePort', value: 30702 }
- it: keeps the web port inside the cluster
template: templates/service-web.yaml
asserts:
- equal: { path: metadata.name, value: opence-server-web }
- equal: { path: spec.type, value: ClusterIP }
- equal: { path: 'spec.ports[0]', value: { name: web, port: 8080, targetPort: web, protocol: TCP } }
- it: has no web Service without a web port
template: templates/service-web.yaml
set:
web.port: 0
asserts:
- hasDocuments: { count: 0 }
@@ -0,0 +1,445 @@
{
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "opence-server values",
"description": "Strict where the chart defines the structure; free-form where values pass through to Kubernetes. values.yaml describes each value.",
"type": "object",
"additionalProperties": false,
"definitions": {
"port": {
"type": "integer",
"minimum": 1,
"maximum": 65535
},
"volume": {
"type": "object",
"additionalProperties": false,
"properties": {
"existingClaim": {
"type": "string"
},
"nfs": {
"type": "object",
"additionalProperties": false,
"properties": {
"server": {
"type": "string"
},
"path": {
"type": "string"
}
}
},
"volume": {
"type": "object"
},
"subPath": {
"type": "string"
}
}
},
"secretValue": {
"type": "object",
"additionalProperties": false,
"properties": {
"value": {
"type": "string"
},
"existingSecret": {
"type": "string"
},
"key": {
"type": "string",
"minLength": 1
}
}
},
"probe": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"initialDelaySeconds": {
"type": "integer",
"minimum": 0
},
"periodSeconds": {
"type": "integer",
"minimum": 1
},
"timeoutSeconds": {
"type": "integer",
"minimum": 1
},
"failureThreshold": {
"type": "integer",
"minimum": 1
},
"successThreshold": {
"type": "integer",
"minimum": 1
},
"terminationGracePeriodSeconds": {
"type": "integer",
"minimum": 1
}
}
}
},
"properties": {
"global": {
"type": "object"
},
"nameOverride": {
"type": "string"
},
"fullnameOverride": {
"type": "string"
},
"image": {
"type": "object",
"additionalProperties": false,
"required": [
"repository"
],
"properties": {
"repository": {
"type": "string",
"minLength": 1
},
"tag": {
"type": [
"string",
"number"
]
},
"digest": {
"type": "string",
"pattern": "^(sha256:[0-9a-f]{64})?$"
},
"pullPolicy": {
"enum": [
"Always",
"IfNotPresent",
"Never"
]
}
}
},
"imagePullSecrets": {
"type": "array"
},
"gameData": {
"$ref": "#/definitions/volume"
},
"customMaps": {
"$ref": "#/definitions/volume"
},
"server": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string",
"maxLength": 15,
"pattern": "^[ -~]*$"
},
"rotation": {
"type": "array",
"maxItems": 64,
"items": {
"type": "string",
"minLength": 1
}
},
"maxPlayers": {
"type": [
"integer",
"null"
],
"minimum": 2,
"maximum": 127
},
"public": {
"type": [
"boolean",
"null"
]
},
"lobbySeconds": {
"type": [
"integer",
"null"
],
"minimum": 0,
"maximum": 300
},
"motd": {
"type": "string",
"maxLength": 127
},
"logFormat": {
"enum": [
"",
"text",
"json",
null
]
},
"instance": {
"type": "string",
"pattern": "^[A-Za-z0-9_-]{0,32}$"
},
"region": {
"type": "string",
"maxLength": 16
},
"masterPublish": {
"type": [
"boolean",
"null"
]
},
"password": {
"$ref": "#/definitions/secretValue"
}
}
},
"publisherKey": {
"$ref": "#/definitions/secretValue"
},
"web": {
"type": "object",
"additionalProperties": false,
"properties": {
"port": {
"type": "integer",
"minimum": 0,
"maximum": 65535
},
"password": {
"type": "string"
},
"existingSecret": {
"type": "string"
},
"key": {
"type": "string",
"minLength": 1
},
"moderatorPassword": {
"type": "string"
},
"moderatorKey": {
"type": "string",
"minLength": 1
},
"service": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"port": {
"$ref": "#/definitions/port"
},
"annotations": {
"type": "object"
}
}
}
}
},
"network": {
"type": "object",
"additionalProperties": false,
"properties": {
"tunnelPort": {
"$ref": "#/definitions/port"
},
"publicAddress": {
"type": "string"
}
}
},
"extraEnv": {
"type": "array"
},
"persistence": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"existingClaim": {
"type": "string"
},
"size": {
"type": "string"
},
"storageClass": {
"type": "string"
},
"accessModes": {
"type": "array",
"items": {
"type": "string"
}
},
"annotations": {
"type": "object"
},
"emptyDirSizeLimit": {
"type": "string"
}
}
},
"service": {
"type": "object",
"additionalProperties": false,
"properties": {
"type": {
"enum": [
"ClusterIP",
"NodePort",
"LoadBalancer"
]
},
"port": {
"$ref": "#/definitions/port"
},
"nodePort": {
"type": [
"string",
"integer"
]
},
"annotations": {
"type": "object"
},
"labels": {
"type": "object"
},
"externalTrafficPolicy": {
"enum": [
"",
"Cluster",
"Local"
]
},
"loadBalancerClass": {
"type": "string"
},
"loadBalancerSourceRanges": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"strategy": {
"type": "object"
},
"resources": {
"type": "object"
},
"nodeSelector": {
"type": "object"
},
"affinity": {
"type": "object"
},
"tolerations": {
"type": "array"
},
"priorityClassName": {
"type": "string"
},
"podAnnotations": {
"type": "object"
},
"podLabels": {
"type": "object"
},
"terminationGracePeriodSeconds": {
"type": "integer",
"minimum": 1
},
"podSecurityContext": {
"type": "object"
},
"securityContext": {
"type": "object"
},
"probes": {
"type": "object",
"additionalProperties": false,
"properties": {
"startup": {
"$ref": "#/definitions/probe"
},
"readiness": {
"$ref": "#/definitions/probe"
},
"liveness": {
"$ref": "#/definitions/probe"
}
}
},
"networkPolicy": {
"type": "object",
"additionalProperties": false,
"properties": {
"enabled": {
"type": "boolean"
},
"from": {
"type": "array"
},
"webFrom": {
"type": "array"
},
"dns": {
"type": "object"
},
"internet": {
"type": "object",
"additionalProperties": false,
"properties": {
"cidr": {
"type": "string"
},
"except": {
"type": "array",
"items": {
"type": "string"
}
},
"tcpPorts": {
"type": "array",
"items": {
"$ref": "#/definitions/port"
}
},
"udp": {
"type": "boolean"
}
}
},
"extraIngress": {
"type": "array"
},
"extraEgress": {
"type": "array"
}
}
},
"extraObjects": {
"type": "array"
}
}
}
+239
View File
@@ -0,0 +1,239 @@
# opence-server: the OpenCE dedicated server (docs/dedicated_server.md). One replica: the server
# owns its tunnel port and the address players reach it at.
nameOverride: ""
fullnameOverride: ""
image:
repository: ghcr.io/opencommunityedition/opence-server
# Empty: the chart's appVersion (latest). A release's tag (build-206) or sha-<commit> pins it;
# <tag>@sha256:... as Argo CD Image Updater writes it works too.
tag: ""
# sha256:... ; replaces any digest in tag.
digest: ""
pullPolicy: IfNotPresent
imagePullSecrets: []
# The game data: the folder that holds maps/ (and custom_maps/, gametypes/ and init.txt if you have
# them), from your own copy of the game. It is never in the image. Mounted read-only at /data
# (HALO_DATA_ROOT). One source is required.
gameData:
# An existing PersistentVolumeClaim.
existingClaim: ""
# Or an NFS export.
nfs:
server: ""
path: ""
# Or any other volume source, as in a pod's volumes (without the name), e.g.
# {hostPath: {path: /srv/halo, type: Directory}}. Without maps/ui.map and the rotation's maps the
# server exits with code 2 and says which maps it looked for, and the pod goes into
# CrashLoopBackOff.
volume: {}
# The folder within the volume that holds maps/. Empty: the volume's root.
subPath: ""
# A custom_maps folder of its own (Custom Edition maps with bitmaps.map, sounds.map and loc.map),
# mounted read-only at /custom_maps (HALO_CUSTOM_MAPS_ROOT). Optional: without one the server uses
# gameData's custom_maps/.
customMaps:
existingClaim: ""
nfs:
server: ""
path: ""
volume: {}
subPath: ""
# The server's settings, as its HALO_* environment variables (docs/dedicated_server.md and
# port/linux/README.md, "Dedicated server"). A value given here wins over config.toml, and sv_set
# and the web page's settings cannot change it. Each is unset by default (empty, or null): the
# setting is then config.toml's, or the server's default (named below), and can be changed from
# the web page.
server:
# server.name: 15 characters of printable ASCII (default "OpenCE Server").
name: ""
# server.rotation: map[:gametype[+rule=value...]] entries, played in turn, e.g.
# [bloodgulch:ctf, sidewinder:team_slayer, prisoner:slayer] (the default).
rotation: []
# server.max_players: 2 to 127 (default 16).
maxPlayers: null
# server.public: list the server in everyone's server browser (default true).
public: null
# server.lobby_seconds (default 15).
lobbySeconds: null
# server.motd: a notice each player is shown on joining.
motd: ""
# server.log_format: text or json (default text).
logFormat: ""
# server.instance and server.region, as the master servers list them.
instance: ""
region: ""
# server.master_publish: publish the server to the official master servers (needs a publisher
# key, below; default true).
masterPublish: null
# server.password: the password the server browser asks for. value, or a key of an existing
# Secret; empty for none.
password:
value: ""
existingSecret: ""
key: password
# The master servers' publisher key (HALO_SERVER_PUBLISHER_KEY): the 64 hex characters of the seed
# halo --server --keygen writes. value, or a key of an existing Secret; empty: the state volume's
# publisher.key, if there is one.
publisherKey:
value: ""
existingSecret: ""
key: publisher-key
# The web page, its API and the remote console (server.web_port), on which the probes ask
# GET /healthz. 0 turns them off, and the probes with them.
web:
port: 8080
# The admin password (server.web_password, 8 characters or more), from existingSecret's key, else
# from password, else made at the first install and kept in the chart's Secret. The made one is
# found again with lookup on upgrades, which helm template and GitOps tools (Argo CD, Flux's
# dry runs) cannot do: they make a new one at each render. Give password or existingSecret
# there (README.md, "Web password").
password: ""
existingSecret: ""
key: web-password
# server.web_moderator_password, from the same Secret's moderatorKey when it has one.
moderatorPassword: ""
moderatorKey: web-moderator-password
# A ClusterIP Service for the web port, for an Ingress (with TLS) or kubectl port-forward.
service:
enabled: true
port: 8080
annotations: {}
network:
# network.tunnel_port: the UDP port of internet play, which the Service exposes.
tunnelPort: 2302
# network.public_address: host[:port] players reach the tunnel port at, when the cluster is behind
# a NAT that STUN cannot see through. Empty: what STUN finds.
publicAddress: ""
# More environment variables, as in a pod spec ({name, value} or {name, valueFrom}); they come after
# the chart's, so the same name overrides it.
extraEnv: []
# /state: config.toml (HALO_CONFIG_FILE), publisher.key, the save root with its map cache (about
# 115 MB for the multiplayer maps), the logs. Without persistence an emptyDir: the cache is built
# again at each start, and settings changed from the web page are lost.
persistence:
enabled: false
existingClaim: ""
size: 2Gi
storageClass: ""
accessModes:
- ReadWriteOnce
annotations: {}
emptyDirSizeLimit: 1Gi
# The tunnel port's Service. Players reach it from outside the cluster, so a real deployment needs
# LoadBalancer or NodePort.
service:
type: LoadBalancer
port: 2302
nodePort: ""
annotations: {}
labels: {}
# Local keeps the players' own addresses (no SNAT to a node), which bans and the server's limits
# rely on.
externalTrafficPolicy: Local
loadBalancerClass: ""
loadBalancerSourceRanges: []
strategy:
type: Recreate
resources:
requests:
cpu: 100m
memory: 192Mi
limits:
memory: 600Mi
# The image is 32-bit x86 Linux code, which runs on amd64 nodes only.
nodeSelector:
kubernetes.io/os: linux
kubernetes.io/arch: amd64
affinity: {}
tolerations: []
priorityClassName: ""
podAnnotations: {}
podLabels: {}
# SIGTERM ends the game in progress, tells the players and exits 0; a second signal, or 5 seconds
# on, exits at once.
terminationGracePeriodSeconds: 15
podSecurityContext:
runAsNonRoot: true
runAsUser: 10001
runAsGroup: 10001
fsGroup: 10001
seccompProfile:
type: RuntimeDefault
securityContext:
allowPrivilegeEscalation: false
readOnlyRootFilesystem: true
capabilities:
drop: ["ALL"]
# GET /healthz on the web port: 200 while the server hosts (lobby, loading, playing, postgame) and
# its frames run. Each probe's fields override these; enabled: false drops it.
probes:
startup:
enabled: true
periodSeconds: 2
failureThreshold: 60
timeoutSeconds: 2
readiness:
enabled: true
periodSeconds: 10
failureThreshold: 3
timeoutSeconds: 2
liveness:
enabled: true
periodSeconds: 20
failureThreshold: 3
timeoutSeconds: 3
networkPolicy:
enabled: true
# Who may reach the tunnel port. Empty: anyone (players are on the internet).
from: []
# Who may reach the web port, as NetworkPolicy peers (an Ingress controller's namespace, say).
# Empty: no pod; kubectl port-forward and the kubelet's probes still reach it.
webFrom: []
dns:
to:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: kube-system
podSelector:
matchLabels:
k8s-app: kube-dns
# The internet: TCP to the MQTT brokers (1883) and the master servers (443), and UDP to anywhere
# (STUN, and the players' own ports). The private ranges are excepted.
internet:
cidr: 0.0.0.0/0
except:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
- 100.64.0.0/10
- 169.254.0.0/16
tcpPorts:
- 1883
- 443
udp: true
extraIngress: []
extraEgress: []
# More objects to render with the release (templated).
extraObjects: []
+31
View File
@@ -0,0 +1,31 @@
# init.txt: commands a dedicated server runs once at its start, one a line,
# as if typed at its console (docs/dedicated_server.md, "Commands"). Copy
# this file to init.txt in the data folder (server.init_file), and take the
# "# " off the lines you want. Lines starting with # or ; are comments.
#
# Settings are better given in config.toml or as HALO_* variables; these are
# for what changes from one start to the next.
# The rotation, replacing server.rotation (and written to it):
# sv_rotation_set bloodgulch:ctf, sidewinder:team_slayer+score=50, hangemhigh:king_moving
# sv_rotation_add prisoner:slayer+time=10
# sv_rotation_begin 2
# The game's name, players and notice (sv_set of the server.* settings):
# sv_name My server
# sv_maxplayers 12
# sv_motd Welcome. Be nice; admins are watching.
# sv_public 1
# sv_password secret
# Any setting the server lists in sv_settings:
# sv_set server.lobby_seconds 20
# sv_set server.empty_seconds 60
# A first game other than the rotation's, which goes on after it:
# sv_map bloodgulch ctf_classic
# The state of the server, in the log:
# sv_status
# The game's own console commands run too, with the owner's role.
+40
View File
@@ -0,0 +1,40 @@
# The dedicated server on MCSManager
`mcsmanager-config.json` holds two MCSManager quick-install entries for the
dedicated server (`docs/dedicated_server.md`). Each unzips a release's
`halo-linux-release.zip` into the instance's folder and runs
`./halo --server` there, stopped with `quit`.
| Entry | How it runs |
| --- | --- |
| Host | On the node itself, which needs the 32-bit C runtime (Debian and Ubuntu: `dpkg --add-architecture i386 && apt install libc6:i386`) |
| Docker | In a container of `ghcr.io/ptero-eggs/games:source` (Debian 12 with the 32-bit libraries), the instance's folder mounted at `/workspace` |
## Using it
1. Add the entries to the node's quick-install list, and create an
instance from one.
2. Upload the `maps/` folder of your own copy of the game into the
instance's folder. Without `maps/ui.map` and the rotation's maps the
server exits with code 2 and says which maps it looked for.
3. Start it.
## Folders
The Docker entry's container is made again at each start, so it sets
`HALO_SAVE_ROOT=/workspace/saves` and `HALO_LOG_ROOT=/workspace/logs`: the
save root with the map cache (about 115 MB, built at the first start) and
the logs stay in the instance's folder rather than in the container. The
host entry keeps the save root in the home folder of the daemon's user
(`~/.local/share/halo-linux`), which every host instance of that user
shares; give each its own with
`HALO_SAVE_ROOT=saves` (in the instance's environment, or as
`env HALO_SAVE_ROOT=saves ./halo --server` for its start command).
`config.toml` is written beside `halo` at the first start.
## Ports
UDP 2302 is the tunnel port, the one players need; the web page, its API
and the remote console are on 127.0.0.1:8080. A second instance on the node
needs ports of its own: `HALO_NET_TUNNEL_PORT` and `HALO_SERVER_WEB_PORT`,
and for the Docker entry its published ports to match.
+139
View File
@@ -0,0 +1,139 @@
{
"_comment": "MCSManager quick-install entries for the OpenCE dedicated server (docs/dedicated_server.md). Each package unzips the release into the instance's folder; put the maps/ folder of your own copy of the game beside halo before the first start. Settings: config.toml beside halo, written at the first start, or HALO_* variables.",
"languages": [
{
"label": "English",
"value": "en_us"
}
],
"packages": [
{
"language": "en_us",
"platform": "Linux",
"title": "OpenCE Dedicated Server",
"category": "Halo: Combat Evolved",
"runtime": "Linux x86-64 with 32-bit libraries",
"hardware": "1 CPU core, 600 MB of memory",
"size": "45 MB, and the game data you upload",
"author": "OpenCE",
"targetLink": "https://github.com/OpenCommunityEdition/OpenCE/releases/latest/download/halo-linux-release.zip",
"description": "The dedicated server run on the node itself, which needs the 32-bit C runtime (Debian and Ubuntu: dpkg --add-architecture i386 && apt install libc6:i386). Open UDP 2302; the web page is on http://127.0.0.1:8080/.",
"remark": "Host",
"setupInfo": {
"nickname": "OpenCE Dedicated Server",
"startCommand": "./halo --server",
"stopCommand": "quit",
"ie": "utf-8",
"oe": "utf-8",
"type": "universal",
"tag": [
"halo",
"opence"
],
"processType": "general",
"updateCommand": "",
"crlf": 1,
"actionCommandList": [
{
"name": "Status",
"command": "sv_status"
},
{
"name": "Players",
"command": "sv_players"
},
{
"name": "Next map",
"command": "sv_map_next"
},
{
"name": "Reload settings",
"command": "sv_reload"
}
],
"eventTask": {
"autoStart": false,
"autoRestart": true,
"ignore": false
},
"terminalOption": {
"haveColor": false,
"pty": false
}
}
},
{
"language": "en_us",
"platform": "Linux",
"title": "OpenCE Dedicated Server",
"category": "Halo: Combat Evolved",
"runtime": "Linux x86-64 with 32-bit libraries",
"hardware": "1 CPU core, 600 MB of memory",
"size": "45 MB, and the game data you upload",
"author": "OpenCE",
"targetLink": "https://github.com/OpenCommunityEdition/OpenCE/releases/latest/download/halo-linux-release.zip",
"description": "The dedicated server in a container of ghcr.io/ptero-eggs/games:source (Debian 12 with the 32-bit libraries), the instance's folder mounted as its working folder; the save root (with the map cache) and the logs are kept in it, as the container is made again at each start. Publishes UDP 2302 and the web page on the node's 127.0.0.1:8080 (each instance on a node needs ports of its own).",
"remark": "Docker",
"setupInfo": {
"nickname": "OpenCE Dedicated Server",
"startCommand": "./halo --server",
"stopCommand": "quit",
"ie": "utf-8",
"oe": "utf-8",
"type": "universal",
"tag": [
"halo",
"opence"
],
"processType": "docker",
"updateCommand": "",
"crlf": 1,
"actionCommandList": [
{
"name": "Status",
"command": "sv_status"
},
{
"name": "Players",
"command": "sv_players"
},
{
"name": "Next map",
"command": "sv_map_next"
},
{
"name": "Reload settings",
"command": "sv_reload"
}
],
"eventTask": {
"autoStart": false,
"autoRestart": true,
"ignore": false
},
"terminalOption": {
"haveColor": false,
"pty": false
},
"docker": {
"image": "ghcr.io/ptero-eggs/games:source",
"ports": [
"2302:2302/udp",
"127.0.0.1:8080:8080/tcp"
],
"extraVolumes": [],
"networkMode": "bridge",
"networkAliases": [],
"env": [
"HALO_SERVER_WEB_BIND=0.0.0.0",
"HALO_SAVE_ROOT=/workspace/saves",
"HALO_LOG_ROOT=/workspace/logs"
],
"memory": 600,
"workingDir": "/workspace/",
"changeWorkdir": true
}
}
}
]
}
+94
View File
@@ -0,0 +1,94 @@
# The dedicated server on Pterodactyl and Pelican
`egg-opence-dedicated-server.json` is an egg (`PTDL_v2`) that installs a
release of OpenCE from GitHub and runs it as a dedicated server
(`docs/dedicated_server.md`). Pelican imports the same file.
## Importing it
1. Admin > Nests (Pelican: Eggs) > Import Egg, and choose the file.
2. Create a server with the egg. Its primary allocation is the tunnel port
(`network.tunnel_port`, UDP): the one port players need, from 1025 up
(the container cannot bind lower ports).
3. Upload the game data: the `maps/` folder of your own copy of the game
(port/linux/README.md, "Game data"), into the server's folder over SFTP
(the panel's SFTP details, on the Settings tab). Without `maps/ui.map`
and the rotation's maps the server stops at once with exit code 2 and
says which maps it looked for.
4. Start it. The panel shows it running once it prints its ready line
(`server: ready`, or `"msg":"ready (` with `server.log_format = "json"`).
## Files
| Path (in `/home/container`) | What |
| --- | --- |
| `halo`, `halo-server`, `libSDL3.so.0`, `brokers.txt`, `masters.txt`, the licences | The release (replaced on Reinstall) |
| `maps/` | The game data (yours) |
| `custom_maps/` | Custom Edition maps, with `bitmaps.map`, `sounds.map` and `loc.map` (shared with players who join) |
| `gametypes/*.toml` | Gametypes of your own (the release adds examples, never replacing yours) |
| `init.txt` | Commands run at each start (`init.txt.example` has examples) |
| `config.toml` | Every setting, written at the first start |
| `publisher.key` | The master servers' key: made by `./halo --server --keygen` on any machine with the release and uploaded, or given as the Publisher key variable instead |
| `logs/` | `debug.txt`, `bans.txt`, `cheaters.txt` |
Reinstall (Settings tab) downloads the release again, the one the Release
variable names, and keeps `config.toml`, `init.txt`, `publisher.key`,
`gametypes/`, `custom_maps/`, `maps/` and `logs/`.
## Variables
Every variable is one of the server's settings, by its environment name
(docs/dedicated_server.md and port/linux/README.md, "Dedicated server"). A
variable wins over `config.toml`, and the web page's settings cannot
change it.
| Variable | Setting |
| --- | --- |
| Release (`OPENCE_RELEASE`) | `latest` or a tag (`build-206`); used by Reinstall |
| Server name (`HALO_SERVER_NAME`) | `server.name`, 15 characters |
| Rotation (`HALO_SERVER_ROTATION`) | `server.rotation` |
| Max players (`HALO_SERVER_MAX_PLAYERS`) | `server.max_players` |
| Join password (`HALO_SERVER_PASSWORD`) | `server.password` |
| Public (`HALO_SERVER_PUBLIC`) | `server.public` |
| Message of the day (`HALO_SERVER_MOTD`) | `server.motd` |
| Lobby seconds (`HALO_SERVER_LOBBY_SECONDS`) | `server.lobby_seconds` |
| Web UI port (`HALO_SERVER_WEB_PORT`) | `server.web_port`; 0 for none |
| Web UI password (`HALO_SERVER_WEB_PASSWORD`) | `server.web_password` |
| Public address (`HALO_NET_PUBLIC_ADDRESS`) | `network.public_address` |
| Publisher key (`HALO_SERVER_PUBLISHER_KEY`) | The master servers' key itself, in place of `publisher.key` |
| Instance name (`HALO_SERVER_INSTANCE`) | `server.instance` |
| Region (`HALO_SERVER_REGION`) | `server.region` |
| Log format (`HALO_SERVER_LOG_FORMAT`) | `server.log_format` |
The startup command sets `HALO_NET_TUNNEL_PORT` to the primary allocation's
port and `HALO_LOG_ROOT` to `logs/`. Two variables are the administrator's
only: Web UI bind (`0.0.0.0`, as the allocation's address is the node's,
not the container's) and GitHub repository (`OpenCommunityEdition/OpenCE`).
## The web page
The admin page, its API and the remote console need a second allocation:
the node's administrator adds one to the server (or raises its allocation
limit so the owner can, on the Network tab). Give its port as Web UI port
and a password of 8 characters or more as Web UI password, restart, and
open `http://<allocation address>:<port>/`. The page has no TLS of its own:
put it behind a reverse proxy with HTTPS for anything but a private network.
## Stopping and restarting
The panel's Stop sends SIGINT, which the server takes as SIGTERM: the game
in progress goes to its postgame, the players are told, the listing is
withdrawn, and it exits 0. The console's `quit` command does the same, but
Wings counts an exit it did not ask for as a crash and starts the server
again; use Stop. `sv_restart` exits with code 5, which Wings also takes as a
crash and restarts, which is what it asks for.
Updates: `server.auto_update` is for servers that own their files; on a
panel, change the Release variable (or keep `latest`) and Reinstall, by hand
or as a schedule.
## Checking the egg
`python tools/egg_build.py` copies `install.sh` into the egg and checks it;
`python -m pytest -q tools/test_egg.py` checks the egg and runs `install.sh`
in a `debian:bookworm-slim` container against a release served locally.
@@ -0,0 +1,203 @@
{
"_comment": "DO NOT EDIT: FILE GENERATED AUTOMATICALLY BY PTERODACTYL PANEL - PTERODACTYL.IO",
"meta": {
"version": "PTDL_v2",
"update_url": null
},
"exported_at": "2026-10-24T00:00:00+00:00",
"name": "OpenCE Dedicated Server",
"author": "opence@halocombatevolved.com",
"description": "A dedicated server of OpenCE, the port of Halo: Combat Evolved: hosts multiplayer games one after another, with no window, sound or player of its own. Installs a release from GitHub. The game data is yours to upload: put the maps/ folder of your own copy of the game in the server's folder over SFTP; the server does not start without it.",
"features": [],
"docker_images": {
"Debian 12 with 32-bit libraries (Pterodactyl)": "ghcr.io/ptero-eggs/games:source",
"Debian 12 with 32-bit libraries (Pelican)": "ghcr.io/pelican-eggs/games:source"
},
"file_denylist": [],
"startup": "HALO_NET_TUNNEL_PORT={{SERVER_PORT}} HALO_LOG_ROOT=/home/container/logs ./halo --server",
"config": {
"files": "{}",
"startup": "{\r\n \"done\": [\r\n \"server: ready\",\r\n \"\\\"msg\\\":\\\"ready (\"\r\n ]\r\n}",
"logs": "{}",
"stop": "^C"
},
"scripts": {
"installation": {
"script": "#!/bin/bash\n# The OpenCE dedicated server egg's installation script (Pterodactyl and\n# Pelican), run as root in ghcr.io/ptero-eggs/installers:debian with the\n# server's folder at /mnt/server. tools/egg_build.py copies it into\n# egg-opence-dedicated-server.json.\n#\n# OPENCE_RELEASE: \"latest\" or a release tag (build-206).\n# OPENCE_REPOSITORY: the GitHub repository (owner/name) to download from.\n#\n# A reinstall replaces the release's files and keeps the owner's:\n# config.toml, init.txt, publisher.key, gametypes/, custom_maps/, maps/ and\n# logs/. The panel ignores this script's exit code, so each failure says\n# what went wrong.\n\nset -u\n\nSERVER_DIR=\"${SERVER_DIR:-/mnt/server}\"\nRELEASE=\"${OPENCE_RELEASE:-latest}\"\nREPOSITORY=\"${OPENCE_REPOSITORY:-OpenCommunityEdition/OpenCE}\"\nGITHUB_URL=\"${OPENCE_GITHUB_URL:-https://github.com}\"\nGITHUB_API=\"${OPENCE_GITHUB_API:-https://api.github.com}\"\nASSET=halo-linux-release.zip\n\nfail() {\n\techo \"INSTALL FAILED: $*\"\n\texit 1\n}\n\nif ! [[ \"$REPOSITORY\" =~ ^[A-Za-z0-9._-]+/[A-Za-z0-9._-]+$ ]]; then\n\tfail \"the repository \\\"$REPOSITORY\\\" is not owner/name\"\nfi\nif [ -z \"$RELEASE\" ] || [ \"$RELEASE\" = latest ]; then\n\t# (no API call, so no rate limit)\n\turl=\"$GITHUB_URL/$REPOSITORY/releases/latest/download/$ASSET\"\nelse\n\tif ! [[ \"$RELEASE\" =~ ^[A-Za-z0-9._-]+$ ]]; then\n\t\tfail \"the release \\\"$RELEASE\\\" is not a tag name (build-206) or latest\"\n\tfi\n\techo \"Looking up release $RELEASE of $REPOSITORY\"\n\trelease_json=\"$(curl -fsSL --retry 3 -H 'Accept: application/vnd.github+json' \\\n\t\t\"$GITHUB_API/repos/$REPOSITORY/releases/tags/$RELEASE\")\" \\\n\t\t|| fail \"no release $RELEASE in $REPOSITORY (or GitHub's API did not answer)\"\n\turl=\"$(printf '%s' \"$release_json\" | jq -r --arg name \"$ASSET\" \\\n\t\t'[.assets[]? | select(.name == $name) | .browser_download_url][0] // empty')\"\n\t[ -n \"$url\" ] || fail \"release $RELEASE has no $ASSET\"\nfi\n\nmkdir -p \"$SERVER_DIR\" || fail \"cannot make $SERVER_DIR\"\ncd \"$SERVER_DIR\" || fail \"cannot enter $SERVER_DIR\"\n\nwork=\"$(mktemp -d)\" || fail \"cannot make a temporary folder\"\ntrap 'rm -rf \"$work\"' EXIT\n\necho \"Downloading $url\"\ncurl -fL --retry 3 --progress-bar -o \"$work/$ASSET\" \"$url\" || fail \"the download of $url failed\"\nunzip -tq \"$work/$ASSET\" > /dev/null || fail \"$ASSET is not a zip file\"\nmkdir \"$work/release\"\nunzip -q \"$work/$ASSET\" -d \"$work/release\" || fail \"cannot unzip $ASSET\"\n[ -f \"$work/release/halo\" ] || fail \"$ASSET has no halo executable\"\n\n# the release's files, over the old release's; the owner's are never in it,\n# and gametypes/ only adds the examples not already there\nfor entry in \"$work/release\"/* \"$work/release\"/.[!.]*; do\n\t[ -e \"$entry\" ] || continue\n\tname=\"$(basename \"$entry\")\"\n\tcase \"$name\" in\n\tconfig.toml | init.txt | publisher.key | custom_maps | maps | logs)\n\t\tcontinue\n\t\t;;\n\tgametypes)\n\t\tmkdir -p gametypes\n\t\tcp -rn \"$entry\"/. gametypes/\n\t\tcontinue\n\t\t;;\n\tesac\n\trm -rf \"./$name\"\n\tcp -a \"$entry\" \"./$name\" || fail \"cannot copy $name\"\ndone\n\nchmod 0755 halo\nif [ ! -f halo-server ]; then\n\tprintf '#!/bin/sh\\nexec \"$(dirname \"$0\")/halo\" --server \"$@\"\\n' > halo-server\nfi\nchmod 0755 halo-server\nmkdir -p maps custom_maps gametypes logs\n\necho \"Checking that the server runs\"\nif version=\"$(HOME=\"$work\" HALO_SAVE_ROOT=\"$work/saves\" timeout 30 ./halo --version 2>&1)\"; then\n\techo \"$version\"\nelse\n\techo \"WARNING: ./halo --version did not run. The server needs the 32-bit C runtime\"\n\techo \"WARNING: (the egg's ghcr.io/ptero-eggs/games:source image has it):\"\n\techo \"$version\"\nfi\n\nif [ ! -f maps/ui.map ]; then\n\techo \"No game data yet: upload your maps/ folder (ui.map and the multiplayer maps)\"\n\techo \"over SFTP into the server's folder before starting it.\"\nfi\necho \"Installation completed\"\n",
"container": "ghcr.io/ptero-eggs/installers:debian",
"entrypoint": "bash"
}
},
"variables": [
{
"name": "Release",
"description": "A release tag (build-206) or latest. A change takes effect on Reinstall (Settings tab), which keeps config.toml, init.txt, gametypes/, custom_maps/ and maps/.",
"env_variable": "OPENCE_RELEASE",
"default_value": "latest",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:40|regex:/^[A-Za-z0-9._-]+$/",
"field_type": "text"
},
{
"name": "Server name",
"description": "The game's name in the lobby and the server browser: 15 characters of printable ASCII.",
"env_variable": "HALO_SERVER_NAME",
"default_value": "OpenCE Server",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:15|regex:/^[\\x20-\\x7E]+$/",
"field_type": "text"
},
{
"name": "Rotation",
"description": "The games played one after another, separated by commas: map:gametype, with +rule=value after a gametype (bloodgulch:ctf, sidewinder:team_slayer+score=50). A gametype is a built-in's name or a gametypes/<name>.toml of yours.",
"env_variable": "HALO_SERVER_ROTATION",
"default_value": "bloodgulch:ctf, sidewinder:team_slayer, prisoner:slayer",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|max:4096",
"field_type": "text"
},
{
"name": "Max players",
"description": "2 to 127.",
"env_variable": "HALO_SERVER_MAX_PLAYERS",
"default_value": "16",
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|between:2,127",
"field_type": "text"
},
{
"name": "Join password",
"description": "The password the server browser asks for; empty for none. The invite link joins without it.",
"env_variable": "HALO_SERVER_PASSWORD",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:64",
"field_type": "text"
},
{
"name": "Public",
"description": "List the server in everyone's server browser.",
"env_variable": "HALO_SERVER_PUBLIC",
"default_value": "true",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:true,false",
"field_type": "text"
},
{
"name": "Message of the day",
"description": "A notice each player is shown on joining (127 characters); empty for none.",
"env_variable": "HALO_SERVER_MOTD",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:127",
"field_type": "text"
},
{
"name": "Lobby seconds",
"description": "Seconds the lobby counts down before each game (0 to 300).",
"env_variable": "HALO_SERVER_LOBBY_SECONDS",
"default_value": "15",
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|between:0,300",
"field_type": "text"
},
{
"name": "Web UI port",
"description": "0: no web page. Else the port of an additional allocation (Network tab) for the admin page, its API and the remote console, at http://<allocation address>:<port>/; it needs a web UI password.",
"env_variable": "HALO_SERVER_WEB_PORT",
"default_value": "0",
"user_viewable": true,
"user_editable": true,
"rules": "required|integer|between:0,65535",
"field_type": "text"
},
{
"name": "Web UI password",
"description": "The admin password of the web page, 8 characters or more.",
"env_variable": "HALO_SERVER_WEB_PASSWORD",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|min:8|max:64",
"field_type": "text"
},
{
"name": "Public address",
"description": "host[:port] offered to joiners first, for a node behind a NAT that STUN cannot see through; usually empty.",
"env_variable": "HALO_NET_PUBLIC_ADDRESS",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|max:253",
"field_type": "text"
},
{
"name": "Publisher key",
"description": "Your approved key for the master servers that list dedicated servers: the 64 hex characters of the seed ./halo --server --keygen writes to publisher.key. Empty: the key file, if there is one; the server is not listed on the masters without one.",
"env_variable": "HALO_SERVER_PUBLISHER_KEY",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|regex:/^[0-9a-f]{64}$/",
"field_type": "text"
},
{
"name": "Instance name",
"description": "Tells this server from your others on the master servers: letters, digits, dashes.",
"env_variable": "HALO_SERVER_INSTANCE",
"default_value": "main",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|alpha_dash|max:32",
"field_type": "text"
},
{
"name": "Region",
"description": "A label in the server browser (eu, na-east); empty for none.",
"env_variable": "HALO_SERVER_REGION",
"default_value": "",
"user_viewable": true,
"user_editable": true,
"rules": "nullable|string|alpha_dash|max:16",
"field_type": "text"
},
{
"name": "Log format",
"description": "The console's lines: text, or json for a log collector.",
"env_variable": "HALO_SERVER_LOG_FORMAT",
"default_value": "text",
"user_viewable": true,
"user_editable": true,
"rules": "required|string|in:text,json",
"field_type": "text"
},
{
"name": "Web UI bind",
"description": "The container's address the web port listens on: all of them, as the allocation's address is the node's.",
"env_variable": "HALO_SERVER_WEB_BIND",
"default_value": "0.0.0.0",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|in:0.0.0.0",
"field_type": "text"
},
{
"name": "GitHub repository",
"description": "owner/name the installation downloads the release from.",
"env_variable": "OPENCE_REPOSITORY",
"default_value": "OpenCommunityEdition/OpenCE",
"user_viewable": false,
"user_editable": false,
"rules": "required|string|max:100|regex:/^[A-Za-z0-9._-]+\\/[A-Za-z0-9._-]+$/",
"field_type": "text"
}
]
}
+100
View File
@@ -0,0 +1,100 @@
#!/bin/bash
# The OpenCE dedicated server egg's installation script (Pterodactyl and
# Pelican), run as root in ghcr.io/ptero-eggs/installers:debian with the
# server's folder at /mnt/server. tools/egg_build.py copies it into
# egg-opence-dedicated-server.json.
#
# OPENCE_RELEASE: "latest" or a release tag (build-206).
# OPENCE_REPOSITORY: the GitHub repository (owner/name) to download from.
#
# A reinstall replaces the release's files and keeps the owner's:
# config.toml, init.txt, publisher.key, gametypes/, custom_maps/, maps/ and
# logs/. The panel ignores this script's exit code, so each failure says
# what went wrong.
set -u
SERVER_DIR="${SERVER_DIR:-/mnt/server}"
RELEASE="${OPENCE_RELEASE:-latest}"
REPOSITORY="${OPENCE_REPOSITORY:-OpenCommunityEdition/OpenCE}"
GITHUB_URL="${OPENCE_GITHUB_URL:-https://github.com}"
GITHUB_API="${OPENCE_GITHUB_API:-https://api.github.com}"
ASSET=halo-linux-release.zip
fail() {
echo "INSTALL FAILED: $*"
exit 1
}
if ! [[ "$REPOSITORY" =~ ^[A-Za-z0-9._-]+/[A-Za-z0-9._-]+$ ]]; then
fail "the repository \"$REPOSITORY\" is not owner/name"
fi
if [ -z "$RELEASE" ] || [ "$RELEASE" = latest ]; then
# (no API call, so no rate limit)
url="$GITHUB_URL/$REPOSITORY/releases/latest/download/$ASSET"
else
if ! [[ "$RELEASE" =~ ^[A-Za-z0-9._-]+$ ]]; then
fail "the release \"$RELEASE\" is not a tag name (build-206) or latest"
fi
echo "Looking up release $RELEASE of $REPOSITORY"
release_json="$(curl -fsSL --retry 3 -H 'Accept: application/vnd.github+json' \
"$GITHUB_API/repos/$REPOSITORY/releases/tags/$RELEASE")" \
|| fail "no release $RELEASE in $REPOSITORY (or GitHub's API did not answer)"
url="$(printf '%s' "$release_json" | jq -r --arg name "$ASSET" \
'[.assets[]? | select(.name == $name) | .browser_download_url][0] // empty')"
[ -n "$url" ] || fail "release $RELEASE has no $ASSET"
fi
mkdir -p "$SERVER_DIR" || fail "cannot make $SERVER_DIR"
cd "$SERVER_DIR" || fail "cannot enter $SERVER_DIR"
work="$(mktemp -d)" || fail "cannot make a temporary folder"
trap 'rm -rf "$work"' EXIT
echo "Downloading $url"
curl -fL --retry 3 --progress-bar -o "$work/$ASSET" "$url" || fail "the download of $url failed"
unzip -tq "$work/$ASSET" > /dev/null || fail "$ASSET is not a zip file"
mkdir "$work/release"
unzip -q "$work/$ASSET" -d "$work/release" || fail "cannot unzip $ASSET"
[ -f "$work/release/halo" ] || fail "$ASSET has no halo executable"
# the release's files, over the old release's; the owner's are never in it,
# and gametypes/ only adds the examples not already there
for entry in "$work/release"/* "$work/release"/.[!.]*; do
[ -e "$entry" ] || continue
name="$(basename "$entry")"
case "$name" in
config.toml | init.txt | publisher.key | custom_maps | maps | logs)
continue
;;
gametypes)
mkdir -p gametypes
cp -rn "$entry"/. gametypes/
continue
;;
esac
rm -rf "./$name"
cp -a "$entry" "./$name" || fail "cannot copy $name"
done
chmod 0755 halo
if [ ! -f halo-server ]; then
printf '#!/bin/sh\nexec "$(dirname "$0")/halo" --server "$@"\n' > halo-server
fi
chmod 0755 halo-server
mkdir -p maps custom_maps gametypes logs
echo "Checking that the server runs"
if version="$(HOME="$work" HALO_SAVE_ROOT="$work/saves" timeout 30 ./halo --version 2>&1)"; then
echo "$version"
else
echo "WARNING: ./halo --version did not run. The server needs the 32-bit C runtime"
echo "WARNING: (the egg's ghcr.io/ptero-eggs/games:source image has it):"
echo "$version"
fi
if [ ! -f maps/ui.map ]; then
echo "No game data yet: upload your maps/ folder (ui.map and the multiplayer maps)"
echo "over SFTP into the server's folder before starting it."
fi
echo "Installation completed"
+49
View File
@@ -0,0 +1,49 @@
# The dedicated server on PufferPanel
`template.json` is a PufferPanel template for the dedicated server
(`docs/dedicated_server.md`), run in PufferPanel's host environment: it
downloads a release's `halo-linux-release.zip` into the server's folder,
runs `./halo --server` there, and stops it by writing `quit` to its
standard input.
## Using it
1. The node needs the 32-bit C runtime (Debian and Ubuntu:
`dpkg --add-architecture i386 && apt install libc6:i386`). The template
mounts `/lib32` and `/usr/lib32` into PufferPanel's sandbox, which does
not otherwise; without them the 32-bit `halo` cannot start.
2. Add the template (Templates, New, and paste the file), and create a
server from it.
3. Upload the `maps/` folder of your own copy of the game into the
server's folder. Without `maps/ui.map` and the rotation's maps the server
exits with code 2 and says which maps it looked for.
4. Start it.
## Ports
The **Tunnel port** (UDP, 2302 by default) is the one port players need.
The **Web UI port** is the web page, its API and the remote console, on
127.0.0.1 only. Its default is 8090, because PufferPanel itself listens on
8080. Each server on a node needs a tunnel port and a web port of its own
(or a web port of 0, for none).
## Files
Everything the server writes stays in its folder: `config.toml` (every
setting, written at the first start, with the web page's admin password if
none was given), `saves/` (`HALO_SAVE_ROOT`: the profiles and the map cache,
about 115 MB, built at the first start), `logs/` (`HALO_LOG_ROOT`:
`debug.txt`, `bans.txt`, `cheaters.txt`) and `status.json`
(`server.status_file`, the status every 2 seconds).
The template's variables are passed as `HALO_*` variables, which win over
`config.toml`: `sv_set` and the web page cannot change those settings.
## PufferPanel versions
The template is in the format of PufferPanel 2's templates (`run.command`
as a string, `run.stop` as the command written to standard input). We have
not confirmed how PufferPanel 3 imports it, nor the form of its standard
input settings; if a server made from it on PufferPanel 3 does not stop
with `quit`, set its stop to send `quit` to standard input (or SIGTERM,
which the server takes as well) in the server's settings.
+140
View File
@@ -0,0 +1,140 @@
{
"type": "opence",
"display": "OpenCE Dedicated Server",
"install": [
{
"type": "download",
"files": [
"${release_url}"
]
},
{
"type": "command",
"commands": [
"unzip -o halo-linux-release.zip",
"rm -f halo-linux-release.zip",
"chmod 0755 halo halo-server",
"mkdir -p maps custom_maps gametypes saves logs",
"./halo --version"
]
}
],
"run": {
"command": "./halo --server",
"stop": "quit",
"workingDirectory": "",
"pre": [],
"post": [],
"environmentVars": {
"HALO_NET_TUNNEL_PORT": "${port}",
"HALO_SERVER_NAME": "${name}",
"HALO_SERVER_ROTATION": "${rotation}",
"HALO_SERVER_MAX_PLAYERS": "${max_players}",
"HALO_SERVER_PUBLIC": "${public}",
"HALO_SERVER_WEB_PORT": "${web_port}",
"HALO_SERVER_LOG_FORMAT": "${log_format}",
"HALO_SERVER_STATUS_FILE": "status.json",
"HALO_SAVE_ROOT": "saves",
"HALO_LOG_ROOT": "logs"
},
"autostart": false,
"autorecover": true,
"autorestart": false
},
"data": {
"release_url": {
"type": "string",
"display": "Release",
"desc": "The release's halo-linux-release.zip: .../releases/latest/download/halo-linux-release.zip, or .../releases/download/<tag>/halo-linux-release.zip. Used when the server is installed again.",
"required": true,
"value": "https://github.com/OpenCommunityEdition/OpenCE/releases/latest/download/halo-linux-release.zip",
"userEdit": true
},
"port": {
"type": "integer",
"display": "Tunnel port",
"desc": "The UDP port of internet play (network.tunnel_port), the one port players need.",
"required": true,
"value": 2302,
"userEdit": true
},
"name": {
"type": "string",
"display": "Server name",
"desc": "The game's name in the server browser: 15 characters of printable ASCII.",
"required": true,
"value": "OpenCE Server",
"userEdit": true
},
"rotation": {
"type": "string",
"display": "Rotation",
"desc": "The games played one after another: map:gametype entries separated by commas.",
"required": true,
"value": "bloodgulch:ctf, sidewinder:team_slayer, prisoner:slayer",
"userEdit": true
},
"max_players": {
"type": "integer",
"display": "Max players",
"desc": "2 to 127.",
"required": true,
"value": 16,
"userEdit": true
},
"public": {
"type": "boolean",
"display": "Public",
"desc": "List the server in everyone's server browser.",
"required": true,
"value": true,
"userEdit": true
},
"web_port": {
"type": "integer",
"display": "Web UI port",
"desc": "The web page, its API and the remote console, on 127.0.0.1 (server.web_port); 0 for none. Each server on a node needs a port of its own, and not PufferPanel's own (8080). The admin password is printed at the first start and kept in config.toml.",
"required": true,
"value": 8090,
"userEdit": true
},
"log_format": {
"type": "option",
"display": "Log format",
"desc": "The console's lines.",
"required": true,
"value": "text",
"userEdit": true,
"options": [
{
"value": "text",
"display": "Text"
},
{
"value": "json",
"display": "JSON"
}
]
}
},
"environment": {
"type": "host",
"mounts": [
"/lib32",
"/usr/lib32"
]
},
"supportedEnvironments": [
{
"type": "host",
"mounts": [
"/lib32",
"/usr/lib32"
]
}
],
"requirements": {
"os": "linux",
"arch": "amd64"
}
}
+1
View File
@@ -0,0 +1 @@
d04e8b101007d1641cace8b95fcca76f7f44709f6885c3d031b52394dbdf9376
+52
View File
@@ -0,0 +1,52 @@
# The dedicated server under systemd
`halo-server@.service` runs the dedicated server (`docs/dedicated_server.md`)
as a templated unit: one instance for each folder
`/opt/opence/servers/<name>`, all sharing one release in `/opt/opence/bin`
and one read-only copy of the game data in `/opt/opence/data`.
| Path | What |
| --- | --- |
| `/opt/opence/bin/` | The release (`halo-linux-release.zip`, unzipped) |
| `/opt/opence/data/` | The game data, only read: `maps/`, `custom_maps/`, `gametypes/` |
| `/opt/opence/servers/<name>/` | The instance's own, the only folder it may write: `config.toml`, `init.txt`, `publisher.key`, `server.env`, `saves/` (the map cache), `logs/` |
## Installing
```sh
sudo useradd --system --home-dir /opt/opence --shell /usr/sbin/nologin halo
sudo install -d -o halo -g halo -m 0750 /opt/opence/servers/main
sudo cp deploy/systemd/halo-server@.service /etc/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable --now halo-server@main
journalctl -u halo-server@main -f
```
Open UDP 2302 (the instance's `network.tunnel_port`) in the firewall.
## Settings
`server.env` in the instance's folder holds its settings as `HALO_*`
variables, one a line (port/linux/README.md, "Dedicated server"). A
variable set there wins over `config.toml`, and `sv_set` and the web page
cannot change it; leave out what you want to change from the web page.
A second instance on the machine needs ports of its own, and its own
loopback address for system link:
```sh
HALO_NET_TUNNEL_PORT=2303
HALO_SERVER_WEB_PORT=8081
HALO_NET_ADDRESS=127.0.0.2
HALO_NET_BROADCAST=127.0.0.1
```
The web port stays on 127.0.0.1 unless `server.env` says otherwise (and
then it needs a password, and TLS in front of it).
## Exit codes
Exit code 5 (`sv_restart`, or an update installed) restarts the server; 2
(no usable maps) and 3 (bad configuration) do not, as a restart would fail
the same way. The unit has no console (`StandardInput=null`): commands come
from `init.txt` and the web port.
+96
View File
@@ -0,0 +1,96 @@
# A dedicated server under systemd (docs/dedicated_server.md), one instance
# for each folder /opt/opence/servers/<name>:
#
# /opt/opence/bin/ the release (halo-linux-release.zip, unzipped)
# /opt/opence/data/ the game data, shared by every instance and
# only read: maps/, custom_maps/, gametypes/
# /opt/opence/servers/<name>/ the instance's own: config.toml, init.txt,
# publisher.key, server.env, logs/, saves/
#
# server.env holds the instance's settings as HALO_* variables, one a line.
# A second instance on the machine needs its own ports, and its own loopback
# address for system link:
#
# HALO_NET_TUNNEL_PORT=2303
# HALO_SERVER_WEB_PORT=8081
# HALO_NET_ADDRESS=127.0.0.2
# HALO_NET_BROADCAST=127.0.0.1
#
# Install:
# sudo useradd --system --home-dir /opt/opence --shell /usr/sbin/nologin halo
# sudo install -d -o halo -g halo -m 0750 /opt/opence/servers/main
# sudo cp deploy/systemd/halo-server@.service /etc/systemd/system/
# sudo systemctl daemon-reload
# sudo systemctl enable --now halo-server@main
# journalctl -u halo-server@main -f
#
# Open UDP 2302 (each instance's network.tunnel_port) in the firewall. The
# web port stays on 127.0.0.1 unless server.env says otherwise.
#
# Exit code 5 (sv_restart, or an update installed) restarts the server;
# 2 (no usable maps) and 3 (bad configuration) do not, as a restart would
# fail the same way.
[Unit]
Description=OpenCE dedicated server %i
Documentation=https://github.com/OpenCommunityEdition/OpenCE/blob/main/docs/dedicated_server.md
After=network-online.target
Wants=network-online.target
[Service]
Type=exec
User=halo
Group=halo
WorkingDirectory=/opt/opence/servers/%i
Environment=HOME=/opt/opence/servers/%i
Environment=HALO_CONFIG_FILE=/opt/opence/servers/%i/config.toml
Environment=HALO_DATA_ROOT=/opt/opence/data
Environment=HALO_SAVE_ROOT=/opt/opence/servers/%i/saves
Environment=HALO_LOG_ROOT=/opt/opence/servers/%i/logs
Environment=HALO_SERVER_INIT_FILE=/opt/opence/servers/%i/init.txt
Environment=HALO_NET_TUNNEL_PORT=2302
EnvironmentFile=-/opt/opence/servers/%i/server.env
ExecStartPre=/bin/mkdir -p /opt/opence/servers/%i/logs /opt/opence/servers/%i/saves
ExecStart=/opt/opence/bin/halo --server
# (no console: commands come from init.txt and the web port)
StandardInput=null
StandardOutput=journal
StandardError=journal
KillSignal=SIGTERM
TimeoutStopSec=15
Restart=on-failure
RestartSec=10
RestartForceExitStatus=5
RestartPreventExitStatus=2 3
# (no privileges, nothing writable but the instance's folder)
NoNewPrivileges=yes
CapabilityBoundingSet=
AmbientCapabilities=
ProtectSystem=strict
ReadWritePaths=/opt/opence/servers/%i
ProtectHome=yes
PrivateTmp=yes
PrivateDevices=yes
ProtectKernelTunables=yes
ProtectKernelModules=yes
ProtectKernelLogs=yes
ProtectControlGroups=yes
ProtectClock=yes
ProtectHostname=yes
ProtectProc=invisible
RestrictAddressFamilies=AF_INET AF_UNIX AF_NETLINK
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
LockPersonality=yes
MemoryDenyWriteExecute=yes
# (a 32-bit x86 program)
SystemCallArchitectures=native x86
SystemCallFilter=@system-service
SystemCallFilter=~@privileged
SystemCallErrorNumber=EPERM
UMask=0027
MemoryMax=600M
TasksMax=64
[Install]
WantedBy=multi-user.target
+32 -1
View File
@@ -1,5 +1,5 @@
> This is the README of [OpenCE](https://github.com/OpenCommunityEdition/OpenCE),
> the port Ringfall: Mjolnir VR is built on, kept for its build and
> the port Mjolnir VR is built on, kept for its build and
> development notes. Its download links are OpenCE's. For the VR mod, see
> the [main README](../README.md).
@@ -207,3 +207,34 @@ Enter `adb pull` to copy the recording parts to a computer.
A profiling build plays with normal builds. It does not use
`--pgo=train`.
## Licence
OpenCE is free software: you can give it to others and change it under the
terms of the GNU Affero General Public License as published by the Free
Software Foundation, version 3 of the License or (at your option) any later
version (`AGPL-3.0-or-later`). It comes with no warranty. The full text is in
[LICENSE](LICENSE).
- **From the change.** The AGPL applies from the commit that made the change,
and to each release built from that commit or a later one. Earlier
releases, and the source at every earlier commit, were released under
[CC0 1.0](LICENSES/CC0-1.0.txt) and stay that way.
- **What OpenCE builds on.** The decompilation of
[punpckhdq/halo](https://github.com/punpckhdq/halo) is under the AGPL 3.0
from 17 October 2026, and under CC0 1.0 before that date.
[bnunu/halo-1](https://github.com/bnunu/halo-1) is under CC0 1.0.
- **Contributions** are under `AGPL-3.0-or-later`. A change taken from a
project under GPL 3.0 keeps that licence and its notices; the GPL 3.0 and
the AGPL 3.0 let the two be combined (section 13 of each).
- **Hosts and servers.** If you change the game and let other persons play
with your version over a network (for example, as the host of an internet
game, or on a web site), the AGPL asks you to offer them the source of
your version (section 13). The game as released has its source here, and
each release's source is its tag (`build-<n>`).
- **Third-party code, fonts and art** keep their own licences, which are
next to them (`port/third_party`, `port/assets/fonts`,
`port/assets/icons`, `port/assets/text_filter`). The release downloads and
the web site's `licenses.txt` carry their notices.
- **Halo is not covered.** The licence covers the work of OpenCE's authors.
It gives no rights in Halo, its maps or anything else that Microsoft owns.
+3 -3
View File
@@ -493,9 +493,9 @@ file the same as the host's; with `network.map_download` off, or a host with
but their model parts have its 0x68-byte layout and their shader types its
numbering, which makes them a check on what the conversion produces.
OpenSauce and Reclaimer are GPL-3.0 and this repository is CC0: no code from
either was copied. They were read as documentation of the file formats, and
every layout used was then checked against the sample maps.
No code from OpenSauce or Reclaimer (both GPL-3.0) was copied: they were
read as documentation of the file formats, and every layout used was then
checked against the sample maps.
### Documented facts (source, checked against the sample maps)
+762
View File
@@ -0,0 +1,762 @@
# The dedicated server: reference
`halo --server` runs the game as a host with no window, sound or player of
its own: other machines join it on the LAN, by its invite link or from the
server browser, as they join any host. `port/linux/README.md`, "Dedicated
server", says how to run one; this document is the reference for what it
takes and answers: the command line, the exit codes, the commands, the
HTTP API, the remote console (RCON) over WebSocket, the events, the log and
the files. `docs/master_protocol.md` is the master servers' protocol, which
the server publishes to and the server browser reads.
The code is `port/linux/src/server_*.c` (the platform side: the mode, the
standard input, the log, the rotation's grammar, the HTTP and WebSocket
server, the master servers' publisher) and `port/linux/game/server_*.c`
(the game side: the director that plays one game after another, the
commands, the gametypes, the status). The Android and web builds have no
dedicated server: they compile those files to nothing, but for
`server_json.c` (the JSON reader, which the server browser's list of master
servers uses in every build) and `server_rotation.c` (the rotation's
grammar and the gametype rules), which every build compiles.
## Panels and fleets
A game panel (Pterodactyl, PufferPanel, MCSManager: `deploy/`) runs one
server and reads its standard output; `deploy/systemd` and `deploy/docker`
run servers on one machine. For many servers on many machines, `opence-fleet`
([github.com/OpenCommunityEdition/opence-fleet](https://github.com/OpenCommunityEdition/opence-fleet))
is one control plane over them all: an agent on each machine runs the
servers and drives each through this document's API, as the owner from
the machine itself (`server.web_owner_password`, below). What it relies on
is named in the status's and the RCON's `capabilities`: `owner_web` (the
owner's role over the web, from loopback), `ban_address` (`sv_ban_address`,
`POST /api/bans`), `stop` (`sv_stop`, `POST /api/stop`, the `drain` event),
`event_addresses` (addresses in the player events) and `identity` (the
status's `pid`, `instance`...).
## Command line
| Argument | What it does |
| --- | --- |
| `--server` | Dedicated server mode (as `HALO_SERVER=1` or `server.enabled = true`) |
| `--config <path>` | The settings file; default `config.toml` beside the executable. `HALO_CONFIG_FILE`, when it is set, wins over `--config` |
| `--version` | Prints `OpenCE build-<n> (network version <v>)` and exits 0 |
| `--keygen` | Writes a new publisher key (`server.publisher_key_file`) unless one exists, prints its public key and key id, exits 0; exits 3 when the key cannot be made, read or written |
| `--sign <text>` | Prints the publisher key's Ed25519 signature of the text, in hex (an application's proof of key), exits 0; exits 3 without a text or a usable key |
| `--probe [<invite>]` | A look at a server, for a list site that shows its state: joins nothing and never starts a server (whatever `--server`, `HALO_SERVER` or `server.enabled` say). It finds the invite's game over its tunnel (without an invite, the LAN's first) and prints it as one line of JSON, the game of the invite's host alone (never another game that answers), and exits 0; when nothing answers in 30 seconds it prints `{"ok":false,"error":"no game answered in 30 seconds"}` and exits 1. Internet play is as set (`network.online`, on by default), which an invite needs |
| `--help` | Prints these, exits 0 |
`--version`, `--help`, `--keygen`, `--sign` and `--probe` write no settings: the
settings file is read, never completed or made. `--probe` wins over
`--server`, `HALO_SERVER` and `server.enabled`: a probe never writes to
`config.toml`.
A probe's line:
```json
{"ok":true,"name":"OpenCE Server","map":"bloodgulch","gametype":"ctf","players":5,"max_players":16,
"teams":true,"in_progress":true,"open":true,"dedicated":true,"network_version":38,"kind":0}
```
`gametype` is the game engine's name (`ctf`, `slayer`, `oddball`, `king`,
`race`, or `none`), `kind` the OpenCE gametype's kind the host sends (0 for
none), `open` whether it takes players now.
The release has a `halo-server` script beside `halo`, which runs
`halo --server` with its arguments.
## Exit codes and signals
| Code | Meaning |
| --- | --- |
| 0 | Stopped: `quit`, `sv_stop` (now, or at the end of its drain), SIGTERM or SIGINT |
| 1 | A fatal error in the game (a halt, a map that failed to load); the last error lines were logged. The process exits within 5 seconds of the error, even when what runs at the exit (a hook, a listing's withdrawal) does not return |
| 2 | No usable game data: `maps/ui.map`, or every rotation map, missing or not a cache file; nothing was bound |
| 3 | Bad server configuration: no rotation entry that can be played (and `server.rotation_fallback` off), `server.web_port` past 65535, a web port the server may not bind (a port below 1024 without the right to it) or whose `server.web_bind` is an address the machine does not have, or a web password (admin, moderator or viewer) shorter than 8 characters with the web port bound beyond loopback (on loopback, a warning), or the owner's (`server.web_owner_password`) shorter than 8 wherever it is bound; `--keygen` or `--sign` failing. An entry that cannot be played (a bad gametype file among them) is left out with a warning: the server stops only when none is left |
| 4 | A port in use: the tunnel's UDP port, or the web port (another program listens on it) |
| 5 | Restart asked for (`sv_restart`, now or at the end of its drain, or an update installed: `server.auto_update = "install"` installs a new release once the server has been empty for 10 minutes, on a thread of its own: the server goes on meanwhile, and stops with 5 once it is empty again (a player who joined during the install plays on). An install that fails is tried again at the next check, 6 hours on) |
| 128 + n | Stopped by signal n: a second SIGTERM or SIGINT, or the shutdown not done 5 seconds after the first |
SIGTERM and SIGINT stop the server: a game in progress goes to its
postgame, every machine is told, the listings are withdrawn, and it exits 0.
SIGHUP reloads the server's settings, the rotation and the gametype files
(`sv_reload`). SIGUSR1 prints the status on standard output. SIGPIPE and
SIGTTIN are ignored.
## Standard output
One line per event, for the operator and the panel:
```
2026-10-19T18:03:11Z INFO server: ready (tunnel 2302/udp, web 127.0.0.1:8080, listing public)
2026-10-19T18:03:40Z INFO player: Milenko joined (slot 0, machine 1)
2026-10-19T18:04:02Z INFO game: started: CTF on bloodgulch, 2 players
```
The fields are the time (UTC), the level (`INFO`, `WARN`, `ERROR`), the
category (`server`, `lobby`, `game`, `player`, `chat`, `moderation`, `net`,
`master`, `console`, `health`) and the text. `server: ready` is printed once,
when the lobby is open and, for a public server, its listing has been
published (or 10 seconds on, as the brokers are other people's): it is the
line a panel waits for. With `server.log_format = "json"` each line is an
object instead, and the line a panel waits for holds `"msg":"ready (`:
```json
{"time":"2026-10-19T18:03:11Z","level":"info","cat":"server","msg":"ready (tunnel 2302/udp, ...)"}
```
Every line is also kept in the log the web's viewers read (`/api/log`,
`sv_log`, the RCON's `log` events), but for these, which go to standard
output alone: the web password a first start makes, the invite (a
private server's lets anyone in; `/api/status` gives it to admins), and
the owner's console, the commands typed on standard input or read from the
init file and what they answered (a password's command is shown as `(a
password's command)` there too).
A health line comes once a minute: `health: players=3 frame_ms_max=4.1
frame_ms_avg=1.20 cpu=2.1% rss=96MB` (the longest and the mean frame of
the last minute, in milliseconds). Standard error keeps the platform
layer's `halo-linux:` lines, and `debug.txt` everything, as for a player's
game.
## Commands
The same commands come from standard input, `server.init_file` (run once at
the start, a command a line, `#`, `;` and `//` starting comments), the telnet
console (`debug.telnet_console`, loopback), the RCON, `POST /api/command`
and the web page. Each runs on the game's thread between frames. Every
command has a role; a caller may run it if their role is that one or above:
**viewer** < **moderator** < **admin** < **owner** (standard input, the
init file and the telnet console are the owner's: whoever holds the
process; so is a sign-in to the web or the RCON with
`server.web_owner_password` from the machine itself: "Signing in"). When
standard input ends and `server.console_exit_on_eof` is on, its last line
runs, whether or not a line's end ended it, and then the server stops.
A `<player>` is a slot number (`sv_players` lists them) or the start of a
name; a name that begins more than one player's is refused. A `<duration>`
is a number and a unit (`45s`, `30m`, `2h`, `7d`, `1w`), a bare number of
minutes, or `forever`; ten years at most. A word in quotes (`"two words"`)
is one word.
A command's text (a notice, a reason, `sv_set`'s value, a name) is kept to
printable ASCII: control characters (a line's end, a tab) and other bytes
outside it are dropped, as are the quotes around the whole text, and
standard input's and the init file's lines are cleaned so before they run.
The web is stricter where it takes a value as it is: `PUT /api/settings`
refuses a value with a control character (`schema`), and nothing is changed
for that setting. A command's reply is sent whole, however many lines.
Commands that are not the server's (the game's own console commands, the
scripts' globals and functions) need the owner role: from the web or the
RCON they are refused (`not a command of the server's`) but to the owner's
session. The server's
commands come first, so `kick` and `ban` are always the server's below, not
the game's console commands of those names.
| Command | Role | What it does |
| --- | --- | --- |
| `help [command]` | viewer | The commands, or one command's use |
| `sv_status [--json]` | viewer | The server's state, map, gametype, players, uptime, games played, network version, listing and next game |
| `sv_players [--json]` | viewer | Each player's slot, name, team, score, kills, deaths, assists, ping and machine; with the owner role or `server.log_addresses`, their address and hardware id |
| `sv_rotation` (`sv_mapcycle`), `sv_maps`, `sv_gametypes`, `sv_version`, `sv_log [n]` | viewer | Lists: the rotation, the maps there are, the gametypes, the build, the log's last n lines |
| `sv_bans` (`sv_banlist`), `sv_settings` | admin | Lists: the bans of `bans.txt`, the settings `sv_set` changes |
| `sv_masters`, `sv_publisher` | viewer | The master servers and how each answered; the publisher key's id and public key (never its seed) |
| `say <text>` (`sv_say`) | moderator | A notice on every machine's screen |
| `tell <player> <text>` | moderator | A notice on one player's machine |
| `kick <player>` (`sv_kick`) | moderator | Drops the player's machine; it may join again |
| `ban <player> [<duration>] [<reason>]` (`sv_ban`) | moderator (a day at most), admin | Drops the player's machine and bans its address and hardware id, for the duration (else for ever). A moderator must give a duration of a day or less: a ban for ever, or longer, is refused |
| `unban <number\|address\|hardware id>` (`sv_unban`) | admin | Takes a ban out of `bans.txt`; the machine may join again at once, by the LAN or the internet |
| `sv_ban_address <address\|hardware id> [<duration>] [<reason>]` | admin | Bans an IPv4 address (`a.b.c.d`) or a hardware id (up to 32 hex digits), its machine here or not: its line in `bans.txt` as `ban` writes it (the other part `none`), so that `sv_bans`, `unban` and `GET /api/bans` see it, and a machine present of that address or hardware id is dropped as `ban` drops it (`player_left`'s reason `banned`). Answers `ban <n> added` (`n`: its number in `sv_bans`) |
| `mute <player> [<minutes>]`, `unmute <player>` | moderator | The host's mute of a player's chat and voice for everyone |
| `sv_map <map> [<gametype>]`, `sv_map <entry>` | moderator | Plays that game (or a rotation entry, `map:gametype+rule=value`; a co-op one too), below |
| `sv_map_next` (`sv_next`) | moderator | Ends the game without its scores and plays the rotation's next |
| `sv_end_game` | moderator | Ends the game: its scores, then the next |
| `sv_rotation_set <entries>`, `sv_rotation_add <entry>`, `sv_rotation_del <n>`, `sv_rotation_begin [<n>]` (`sv_mapcycle_add`, `_del`, `_begin`) | admin | Changes the rotation (written to `server.rotation`, 4096 characters at most) |
| `sv_set <setting> <value>` | admin | Changes one of the server's settings, now where it can be, and in `config.toml` (below); a setting its environment variable sets is refused. A value is 256 characters at most |
| `sv_name <name>`, `sv_maxplayers <n>`, `sv_password [<password>]`, `sv_public <0\|1>`, `sv_motd <text>` | admin | `sv_set` of `server.name`, `server.max_players`, `server.password`, `server.public`, `server.motd` |
| `sv_reload` | admin | Reads `config.toml`'s server settings, the rotation and the gametype files again (as SIGHUP) |
| `sv_stop [now\|game\|empty] [<notice>]`, `sv_stop cancel` | owner | Stops the server (exit code 0): `now` (the default) as `quit` does; `game` once the game being played is over, `empty` once nobody plays (a drain, below); `cancel` the drain waiting. The notice is said to every machine first |
| `sv_restart [now\|game\|empty] [<notice>]`, `sv_restart cancel` | owner | As `sv_stop`, with exit code 5 (restart me) |
| `quit` (`exit`) | owner | Stops the server (exit code 0) |
`sv_map`'s game is played as soon as it can be, and its answer says when:
`next: <entry> (now)` in the lobby before its start was sent (the lobby
takes the entry, and the rotation's entry it replaced is played after it),
`(now: this game ends)` while a game is played (it ends at once, without
its scores), and `(once this game is over)` once the lobby's start was sent
or while a map loads (it is the next game). `sv_map` of the game being
played plays it again. The rotation goes on after it.
A drain (`sv_stop` or `sv_restart` with `game` or `empty`, `POST
/api/stop`) is a stop that waits: the listings are withdrawn as `sv_public
0` withdraws them (a new invite, the masters told), without the setting
changing; new machines are refused as while a map loads (the game is not
open: the LAN's search shows it closed, a join by the invite is told the
game is not open); then the server stops. With `game` it stops once no
game is played nor about to be: at once in the lobby with nobody in it, or
with no countdown running (fewer players than `server.min_players`);
otherwise once the game played (or about to start) is over and its
postgame shown. With `empty` it stops once nobody is on the server (at once
if nobody is now). `sv_stop cancel` (or `sv_restart cancel`) ends the
drain: the server is listed again as `server.public` says and takes new
players. A `drain` event says each (`after`: `now`, `game`, `empty` or
`cancel`), and the stop that ends a drain has the `shutdown` reason
`drained`. `/api/status`'s `drain` is the drain waiting, or `null`.
A co-op entry (`<level>:coop`) is ended as a game is: by `sv_end_game`,
`sv_map_next`, `sv_map`, `server.empty_seconds` and `server.idle_minutes`.
It has no scores: the server goes back to the lobby at once (no postgame),
and a level won ends it with `game_ended`'s reason `score`.
`sv_set` (and the settings of the web page, `PUT /api/settings`) changes
these settings, which `sv_settings` and `GET /api/settings` list:
`server.name`, `server.max_players`, `server.min_players`,
`server.password`, `server.public`, `server.rotation_fallback`,
`server.lobby_seconds`, `server.postgame_seconds`, `server.empty_seconds`,
`server.idle_minutes`, `server.team_start`, `server.motd`,
`server.frame_rate`, `server.web_password`,
`server.web_moderator_password`, `server.log_format`,
`server.log_addresses`, `server.status_file`, `server.auto_update`,
`server.coop_difficulty`, `server.region`, `server.master_publish`,
`server.chat_filter`, `server.chat_filter_slurs`, `server.chat_filter_swearing`,
`server.chat_filter_insults`,
`server.master_publish_address`, `server.metrics`, and `network.text_chat`,
`network.voice_lobby`, `network.voice_mode`, `network.voice_kbps`,
`network.votekick`, `network.votekick_minutes`,
`network.votekick_ban_minutes`, `network.map_share`,
`network.map_share_upload`, `network.public_address`,
`network.coop_friendly_fire`, `network.coop_player_collisions`,
`network.coop_ally_friendly_fire`, `network.shield_effects` and
`network.fire_origins`. Of them,
`server.status_file`, `server.auto_update` and `server.log_addresses` need
the owner role: from the web's admin, `sv_set` of one of them (`POST
/api/command`) answers `403 forbidden`, and `PUT /api/settings` leaves it
out, in its `errors` with the code `forbidden` and the message `<setting>
needs the owner role (the server's console)`; the owner's session changes
them both ways. A web password is empty or
8 characters or more. A value outside a setting's choices or range is
refused (`400 failed` from `sv_set`, `schema` in `PUT /api/settings`'s
`errors`), with `<setting> takes a whole number from <min> to <max>` (or
`from <min>`) or `<setting> is one of <a>|<b>|<c>`; a choice may be given
in either case, and is kept as the table spells it:
| Setting | Choices or range |
| --- | --- |
| `server.max_players` | 2 to 127 |
| `server.min_players` | 1 to 16 |
| `server.lobby_seconds`, `server.postgame_seconds` | 0 to 300 |
| `server.empty_seconds`, `server.idle_minutes` | 0 or more |
| `server.frame_rate` | 30 to 120 |
| `server.team_start` | `one`, `both`, `skip` |
| `server.log_format` | `text`, `json` |
| `server.auto_update` | `off`, `check`, `install` |
| `server.coop_difficulty` | `easy`, `normal`, `hard`, `impossible` |
| `network.text_chat` | `on`, `links`, `off` |
| `server.chat_filter` | `off`, `censor`, `block` |
| `server.chat_filter_slurs`, `server.chat_filter_swearing`, `server.chat_filter_insults` | `off`, `severe`, `strong`, `mild` |
| `network.voice_mode` | `off`, `team_proximity`, `team_enemy_proximity`, `team_global`, `team_global_enemy_proximity` |
| `network.voice_kbps` | 8 to 64 |
| `network.votekick_minutes` | 0 to 60 |
| `network.votekick_ban_minutes` | 1 to 1440 |
| `network.map_share_upload` | 16 to 20480 |
| `network.coop_friendly_fire` | `off`, `on`, `shields_only`, `explosives_only` |
| `network.shield_effects` | `stock`, `glow`, `light_show`, `overshield`, `glow_overshield`, `light_show_overshield`, `players` |
A dedicated server may also keep words out of its chat and its players'
names (`server.chat_filter`, off by default): the words of streamer mode's
list, by group, each group from the least severity its setting names
(`server.chat_filter_slurs`, `mild` by default: every slur;
`server.chat_filter_swearing` and `server.chat_filter_insults`, `off`).
`censor` shows a line's words as stars to everyone; `block` refuses the
line (its sender is told "Your line was not sent: it has words this server
does not allow") and refuses at the door a machine whose player's name has
them, which an updated game shows as "The host refused: your player name"
(an older one says the game is closed). Each is logged (`chat filter: …`,
`refusing a machine … its name has words the server's filter keeps out`).
Links are `network.text_chat`'s, refused by default. A list of words is
not a moderator: spaced letters and look-alikes get past it.
A dedicated server's text chat is its `network.text_chat`'s, listed or
not: `on` by default (lines with links refused), `links`, or `off`, live
(`sv_set network.text_chat off`). A game a player hosts has no text chat
while it is listed in the server browser; a dedicated server is the
exception, and the players who join it from the browser's dedicated servers
have the chat as it says, as long as a master server lists it (the
masters' word that it is an approved operator's; a listing's own flag is
not enough, so a dedicated server listed by the brokers alone, before its
operator is approved, has none for them).
The settings `sv_set` does not change (`server.web_viewer_password`,
`server.web_owner_password`, `server.web_port`, `server.web_bind`, `server.web_trusted_proxy`, the
paths, the master servers' files...) are changed in `config.toml` or their
environment variables: `sv_reload` reads the file's `server.*` settings
again, and the web port and its address are bound once, at the start. The
rotation is changed by the `sv_rotation_*` commands.
## HTTP
The server listens on `server.web_port` (8080; 0 for none) at
`server.web_bind` (`127.0.0.1`, an IPv4 address). Bound beyond loopback,
every web password that is set (admin, moderator, viewer) must have 8
characters or more, else the server exits with code 3; the owner's
(`server.web_owner_password`) must have 8 or more wherever the port is
bound. The page (`/`), the API
(`/api/...`), the RCON (`/ws`), `/healthz` and `/metrics` share the port.
Requests are HTTP/1.1 (or 1.0), `GET`, `HEAD`, `POST`, `PUT` or `DELETE`
(`HEAD` is answered as `GET` is, without the body, and counts as a read,
as a `GET`; `/api/login` takes `POST` alone), a head of 8 KB at most whose
lines end with CRLF (a bare LF, a CR inside a line, or more after the empty
line that ends it: `400 bad_request`) and a body of 64 KB at most, sent within 10 seconds of the
connection's opening or of its last answer (a connection that sends
nothing is closed then too). `Transfer-Encoding` and `Expect` are refused.
24 connections are taken at once; when they are all taken, the oldest that
waits for a request (no RCON, no request being answered) is closed for a
new one. A client that does not read its answers is read no further once
256 KB of them wait, and is closed past 2 MB.
Every request but `/healthz` counts against its address's allowance, the
page's files, `/metrics`, a sign-in and the RCON's upgrades (`/ws`) too: 60
a minute, or 600 with a session (429 `rate_limited` past it, with
`Retry-After: 60`). Behind `server.web_trusted_proxy`, a request's address
is the last entry of its `X-Forwarded-For` (the one the proxy appended: an
IPv4 address, `a.b.c.d` or `a.b.c.d:port`, or an IPv6 one, `v6`, `[v6]` or
`[v6]:port`), and its `X-Forwarded-Host` and `X-Forwarded-Proto` are
believed, whether or not it sends `X-Forwarded-For`; from any other
address they are ignored. IPv6 clients are counted by their /64: one
host's addresses share its allowance and its lockouts. Every answer is JSON
(`Content-Type: application/json`) unless said, with
`Cache-Control: no-store`, `X-Content-Type-Options: nosniff`,
`Referrer-Policy: same-origin` (under `no-referrer` a browser would send
the page's own changes with `Origin: null`) and
`Content-Security-Policy: default-src 'self'; frame-ancestors 'none'`.
### Signing in
`POST /api/login` with `{"password":"…"}` answers
`{"ok":true,"token":"<64 hex>","role":"admin","csrf":"<32 hex>","expires":<unix seconds>}`
and sets the cookie `opence_session=<token>; HttpOnly; SameSite=Strict;
Path=/`, with `Secure` when the request came through
`server.web_trusted_proxy` with `X-Forwarded-Proto: https` (never from
another address, whatever it says). The admin password
(`server.web_password`) gives the admin role, the moderator password
(`server.web_moderator_password`) the moderator role, the viewer password
(`server.web_viewer_password`) the viewer role; `{"by":"…"}` beside the
password names who signed in, in the log. A session lasts 12 hours, or 30
minutes without a request (the RCON's messages do not count: a page left
open asks `GET /api/session` now and then); 16 are kept at most, of every
role.
The owner's password (`server.web_owner_password`, empty by default: none)
gives the owner role, for a supervisor on the server's own machine (a
fleet's agent, a panel's daemon): what standard input may do, over the
API and the RCON (`quit`, `sv_stop`, `sv_restart`, `POST /api/stop`, the
owner's settings by `sv_set` and `PUT /api/settings`, the game's own
console commands by `POST /api/command`, the players' addresses and
hardware ids in `/api/players` and the events). It signs in only when the
connection's own peer address is in `127.0.0.0/8` and is not the trusted
proxy's: never by `X-Forwarded-For`, and never through
`server.web_trusted_proxy`, even one on the machine itself. From any other
address the right owner's password is refused with `403 forbidden` (the
RCON's `auth`: `{"code":"forbidden"}`, and the connection closes 1008),
and counts toward the address's lockout as a wrong password does. An
owner's session is used from the machine itself alone, as it was begun
(from elsewhere its token is no session: `401`, the RCON's `auth` with it
`denied`). A password that is also another role's gives the owner role
from the machine itself and the other role from elsewhere: give the owner
a password of its own.
A script passes `Authorization: Bearer <token>`. The page passes the
cookie, and on every request that changes something the header
`X-CSRF-Token: <csrf>`; the `Origin` of such a request (and of the
WebSocket's) must be the server's own. An `Origin: null` is taken only
when the browser's `Sec-Fetch-Site` says `same-origin`.
`POST /api/logout` ends the session (with the `X-CSRF-Token` by the
cookie; `GET` answers 405). `GET /api/session` answers
`{"ok":true,"role":…,"csrf":…,"expires":…}`, or 401.
When `server.web_password`, `server.web_moderator_password`,
`server.web_viewer_password` or `server.web_owner_password` changes
(`sv_set` and the settings change the first two; `sv_reload` reads any of
them from `config.toml`), the sessions of its role end and that role's RCON
connections close (1008, `the password changed`).
Five wrong passwords from an address (an IPv6 one's /64) in 10 minutes
lock it out for 10 minutes (429), and no more than 30 passwords a minute
are checked in all. `/api/login` takes `POST` alone (any other method:
405).
### Errors
```json
{"ok":false,"error":{"code":"forbidden","message":"needs the admin role"}}
```
| Status | Codes |
| --- | --- |
| 400 | `bad_request`, `schema` (a field missing or out of range), `failed` (the command ran and failed: its lines in `lines`), `rejected` (rotation entries: `rejected[]`), `invalid` (a gametype file: `line`) |
| 401 | `denied` (no session, or a wrong password) |
| 403 | `forbidden` (the role; the owner's password from beyond the machine), `csrf`, `origin` |
| 404 | `not_found` (also a command that is not one, a player or a ban that is not there) |
| 405 | `method` |
| 409 | `pinned` (a setting its environment variable sets), `changed` (a player's action whose slot holds another player now: the current name in `name`, nothing done) |
| 413 | `too_large` |
| 426 | `bad_request` (the WebSocket's version is not 13) |
| 429 | `rate_limited`, `locked` (with `Retry-After`) |
| 500 | `internal` (out of memory, a file that cannot be written) |
| 503 | `loading` (the game did not answer in 20 seconds, as while a map loads; with `Retry-After: 5`), `starting`, `busy` (8 RCON connections already; with `Retry-After: 5`) |
### Endpoints
| Method, path | Role | Body → answer |
| --- | --- | --- |
| `GET /healthz` | none | `200 {"state":"lobby"}` (or `loading`, `playing`, `postgame`) while the server hosts and its frames run; `503` with `{"state":"starting"}`, `{"state":"stalled"}` (no frame for a minute) or the other state otherwise |
| `GET /metrics` | none (`server.metrics`) | Prometheus text |
| `GET /api/status` | viewer | The status (below) |
| `GET /api/players` | viewer | `{"ok":true,"players":[<player>…]}` (with `address` and `hwid` for the owner, or every role with `server.log_addresses`) |
| `POST /api/players/{slot}/kick` | moderator | `{"name":"<the player's name, checked>"}` → `{"ok":true,"lines":[…]}`, or `409 changed` when the slot holds another player |
| `POST /api/players/{slot}/ban` | moderator | `{"name":…,"duration":"1d","reason":"…"}` (no duration: for ever, which a moderator's ban cannot be: `400 failed`) |
| `POST /api/players/{slot}/mute` | moderator | `{"name":…,"minutes":10}` |
| `POST /api/players/{slot}/unmute` | moderator | `{"name":…}` |
| `POST /api/players/{slot}/tell` | moderator | `{"name":…,"text":"…"}` |
| `POST /api/say` | moderator | `{"text":"…"}` |
| `GET /api/rotation` | viewer | `{"ok":true,"index":0,"entries":[<entry>…],"next":<entry>}` |
| `PUT /api/rotation` | admin | `{"entries":["bloodgulch:ctf",…]}` → the rotation, or `400 rejected` with `"error":{…,"rejected":[{"index":1,"entry":"…","reason":"…"}]}` and nothing changed |
| `POST /api/rotation/next` | moderator | `{}`: `sv_map_next` |
| `POST /api/rotation/play` | moderator | `{"map":"…","gametype":"…"}`: `sv_map` (a map or gametype that cannot be played: `400 failed`) |
| `GET /api/gametypes` | viewer | `{"ok":true,"builtin":["slayer",…],"schema":{"fields":[<field>…]},"files":[{"name":…,"base":…,"description":…,"error":null}]}` (`builtin`: the Xbox's gametypes, then OpenCE's; a file that cannot be read has `base` and `description` empty and `error` saying why) |
| `GET /api/gametypes/{name}` | viewer | `{"ok":true,"name":…,"text":"<the TOML>"}` |
| `PUT /api/gametypes/{name}` | admin | `{"text":"<TOML>"}` → `{"ok":true}`, or `400 invalid` with `line` and `message` (a name is `a`–`z`, `0`–`9`, `_` and `-`, 32 at most) |
| `DELETE /api/gametypes/{name}` | admin | `{"ok":true}` |
| `GET /api/maps` | viewer | `{"ok":true,"maps":[{"name":"bloodgulch","level":"levels\\test\\bloodgulch\\bloodgulch","kind":"xbox","title":"Blood Gulch"}…]}` (`kind`: `xbox` or `custom`; `title` is the map's display name, else its `name`) |
| `GET /api/bans` | admin | `{"ok":true,"bans":[{"n":0,"when":"2026-10-19 18:00:00","ip":"…","hwid":"…","players":"…","reason":"…","until":<unix>\|null}…]}` |
| `POST /api/bans` | admin | `{"ip":"203.0.113.5","hwid":"…","names":"…","duration":"1d","reason":"…"}` (`ip` or `hwid`, or both; the rest may be left out: no duration is for ever) → `{"ok":true,"n":<the new ban's number in GET /api/bans>}`: `sv_ban_address`, a machine present of the address or the hardware id dropped; `400 schema` for an address that is not IPv4, a hardware id that is not hex, a duration that is not one |
| `DELETE /api/bans/{n}` | admin | `{"ok":true}` |
| `GET /api/settings` | admin | `{"ok":true,"settings":[<setting>…]}` |
| `PUT /api/settings` | admin | `{"server.name":"…","server.max_players":16,"server.public":true,…}` (a value as JSON, a boolean, a number or a string, or its text: `"true"`, `"16"`; `null` empties it) → `{"ok":true,"applied":["server.name"],"errors":[{"name":…,"code":…,"message":…}]}`; each setting is changed or refused on its own |
| `POST /api/command` | the command's | `{"line":"sv_status"}` (511 characters at most) → `{"ok":true,"lines":["…"]}`, or a refusal (`failed`, `forbidden`, `not_found`, `pinned`) with the command's `lines` |
| `POST /api/stop` | owner | `{"after":"now\|game\|empty","notice":"…","restart":false}` (`notice` and `restart` may be left out) or `{"cancel":true}` → `{"ok":true,"lines":["…"]}`: `sv_stop` (`sv_restart` with `restart`) `after notice`, or `sv_stop cancel` (`400 failed` with no drain waiting); `400 schema` for another `after` |
| `GET /api/log?after=<n>&limit=<m>` | viewer | `{"ok":true,"lines":[{"n":12,"time":<ms>,"level":"info","cat":"game","text":"…"}…],"next":12,"missed":0}` (`limit` 1 to 1024, 256 by default; the chat's lines for admins only) |
| `GET /api/events?after=<seq>` | viewer | `{"ok":true,"events":[<event>…],"next":<seq>,"missed":0}` (`player_joined` and `player_left` with `address` and `hwid` for the owner, or every role with `server.log_addresses`) |
| `GET /ws` | | The RCON (below) |
| `GET /`, `/app.js`, `/app.css`, `/icon.svg` | none | The page (`server.web_ui`) |
`next` is the `after` of the next request: the last line's `n` (or event's
`seq`) read. An `after` past the latest (as after a restart) reads from the
start. `missed` counts lines or events that left the ring (2048 lines, 512
events) before they were asked for.
### The status
```json
{"ok":true,"time":1760900000123,"name":"OpenCE Server","state":"playing",
"build":"build-206","network_version":38,"uptime":3600,"games_hosted":4,
"map":"bloodgulch","level":"levels\\test\\bloodgulch\\bloodgulch","gametype":"ctf","variant":"CTF","teams":true,
"players":5,"max_players":16,"machines":5,"countdown":-1,"game_seconds":312,"team_scores":[2,1],
"listing":{"online":true,"public":true,"password":false,"invite":"halo://join/…"},
"rotation":{"index":0,"count":3,"next":{"text":"sidewinder:team_slayer","map":"sidewinder","gametype":"team_slayer"}},
"frame_ms_max":4.1,"frame_ms_avg":1.2,"tick_ms_avg":1.2,
"masters":[{"url":"https://master1.example.org","listed":true,"probe":"ok","code":"","message":"","updated":1760899990}],
"update":{"available":false,"build":""},
"drain":null,
"pid":4021,"started":1760896400,"instance":"eu-1","region":"eu","tunnel_port":2302,
"publisher_key_id":"3f9a2c7d1e5b8a04","web_port":8080,
"capabilities":["events","status","rotation","settings","bans","owner_web","ban_address","stop","event_addresses","identity"]}
```
`state` is `waiting` (the menus settling), `hosting` (making the game),
`lobby`, `loading`, `playing`, `postgame` or `stopping`. `countdown` is the
lobby's seconds left, `-1` when it is not counting. `team_scores` is `null`
in a game without teams. `frame_ms_max` and `frame_ms_avg` are the longest
and the mean frame of the last minute (`tick_ms_avg` is the mean again, for
older readers). `invite` is given to admins only (empty for others). An entry of the rotation is
`{"text":"sidewinder:team_slayer+score=50","map":"sidewinder","gametype":"team_slayer","rules":{"score":50},"rejected":null}`
(`rejected` is why it cannot be played, else `null`). `drain` is the
drain waiting (`sv_stop game`...), `{"after":"game","restart":false,"since":<unix
seconds>}`, else `null`. `pid` is the server's process, `started` when it
started (seconds since 1970), `instance` the name the master servers know
it by (`server.instance`, else the slug of `server.name` they are given),
`region` `server.region`, `tunnel_port` the tunnel's UDP port
(`network.tunnel_port`; 0 when `network.online` is off), `publisher_key_id`
the publisher key's id (16 hex digits; empty without a key: `sv_publisher`)
and `web_port` `server.web_port`. `capabilities` is the RCON's hello's. The rotation's
`index` (in the status and `GET /api/rotation`) is the entry being played,
`-1` while an `sv_map` game is played or before the first lobby; `next` is
the entry after the one played last (the first while none has been).
A player is
`{"slot":0,"name":"Milenko","team":0,"score":3,"kills":3,"deaths":1,"assists":0,"ping":42,"machine":1,"joined":1760899000,"muted":false}`;
with the owner role, or `server.log_addresses`, also
`"address":"203.0.113.5","hwid":"…"`. `team` is 0 (red), 1 (blue) or -1
(no teams); `ping` is in milliseconds, `null` when it is not known yet.
`client` is the player's machine's build as its game tells it (shortly
after it joins), for every role:
`{"build":282,"flavor":"release","version":"OpenCE Linux | build 282 (release)","repository":"OpenCommunityEdition/OpenCE","mods":["trollface 1.0"]}`
(`build` 0 for a build CI did not number, `repository` empty when the build
does not know it, `mods` the mods it plays in their load order, each its
folder and its version), or `null` from a game that does not tell it. It is
what the player's game says, which a changed build can make anything.
A setting is
`{"name":"server.name","type":"string","value":"OpenCE Server","default":"OpenCE Server","comment":"…","env":"HALO_SERVER_NAME","pinned":false,"secret":false,"choices":null,"min":null,"max":null}`;
`type` is `boolean`, `integer`, `real` or `string`, and `value` and
`default` are of that type in JSON (`true`, `16`, `"OpenCE Server"`); a
reader should also take their text (`"true"`, `"16"`), which older servers
sent. `choices` lists a word setting's words, `min` and `max` bound a
number's, each `null` where there is none (the table above). `env` is
`null` for a setting no environment variable sets. A secret one (the
passwords) has `value` and `default` empty and `"set":true` when it is
set. `pinned` is a setting
its environment variable (`env`) sets: it cannot be changed.
A gametype schema field is
`{"key":"score_to_win","alias":"score","table":"universal","engine":"all","type":"integer","min":0,"max":999,"choices":null,"default":null,"description":"…"}`
(`table`: the gametype file's table it goes in, `universal`, `options`,
`ctf`, `slayer`, `oddball`, `king` or `race`; `engine`: `all`, or the game
engine whose table it is; `type`: `integer`, `boolean` or `choice`).
## The RCON
`GET /ws` with `Upgrade: websocket` and the subprotocol `opence-rcon-1`.
Every frame is text holding one JSON object. The server speaks first:
```
→ {"type":"hello","protocol":1,"server":"OpenCE Server","build":"build-206","network_version":38,
"capabilities":["events","status","rotation","settings","bans","owner_web","ban_address","stop","event_addresses","identity"]}
← {"type":"auth","password":"…","by":"paul"} or {"type":"auth","token":"<session token>"}
→ {"type":"auth","ok":true,"role":"admin"}
→ {"type":"auth","ok":false,"error":{"code":"denied"}} and the connection closes (1008)
← {"type":"command","id":1,"line":"kick Milenko"} or {"type":"command","id":1,"command":"say","args":["two words"]}
→ {"type":"reply","id":1,"ok":true,"lines":["Milenko kicked by the host"]}
→ {"type":"reply","id":2,"ok":false,"lines":["…why…"]} (the command ran and failed)
→ {"type":"reply","id":3,"ok":false,"lines":[],"error":{"code":"busy","message":"…"}} (not run)
← {"type":"subscribe","events":["player","chat","game","moderation","status","log","master"],"after":1830}
→ {"type":"event","seq":1831,"time":1760900000123,"event":"player_joined","slot":3,"name":"Milenko",…,"replay":true}
→ {"type":"event","seq":1831,"time":…,"event":"status","status":{…the status…}} (at the subscribe, then every 2 s)
→ {"type":"event","time":…,"event":"log","n":5120,"level":"info","cat":"game","text":"…"} (no seq: n is its sequence)
← {"type":"ping"}
→ {"type":"pong"}
→ {"type":"overflow"} and the connection closes (1013): the client read too slowly
→ {"type":"error","id":…,"error":{"code":"…","message":"…"}} (an unknown type, a malformed message)
```
A connection signed in with the page's cookie (on the same origin) needs no
`auth` message: its `hello` is followed by `{"type":"auth","ok":true,…}`.
The `capabilities` say what the server has beyond the first release's
(`events`, `status`, `rotation`, `settings`, `bans`): `owner_web`,
`ban_address`, `stop`, `event_addresses` and `identity` ("Panels and
fleets"); a client checks for one before it uses it. The owner's password
signs in from the server's own machine alone ("Signing in").
A command is a `line`, or a `command` and its `args`, which the server
joins with spaces, quoting an argument that holds a space or is empty (511
characters in all at most). Ids are the client's (a number or a string),
echoed in the reply; each command gets exactly one reply. A connection
runs one command at a time: a command sent before the last one's reply is
not run. A reply whose command ran has `ok` and the command's `lines`, and
no `error`, whether it succeeded or failed; one that was not run has `ok`
false, no lines and an `error`: `denied` (not signed in), `rate_limited`
(32 commands a second, in bursts of 64), `bad_request` (no command, or too
long), `busy` (another command's reply is awaited) or `loading` (the game
did not answer in 20 seconds; the command may still have run, and is never
sent again by the server). `after` replays the events still in the ring
since that sequence number, marked `"replay":true`. A connection holds 1024
messages for the client at most; 8 connections are taken at once (a ninth
upgrade answers `503 busy`), and each upgrade counts against its address's
allowance (above). The
event groups are `player` (`player_joined`, `player_left`, `map_share`), `chat`
(`chat`), `game` (`lobby_opened`, `countdown`, `game_started`,
`game_ended`, `postgame`, `score`, `kill`), `moderation` (`kick`, `ban`,
`unban`, `mute`, `unmute`, `speed_hack`), `status` (`status`), `log`
(`log`, each log line as `{"n","level","cat","text"}`), `master`
(`master`), and `server` (`server_started`, `reloaded`, `warning`,
`drain`, `shutdown`), which every subscriber gets.
The log's lines of the `chat` category go to the `chat` group, the others
to `log`.
`status` and `log` events go to their subscribers as they come and are
not kept in the ring: `after` does not replay them (`/api/log` reads the
log's own ring). A `status` event's `seq` is the latest event's (no new
number: the same one comes again until another event), and a `log` event
has no `seq`: its `n`, the log line's number and `/api/log`'s cursor, is
its sequence. A client keeps one cursor for the events (`seq`, of the
events of the ring) and another for the log's lines (`n`); a client that
reconnects with `after` may get events it had, and drops those whose `seq`
it has seen (a `status` event is never dropped so).
## Events
Every event has `seq` (rising, never reused while the server runs; a
`status` event has the latest one's, a `log` event none: above), `time`
(milliseconds since the epoch) and `event`:
| Event | Fields |
| --- | --- |
| `server_started` | `name, build, network_version, pid, started, instance, region, tunnel_port, publisher_key_id, web_port` (as the status's), `rotation[]` (the entries' texts) |
| `lobby_opened` | `map, gametype, variant` (the gametype's name as the game shows it), `teams, index` (the rotation's entry) |
| `countdown` | `seconds` (-1: paused) |
| `game_started` | `map, gametype, variant, teams, team_scores[]` (team games), `players[]` |
| `game_ended` | `map, gametype, variant, teams, reason` (`score`, `time`, `idle`, `empty`, `command`, `next`), `duration` (seconds), `team_scores[]` (team games), `players[]` |
| `postgame` | `seconds` |
| `player_joined` | `slot, name, team, machine`; `address, hwid` for the owner, or every role with `server.log_addresses` |
| `player_left` | `slot, name, reason` (`left`; `kicked` and `banned` when the server's `kick`, `ban` or `sv_ban_address` dropped the machine, `banned` for a speed hack's drop too); `address, hwid` (as it joined) as `player_joined`'s |
| `chat` | `channel` (`everyone`, `team`, `vehicle`), `slot, name, text` (admins only; the lines the host sends on) |
| `kill` | `killer, victim` (slots; -1 for none), `weapon` (the killer's weapon's or the killing object's tag name, or null), `friendly_fire` |
| `score` | `map, gametype, variant, teams, team_scores[]` (team games), `players[]` (once a second at most, on a change) |
| `kick`, `ban`, `unban`, `mute`, `unmute` | `name, by, reason?, until?` |
| `speed_hack` | `machine, names, rate, ahead_ticks, action` (`kicked`, or `unverified`: its datagrams alone said so, and it stays) |
| `map_share` | `machine, map, state` (`asked`, `downloading` at each tenth, `downloaded` or `failed` once for each request), `progress` (0 to 100: a percentage already) |
| `warning` | `text` (a newer release, with `server.auto_update`) |
| `reloaded` | `rotation_changed, rejected[]` (`{"entry","reason"}` of each entry left out) |
| `master` | `url, listed, probe, code, message` |
| `drain` | `after` (`now`, `game`, `empty`, `cancel`), `restart` (exit code 5), `notice` (empty for none) |
| `shutdown` | `reason` (`quit`, `sv_stop`, `sv_restart`, `drained`: a drain's end, `signal <n>`, `update installed`, `nothing to play`, `debug.exit_after`), `code` (the exit code) |
Players in events are as in `/api/players` for the viewer role (no
addresses), but for `player_joined` and `player_left`, which carry the
player's address and hardware id (`""` when not known) to the owner, and to
every role when `server.log_addresses` is on (`/api/players`' rule), in the
RCON's events, their replay and `GET /api/events` alike. `variant` is the gametype's name as the game shows it (`Co-op`
in a co-op entry).
## Bans
A ban is a line of `bans.txt` (in `paths.logs`, else the data root). A
timed ban is kept out by its line's `until=` alone, and ends then. A ban
for ever, and a machine dropped for cheating, also keep the machine out
for the rest of the run by its address, its real address or its hardware
id. `sv_ban_address` and `POST /api/bans` write such a line for an address
or a hardware id with no player of it needed (the part not given is
`none`). `unban` takes the line out and readmits the machine by
the line's address or hardware id, whether it joins on the LAN or by
internet play.
## The rotation
`server.rotation` (and `sv_rotation_set`, `PUT /api/rotation`) is a list of
entries, `map[:gametype[+rule=value...]]`, separated by commas, semicolons
or new lines; a line that begins with `#` is a comment (to its line's end,
commas and all). The text is 4096 characters at most (the entries past it
are left out, with a warning), an entry 255 characters and the list 64
entries. `config.toml` keeps a string setting of up to 4096 characters, so
a rotation that long is saved whole and read back after a restart.
- The map is a multiplayer map's name (`bloodgulch`: the Xbox's
`maps/<name>.map`, else a Custom Edition map of `custom_maps`),
`custom_maps\<name>` (a Custom Edition map; `/` is taken for `\`), or a
level's path (`levels\test\bloodgulch\bloodgulch`). A campaign level is
played as co-op only: `<level>:coop`, at `server.coop_difficulty`.
- The gametype (`slayer` when there is none) is a built-in's name
(`slayer`, `team_slayer`, `slayer_pro`, `elimination`, `phantoms`,
`endurance`, `rockets`, `snipers`, `stalker`, `ctf`, `ironctf`,
`ctf_pro`, `invasion`, `oddball`, `team_oddball`, `reverse_tag`,
`accumulation`, `juggernaut`, `king`, `team_king`, `king_pro`,
`crazy_king`, `race`, `team_race`, `rally`, `team_rally`, and Halo PC's
names `ffa`, `ffa_slayer`, `teamslayer`, `tslayer`, `koth`, `team_koth`,
`iron_ctf`, `teamrace`, `teamoddball`), an OpenCE gametype's (`swat`,
`infection`, `gun_game`, `hardcore`, `hardcore_ctf`, `hardcore_oddball`,
`hardcore_king`), a gametype file's name (`gametypes/<name>.toml`), or
`file=<name>` (a gametype a player's game saved, below). A gametype's
name is letters, digits, `_`, `-` and `.`, in any case.
- A rule is a gametype rule's name or its short name (`score`, `time`,
`weapons`, `ff`...; `GET /api/gametypes`'s schema lists them), with a
value it takes; a rule of another game engine than the gametype's is
refused. 48 rules at most; a rule given twice is the last.
An entry that cannot be played (a map that is not there, a bad gametype
file, a rule out of range) is left out with a warning, at the start and at
`sv_reload`; `sv_rotation_set` and `PUT /api/rotation` change nothing when
one of their entries cannot be played.
A change of the rotation (`sv_rotation_*`, `PUT /api/rotation`,
`sv_reload`) keeps its place: the next game is the entry after the one
played last, found again in the new list (the first entry only when none
has been played yet). `sv_reload` takes the rotation again when its text
changed, and also when only its entries' rejections changed (a map or a
gametype file added or taken out since).
`server.team_start` decides how a team game starts. `one` (the default)
starts it with the players of one team. `both` waits, saying nothing,
for a player on each team. `skip`, when one player waits for a team game
that `sv_map` did not ask for, plays the rotation's next entry without
teams instead (if it has one); it is checked when the lobby opens and
again when its countdown would begin. With no entry left, the server
stops with exit code 3 (2 when no rotation map is there), or plays
`bloodgulch:slayer` with `server.rotation_fallback`.
## Gametype files
A gametype file, `gametypes/<name>.toml` (the name `a`–`z`, `0`–`9`, `_`
and `-`), is a built-in or OpenCE gametype (`base`) and rules over it:
```toml
base = "team_king" # the gametype it starts from
name = "Moving Hill" # the name the game shows: 11 characters of printable ASCII
[universal]
score_to_win = 3
[options]
time_limit = 15
friendly_fire = "off"
[king]
moving_hill = true
```
Each rule goes in its table (the schema's `table`): `[universal]`,
`[options]`, and one game engine's, `[ctf]`, `[slayer]`, `[oddball]`,
`[king]` or `[race]`. A file gives each rule its full name
(`vehicle_set`, `team_vehicles`, `score_to_win`): the short names
(`vehicles`, `score`) are the rotation's alone. A file is 64 KB at most.
`deploy/gametypes` has examples. The server reads the `gametypes` folder
beside `config.toml` if there is one, else the data root's, and writes the
web page's files to it.
A gametype a player's game saved is played with `file=<name>`: copy the
saved gametype, as `<name>.gametype`, into the same `gametypes` folder
(beside `config.toml` if there is one, else the data root's).
## The listing
A public server (`server.public`, with `network.online` and
`network.public_lobby`) is published to each master server of
`masters.txt` (`docs/master_protocol.md`). A change that a list shows (the
listing made public or private, a player joining or leaving, the name, the
map) is published within 5 seconds. Made private, the server makes a new
invite and sends the masters a closed publish, which takes it off their
lists;
`network.public_lobby = false` stops the publishing too. A master's
`Retry-After` is kept (a day at most). `key_revoked` and
`publisher_revoked` stop the publishing to that master for the run;
`unknown_key`, `publisher_pending`, `application_denied` and
`listing_taken` are logged once a minute while they last.
## Files
| File | What |
| --- | --- |
| `config.toml` | Every setting (beside the executable; `HALO_CONFIG_FILE`, else `--config`, names another) |
| `init.txt` (`server.init_file`) | Commands run at the start, in the data root unless a full path |
| `gametypes/<name>.toml` | Gametype files: the `gametypes` folder beside `config.toml` if there is one, else the data root's |
| `gametypes/<name>.gametype` | Gametypes saved by a player's game (`file=<name>` in the rotation): the same `gametypes` folder |
| `publisher.key` | The publisher key for the master servers (beside `config.toml`). On Windows, a server's `config.toml` and `publisher.key` are given an access list of their owner alone (the entries inherited for Administrators and SYSTEM taken out) |
| `masters.txt` | The master servers (`server.masters_file`: beside `config.toml`, else beside the executable); one that names none leaves the official master, built in |
| `bans.txt`, `cheaters.txt`, `debug.txt` | In `paths.logs`, else the data root |
| `status.json` (`server.status_file`) | The status, written every 2 seconds |
| A password's file (`HALO_SERVER_WEB_PASSWORD_FILE`, `HALO_SERVER_WEB_OWNER_PASSWORD_FILE`, `HALO_SERVER_WEB_MODERATOR_PASSWORD_FILE`, `HALO_SERVER_WEB_VIEWER_PASSWORD_FILE`, `HALO_SERVER_PASSWORD_FILE`) | A container's secret: when the plain variable is not set, the file's first line (its CR and LF off) is the setting's value, which is then pinned as the plain variable's would be (`sv_set` and `PUT /api/settings` refuse it, `409 pinned`). Read once, at the start; a file that cannot be read is logged, and the setting is `config.toml`'s |
## Releases
Each release has `SHA256SUMS` (the SHA-256 of each of its files, as
`sha256sum` writes them: `<hex> <name>`, written by `tools/ci_build.py
sums`) and `SHA256SUMS.sig`: the Ed25519 signature of that file's exact
bytes by the project's release key, in 128 lowercase hex digits and a
newline (the form `opence-master-server`'s `cmd/release-sign` writes). The
public key is `deploy/release-key.pub` (64 hex digits:
`d04e8b101007d1641cace8b95fcca76f7f44709f6885c3d031b52394dbdf9376`).
`tools/release_sign.sh verify SHA256SUMS` checks the signature (OpenSSL 3),
and `sha256sum -c --ignore-missing SHA256SUMS` the files downloaded. The
build workflow signs with the `RELEASE_SIGNING_KEY` secret (the key's seed,
64 hex digits) and checks the signature against `deploy/release-key.pub`
before it publishes the release.
+650
View File
@@ -0,0 +1,650 @@
# The master servers' protocol, version 1
A master server lists dedicated servers and vouches for who publishes them.
An operator applies to a master once with the public half of an Ed25519
key, the *publisher key*, through the master's Discord bot; once an
approver approves the application, the
operator's servers publish to the master with requests signed by that key,
and the master lists them after probing their UDP port. The game's server
browser fetches each master's list, checks the master's signature with the
key pinned in `masters.txt`, and joins a listed game by the invite in its
listing, as it joins a game heard on the brokers.
A master carries no game traffic: each list entry holds the host-signed
listing the game publishes to the signalling brokers (`p2p_lobby.c`), so
the join path is unchanged and nobody needs the master to be honest about a
game's details.
This document is the contract between the game (the publisher in
`port/linux/src/server_master.c`, the probe's answer, the list client in
`port/linux/src/master_list.c`) and the masters' implementations. The
project's implementation is `opence-master`
(github.com/OpenCommunityEdition/opence-master-server, Go, AGPL-3.0-or-later),
whose `testdata/vectors.json` holds fixed keys and every value this
document derives from them, and whose `tests/conformance` is the test a
master must pass to be an official one. `docs/dedicated_server.md` is the
server's side: its settings, `--keygen` and `--sign`.
## Conventions
| Thing | Form |
| --- | --- |
| Hexadecimal | Lowercase, two digits a byte, no prefix |
| Base64 | The standard alphabet (RFC 4648 section 4) with `=` padding |
| Times | Unix seconds, decimal, UTC |
| JSON | UTF-8; every string the protocol defines is printable ASCII (0x20 to 0x7E) |
| Signatures | Ed25519 as RFC 8032 defines it (with SHA-512): Monocypher's `crypto_ed25519_sign` and `crypto_ed25519_check`, Go's `crypto/ed25519` |
| Transport | HTTPS. A master refuses publishes, key changes and peers' requests over plain HTTP except from loopback |
| Unknown JSON fields | Ignored by both sides, so later versions can add fields |
## Keys and identifiers
| Thing | Definition |
| --- | --- |
| Key file (`publisher.key`, `master.key`) | One line of 64 hexadecimal digits: the Ed25519 seed (32 bytes). Anything after `#` is a comment; blank lines are skipped. Mode 0600 |
| Public key, as text | `ed25519:` and the 32-byte public key in hexadecimal (64 digits) |
| Key id | The first 8 bytes of SHA-256 of the 32-byte public key. Written as 16 hexadecimal digits (`keyid=`, `key_id`, `Signature-Key`); in the probe's packets it is the 8 raw bytes |
| Instance | A name the operator gives each server process (`server.instance`): 1 to 32 characters of `a-z`, `0-9`, `-` and `_`, the first a letter or a digit |
| Server id | The first 16 hexadecimal digits (8 bytes) of SHA-256 of the ASCII text of the key id's 16 hexadecimal digits followed by the instance's text, with nothing between them |
The server id hashes the key id **as its 16 characters of text**, not its 8
bytes. With the vectors' publisher key (RFC 8032's first test seed):
```
seed 9d61b19deffd5a60ba844af492ec2cc44449c5697b326919703bac031cae7f60
public key ed25519:d75a980182b10ab7d54bfed3c964073a0ee172f3daa62325af021a68f707511a
key id 21fe31dfa154a261 (SHA-256 of the 32 key bytes: 21fe31dfa154a261...)
instance main
hashed "21fe31dfa154a261main" (20 ASCII bytes)
server id 4c5f15237c866f6f (SHA-256 of those 20 bytes: 4c5f15237c866f6f...)
```
The same instance under another key is another server id, so a server
keeps its id across restarts as long as it keeps its key and its instance.
A master refuses a public key whose point has a small order (its X25519
form multiplied by a clamped scalar is zero, as `p2p_ed25519_verify`
checks), since anyone can make signatures that verify under one.
`masters.txt` (the one beside `config.toml`, else the one beside the
executable) lists the masters, one per line:
`https://master1.example.org ed25519:<64 hex>`; `#` starts a comment; the
first 4 are used. A file that names none (missing, empty, or comments alone,
as the release's) leaves the official master, built into the game
(`master_list_read_defaults` in `port/linux/src/master_list.c`) and the web
page (`servers.js`):
`https://master.opencommunityedition.com ed25519:89f4eda71229f11f3538679f49ef7fb0c2b407b380093f7f4fe02105b92225aa`.
The web build reads its site's `masters.json` before the official master. The URL is an origin with no path, or a path
the master is served under as it is (a proxy must not rewrite paths, since
the path is signed).
## Signed requests
A publisher's requests carry a detached signature in one header:
```
Authorization: OpenCE-Ed25519 keyid=<16 hex>, ts=<unix seconds>, nonce=<32 hex>, sig=<base64 of 64 bytes>
```
The signature is the key's over the bytes of this string, its parts joined
by single line feeds (0x0A) and no line feed at the end:
```
OpenCE-Master-v1
<the receiving master's key id>
<METHOD>
<PATH>
<ts>
<nonce>
<SHA-256 of the body, in hexadecimal>
```
| Part | Rule |
| --- | --- |
| Master key id | The key id of the master the request is sent to: the first 8 bytes of SHA-256 of the master's list-signing public key (the key pinned for it in `masters.txt`), as 16 lowercase hexadecimal digits. It binds the request to that master: a request signed for one master does not verify at another, even within the replay window. A master checks the signature with its own key id |
| `METHOD` | The request's method in capitals: `PUT`, `DELETE`, `GET`, `POST` |
| `PATH` | The path exactly as the request line sends it, without the query string: `/v1/servers/4c5f15237c866f6f`, `/v1/me`, `/v1/publishers` |
| `ts` | The same decimal text as in the header: no sign, no leading zeros |
| `nonce` | 16 random bytes in hexadecimal (32 digits), new for each request |
| Body hash | Of the exact body bytes sent; an empty body's is SHA-256 of no bytes, `e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855` |
The four parameters come once each, in any order, separated by commas with
optional spaces; a publisher sends them in the order above. The master
checks, in this order, and answers the first failure:
| Check | Failure |
| --- | --- |
| The header parses (scheme, the four parameters and their forms) | `401 bad_signature` |
| `ts` is within 300 seconds of the master's clock | `401 clock` (the body's `master_time` is the master's clock, for the server to log) |
| The key id is a publisher's, or an application's | `403 unknown_key` |
| The signature verifies, for this master's key id | `401 bad_signature` |
| The nonce was not seen with this key in the last 600 seconds | `401 replay` |
Since `unknown_key` is answered before the signature is checked, anyone can
learn whether a key id is known to a master (a publisher's or an
application's) by sending it with any signature. This is a known property
of version 1: key ids are not secret (each is a hash of a public key, which
an operator hands out when applying), and the answer says nothing more of
the key than that the master has seen it.
The vectors' `GET /v1/me` to the vectors' master (key id
`39f713d0a644253f`) at 1760900001 with the nonce
`f0e0d0c0b0a090807060504030201000` signs
```
OpenCE-Master-v1\n39f713d0a644253f\nGET\n/v1/me\n1760900001\nf0e0d0c0b0a090807060504030201000\ne3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
```
and sends
```
Authorization: OpenCE-Ed25519 keyid=21fe31dfa154a261, ts=1760900001, nonce=f0e0d0c0b0a090807060504030201000, sig=duRZ+WKAI8hbvidtC63U1XHxOSoeRN5mcrZvw4qihhlilhZjbVBCLYjsQLr4+F2C1gy6lN9/ixqevFX7dfNGDA==
```
## Publishing
`PUT /v1/servers/{server_id}`, signed, with a JSON body of 16 KB at most.
A server publishes to every master in `masters.txt` every 30 seconds, and
within 5 seconds of a change (the lobby opened, a game started or ended, a
player joined or left, the name or map changed). On shutdown it publishes
`closed: true` (or `DELETE`s) and waits up to 2 seconds.
```json
{"protocol":1,"instance":"main","name":"OpenCE Dedicated","map":"bloodgulch","gametype":"CTF","variant":"CTF",
"players":5,"max_players":16,"teams":true,"in_progress":false,"password":false,"dedicated":true,
"network_version":38,"build":"build-206","region":"eu","tunnel_port":2302,
"listing":"<base64 of the host-signed listing>","closed":false,"serial":412}
```
(The vectors' publish, made at network version 38: "The listing" says
why the examples keep it.) The game's publisher sends `protocol`,
`instance`, `listing` (but in a tombstone), `tunnel_port`, `dedicated`,
`build`, `region` and `variant` when they are set, `address` with
`server.master_publish_address`, `serial` and `closed`; the listing holds
the rest. A server that goes private, or off the internet, sends one more
publish, `closed: true`, to each master that listed it.
| Field | Type | Required | Meaning |
| --- | --- | --- | --- |
| `protocol` | number | yes | 1 |
| `instance` | string | yes | The instance; the path's server id must be the server id of the signing key's id and this instance, else `400 server_id` |
| `listing` | string | yes, but with `closed: true` | Base64 of the exact bytes `listing_make` makes, the bytes the game publishes to the brokers |
| `tunnel_port` | number | yes, unless `address` is given | The UDP port the game's tunnel socket is bound to (`network.tunnel_port`), 1 to 65535 |
| `address` | string | no | `"203.0.113.5:2302"`: an IP address (IPv4, or IPv6 in brackets) and a port to probe instead of the request's source address. Sent only with `server.master_publish_address`; a master serves it in its list only if its own policy allows (`MASTER_SERVE_ADDRESSES`). It must be globally routable (below); a private or loopback address is taken only from a private or loopback source |
| `dedicated` | boolean | no | A dedicated server. Also read from the listing's flag 32, which a dedicated server sets; either makes the entry dedicated. A player's public game, published with the player's publisher key, sends `false` |
| `variant` | string | no | The gametype's name as the server shows it; printable ASCII, cut to 24 |
| `build` | string | no | The game's build (`build-206`); cut to 32 |
| `region` | string | no | Up to 16 of `a-z`, `0-9` and `-` (`server.region`) |
| `serial` | number | no | A whole number the server raises at each change; kept and shown to admins |
| `closed` | boolean | no | `true`: unlist the server now |
| `name`, `map`, `gametype`, `players`, `max_players`, `teams`, `in_progress`, `password`, `network_version` | | no | Informational only: the listing is authoritative. A value that differs from the listing's is ignored, and the answer's `warnings` says so |
The master parses the listing and checks the host's signature (below), and
takes from it the name, the map, the gametype, the players and most
players, the gametype's engine, the game's kind, the open, in-progress,
teams and password flags, and the network version, so a publish cannot
claim more than the host signed. A listing that does not parse or verify
is `400 listing`. So is one whose own time is more than 3600 seconds from
the master's clock. A listing with the same host key and a lower sequence
than the one the master holds is not taken (the newer stays; a warning
says so). A listing with the closed flag unlists the server, as
`closed: true` does.
The master records the request's source address (behind a reverse proxy,
the address its trusted proxy forwards) to probe the server. It keeps the
addresses 7 days at most after a server's last publish, for probes and
abuse handling, and never serves them.
The addresses a master probes and serves are an allowlist of globally
routable unicast addresses: an IPv4 address outside IANA's special-purpose
ranges (`0/8`, `10/8`, `100.64/10`, `127/8`, `169.254/16`, `172.16/12`,
`192.0.0/24`, `192.0.2/24`, `192.88.99/24`, `192.168/16`, `198.18/15`,
`198.51.100/24`, `203.0.113/24`, `224/4`, `240/4`); an IPv6 address in
`2000::/3` outside `2001::/23`, `2001:db8::/32`, `3fff::/20` and
`5f00::/16`; a 6to4 (`2002::/16`) or well-known NAT64 (`64:ff9b::/96`)
address whose embedded IPv4 address is global. An IPv4-mapped address is
judged as its IPv4 address. Everything else (link-local, site-local
`fec0::/10`, unique local, multicast, `64:ff9b:1::/48`, zones) is refused
(`400 schema`, `field: address`), except a private or loopback address
from a private or loopback source (a master on the same network). A
publish from a source address outside the allowlist without `address` is
refused the same way when the master probes.
A listing's host key is published by one publisher at a time: a listing
whose host key is that of a live server of another publisher is refused,
`403 listing_taken`, so a listing's bytes copied from a list cannot be
published by someone else. The same publisher may carry it under another
server id (another key or instance). A host makes a new listing (a higher
sequence) at each of its publishes, so a live server that has taken no newer
listing of its host key for 90 seconds (3 intervals) is replaying a copy:
a publish of a newer listing of that host key takes the host key from it,
and its server is unlisted. A server an admin hid, or whose publisher or key
is not approved, holds no host key. A master shows its admins the publishes
it refused with `listing_taken`, to settle (see "Known limitations").
### The answer
`200` once the publish is taken and the master's decision for now is made;
`202` while the first probe of the server's address is unanswered:
```json
{"ok":true,"server_id":"4c5f15237c866f6f","listed":true,"interval":30,"ttl":90,"probe":"ok","reachable":true,
"observed_address":"203.0.113.5","master_time":1760900000}
{"ok":true,"server_id":"4c5f15237c866f6f","listed":false,"interval":30,"ttl":90,"probe":"pending","reachable":false,
"observed_address":"203.0.113.5","probe_address":"203.0.113.5:2302","master_time":1760900000}
```
| Field | Meaning |
| --- | --- |
| `listed` | Whether the list shows the server now |
| `interval` | Seconds between publishes the master expects (30) |
| `ttl` | Seconds after its last publish that a server is unlisted (90): one lost publish does not unlist it, three do |
| `probe` | `pending` (no answer yet at this address), `ok`, `failed` (three attempts unanswered), `skipped` (an admin marked the server trusted), `off` (the master does not probe) |
| `reachable` | The probe was answered |
| `observed_address` | The address the master saw the request come from |
| `probe_address` | With `pending` and `failed`: the address and port the master probes |
| `hidden`, `reason` | An admin hid the server: it is listed to nobody, and `reason` says why. With `probe: failed`, `reason` is the hint to log: `let UDP port <n> through your firewall or NAT, or set network.public_address` |
| `closed` | `true` after `closed: true`, a tombstone or `DELETE` |
| `warnings` | Body fields the listing contradicts, which were ignored |
| `master_time` | The master's clock |
A server with a failed probe is unlisted unless the master's policy lists
unreachable servers (`MASTER_LIST_UNREACHABLE`), as `reachable: false`.
The server logs each change of outcome once (not every 30 seconds), and
the failed probe's hint once a minute until the probe passes.
`DELETE /v1/servers/{server_id}`, signed by any key of the server's
publisher with an empty body, unlists the server at once and answers
`200 {"ok":true,"server_id":…,"listed":false,"closed":true,…}`; `404
not_found` for a server that is not the publisher's.
### Limits
| Limit | Answer |
| --- | --- |
| A server publishes at most once each 5 seconds, with a burst of 2 | `429 rate_limited` with `Retry-After` |
| 120 publishes a minute per source address, and per key | `429 rate_limited` |
| A body is 16 KB at most | `413 too_large` |
| A publisher has at most its quota of live servers at once (default 4; live: published within `ttl` and not closed) | `403 quota_exceeded` |
| An instance is published by one key of a publisher at a time | `403 instance_taken` (another key's server of that instance is live) |
| A publisher holds at most its quota and 16 server records (one per server id); for a new server id past that, its oldest records that are not live are dropped, and if none can be | `403 too_many_instances` |
## The listing
The listing is `p2p_lobby.c`'s (`listing_make`, `listing_read`), in network
byte order. The master reads it as `listing_read` does and checks its
signature as `listing_signed` does.
| Offset | Size | Field |
| --- | --- | --- |
| 0 | 2 | `"HL"` |
| 2 | 1 | Format: 1 |
| 3 | 2 | Network version (`HALO_PORT_NETWORK_VERSION`, 39 now) |
| 5 | 1 | Flags (below) |
| 6 | 4 | Sequence: the host's count of its listings (the newest wins) |
| 10 | 4 | The host's Unix time when it made the listing |
| 14 | 32 | The host's Ed25519 public key (one per run of the game) |
| 46 | 16, or 56 with the password flag | The invite's token (zero in a tombstone); with the password flag the token sealed with the password's key: nonce (24), MAC (16), the token encrypted (16), XChaCha20-Poly1305 with the host's key as additional data (`p2p_seal_token`) |
| then | 1 | Players (at most 255) |
| | 1 | Most players |
| | 1 | The gametype's engine: 0 none (co-op), 1 CTF, 2 Slayer, 3 Oddball, 4 King of the Hill, 5 Race |
| | 1 + up to 32 | The game's name: a length byte, then that many bytes |
| | 1 + up to 32 | The map's name |
| | 1 + up to 24 | The gametype's name |
| | 8 | The stamp: the game's kind (`game_modes_kind`: the OpenCE mode, 1 SWAT, 2 Infection, 3 Gun Game, or 0; with 0x80 for Hardcore), then 7 reserved bytes, zero |
| | 64 | The Ed25519 signature, by the listing's key, of the 12 ASCII bytes `hceu-lobby-1` followed by every byte before the signature |
| Flag | Meaning |
| --- | --- |
| 1 | Open: it takes players now |
| 2 | In progress: a game is under way (or loading) |
| 4 | Teams |
| 8 | Closed: a tombstone, the host stopped |
| 16 | Password: the token is sealed |
| 32 | Dedicated: a dedicated server (`halo --server` sets it, since network version 39) |
A listing is 140 bytes at least (all names empty) and 268 at most (a
password and every name at its length). A reader refuses one outside those
sizes, without `"HL"` and format 1, with a name's length byte past its
field's maximum or past the end, or whose stamp and signature do not end it
exactly. The names are sanitised as the game's `sanitize` does: a byte
outside 0x20 to 0x7E becomes `?`, and a zero ends the name. A master also
refuses a listing whose key has a small order.
The vectors' first listing (an open team game of a dedicated server,
sequence 412, 5 of 16 players, CTF on bloodgulch, named `OpenCE Dedicated`)
is these 169 bytes, of which the first 105 are signed. The vectors were made
at network version 38 and are kept as they are (the bytes and signatures
are fixed): their listings carry version 38 with flag 32, which the game
sets from version 39 on, so a game of version 39 reads them, checks their
signatures and hides them from its browser as another version's games, as
it does any. The examples' `network_version` of 38 in this document are the
vectors' too.
| Field | Bytes |
| --- | --- |
| Magic, format | `484c` `01` |
| Network version 38, flags 37 (open, teams, dedicated) | `0026` `25` |
| Sequence 412, time 1760900000 | `0000019c` `68f533a0` |
| Host key | `fc51cd8e6218a1a38da47ed00230f0580816ed13ba3303ac5deb911548908025` |
| Token | `a0a1a2a3a4a5a6a7a8a9aaabacadaeaf` |
| Players 5, most 16, engine 1 (CTF) | `05` `10` `01` |
| Name, map, gametype | `10` `4f70656e434520446564696361746564`, `0a` `626c6f6f6467756c6368`, `03` `435446` |
| Stamp (kind 0) | `0000000000000000` |
| Signature | `633dc63eb27828d6e589e34dc4336dbb2d514b2018e4bf4a3adf5aeb774b6a523fe662c3d29241c6f91c8714a8ca2b5e493aacb32bcaeb9bce715f15b76d230f` |
(`testdata/vectors.json` has it whole, with a password game's, a
tombstone's and an altered one that must be refused.)
## The probe
Before it lists a server, the master proves that the server's UDP port is
reachable from the internet and that the publisher key's holder answers on
it. It sends a datagram to the probe address (the published `address`, or
the request's source address with `tunnel_port`) from its probe socket:
| Offset | Size | Probe (35 bytes) |
| --- | --- | --- |
| 0 | 10 | `"OPCE-PROBE"` |
| 10 | 1 | 1 |
| 11 | 8 | The master's key id, raw |
| 19 | 16 | A nonce |
The game's tunnel socket, which dispatches what it receives by its first
bytes, recognises the magic and answers from the same socket to the
address the probe came from:
| Offset | Size | Answer (103 bytes) |
| --- | --- | --- |
| 0 | 14 | `"OPCE-PROBE-ACK"` |
| 14 | 1 | 1 |
| 15 | 8 | The master's key id, as the probe had it |
| 23 | 16 | The nonce, as the probe had it |
| 39 | 64 | The publisher key's Ed25519 signature of the 29 bytes `"probe"`, the master's key id, the nonce |
The server answers only a probe of exactly 35 bytes whose key id is that of
a master in its `masters.txt`, only to the probe's source, a given nonce at
most once per second, at most 2 answers a second to one source address and
at most 10 answers a second in all, so the probe cannot be used to reflect
traffic (a 103-byte answer to a 35-byte probe is the whole amplification),
and probes forged from one address cannot use up the answers a master's
probe needs. A probe whose nonce was answered in the same second counts
against neither limit.
The master takes only an answer from the probed address and port, with its
own key id, a nonce it made for that address and key, and a signature that
verifies with the key that signed the publish.
| Rule | Value |
| --- | --- |
| Attempts | 3, 2 seconds apart; failed 2 seconds after the third |
| Again | Every 5 minutes while the server is reachable (it stays listed meanwhile); a failed server at its first publish a minute or more after the failure; at once when its probe address or key changes |
| Nonce | Opaque to the server. A master uses a fresh nonce for each probe round (the round's attempts share it), and never the same one for two rounds of one address and key. `opence-master`'s is stateless: the first 16 bytes of HMAC-SHA-256(seed, `"opence-probe-1"` 0x00 address 0x00 key id 0x00 step), the step the decimal Unix time of the round's start divided by 30; it accepts the current and the previous hour's random seed and the current and the previous step, and starts rounds of one address and key at least a step apart |
| Duplicates | A server answers a given nonce at most once per second: it remembers the nonces it answered (the last 64) with the Unix second they came in, and ignores a probe whose nonce it answered in the same second, whatever came between (A, B, A in one second: the second A is ignored). A master's retries, 2 seconds apart, are answered again; a nonce resent within the second is not |
With the vectors' master key (id `39f713d0a644253f`) and the nonce
`101112131415161718191a1b1c1d1e1f`, the probe is
`4f5043452d50524f42450139f713d0a644253f101112131415161718191a1b1c1d1e1f`, the
signed message `70726f626539f713d0a644253f101112131415161718191a1b1c1d1e1f`,
and the publisher's answer
`4f5043452d50524f42452d41434b0139f713d0a644253f101112131415161718191a1b1c1d1e1f`
followed by the signature
`a63af355db038dff90e6c82abc0e252eddbd1ed3562580d7becaf3e4edbdd39cef7ef3163b91849ba57f6e83240b92df1efbce15dfa42f4a12981590a0234109`.
## The list
`GET /v1/servers`, with the optional query `network_version=<n>`,
`dedicated=1` (or `0`), `region=<region>`, `q=<text>` (a case-insensitive
substring of the name, map, gametype or variant; 32 characters at most).
No signature is needed and plain HTTP is allowed: the body is signed.
```json
{"protocol":1,"master":{"name":"OpenCE Master 1","key_id":"39f713d0a644253f","time":1760900000},
"servers":[{"id":"4c5f15237c866f6f","publisher":{"id":"p_kz3c5lb2xvq7mdpa","name":"Milenko's servers","since":"2026-10"},
"name":"OpenCE Dedicated","map":"bloodgulch","gametype":"CTF","variant":"CTF","players":5,"max_players":16,
"teams":true,"in_progress":false,"password":false,"open":true,"dedicated":true,"kind":0,"engine":1,
"network_version":38,"build":"build-206","region":"eu","reachable":true,"updated":1760899990,
"listing":"<base64>"}]}
```
| Entry field | Meaning |
| --- | --- |
| `id` | The server id |
| `publisher` | The publisher's id (`p_` and up to 32 of `a-z0-9`), display name, and the year and month it was approved |
| `name`, `map`, `gametype`, `players`, `max_players`, `teams`, `in_progress`, `password`, `open`, `kind`, `engine`, `network_version` | From the listing |
| `variant`, `build`, `region` | From the publish |
| `dedicated` | The listing's flag 32 or the publish's `dedicated` |
| `reachable` | The last probe was answered (`false` for a trusted server or under `MASTER_LIST_UNREACHABLE`) |
| `updated` | The time of the server's last publish |
| `address` | Only with the operator's and the master's consent (above); absent otherwise |
| `listing` | Base64 of the listing's exact bytes, as the server published them |
The list holds at most 512 entries: dedicated servers first, then by
players. Its headers:
| Header | Value |
| --- | --- |
| `Signature` | `ed25519=` and the base64 of the master key's signature of the body's exact bytes (before any `Content-Encoding`) |
| `Signature-Key` | The master's key id, 16 hexadecimal digits |
| `Signature-Time` | The body's `master.time` |
| `ETag` | `"` and the first 16 hexadecimal digits of SHA-256 of the body, and `"`; `If-None-Match` with it answers `304` |
| `Cache-Control` | `public, max-age=5` (the master serves the same body for 5 seconds) |
| `Content-Encoding` | `gzip` when the request's `Accept-Encoding` asks for it |
| `Access-Control-Allow-Origin` | `*` (and `Access-Control-Expose-Headers` names the four above), for the web build |
A client:
1. checks `Signature` over the decompressed body bytes with the key in
`masters.txt`, and that `Signature-Key` is that key's id, and refuses
the whole body otherwise (a missing `Signature-Key` too; a client that
cannot check Ed25519, such as an old browser, refuses every list rather
than show one unchecked);
2. parses the body, and refuses it unless `protocol` is 1, `master.key_id`
is the key's id, and `master.time` is no older than 300 seconds and no
more than 300 seconds ahead of the client's clock (a list dated ahead
would be taken for longer when it is replayed later, and a clock that
far off is wrong). The time is in the signed body: `Signature-Time` only
repeats it, since a header is not signed, and a client need not read
it;
3. type-checks each entry, decodes its `listing`, runs `listing_read` and
the host signature's check on it, and skips an entry that fails rather
than the list; it shows the name, map, gametype and players of the
signed listing (an entry's own fields are the master's word, and may
differ); it filters control characters from every name, and takes at
most 512 entries (a 512-entry list is some 26,000 JSON tokens: the game
reads a list of 65,536 tokens at most);
4. merges the masters' lists: entries with the same `id` are one game (the
newest `updated` wins), and an entry whose listing key is also heard on
the brokers is one game, shown as master-listed;
5. never pings listed servers (that would tell every server the player's
address): it shows the `region`, and the ping once a game is joined.
The vectors' signed body is
`{"protocol":1,"master":{"name":"OpenCE Master 1","key_id":"39f713d0a644253f","time":1760900000},"servers":[]}`
with `Signature: ed25519=18dmQnIfmRnC+wUwRJ/loxAH1VfASRBVnZgCfRuHrAw/2uo4thTibWnNQFScgRju+5lQtt709blK86BLT0fYCw==`
and `ETag: "cd755a50c5cfc457"`.
`GET /v1/servers/{server_id}` answers one listed server the same way:
`{"protocol":1,"master":{…},"server":{<entry>}}` with the same headers, or
`404 not_found`.
## Other endpoints
| Request | Who | Answer |
| --- | --- | --- |
| `GET /v1/publishers/{id}` | anyone (the list's limit) | `{"ok":true,"id","name","since":"2026-10","status","servers":<listed now>}`, or `404` |
| `POST /v1/applications`, `/v1/applications/…` | anyone | `410 applications_by_discord`: applications are made with the master's Discord bot (below), not over HTTP |
| `POST /v1/keys` | signed, an approved publisher's active key | Body `{"public_key":"ed25519:…"}`: adds a key (8 active at most). `201 {"ok":true,"key_id","status":"active"}`; `409 key_exists`; `403 too_many_keys` |
| `GET /v1/me` | signed, any key the master knows | The publisher's record: `{"ok":true,"key_id","status","publisher":{"id","name","since","status","quota","origin","keys":[{"key_id","public_key","status","updated","last_used"}],"servers":[{"id","instance","key_id","listed","probe","reachable","hidden","trusted","updated","name","players","max_players"}]}}`; for a key still in an application, `"publisher":null` and `"application":{"id","status","reason","created"}`; `403 key_revoked` |
| `GET /v1/master` | anyone | The master's name, key id, public key, contact, data policy and limits (informational: clients use the key in `masters.txt`) |
| `GET /healthz` | anyone | `200 {"ok":true,…}` while the database answers |
| `GET /metrics` | anyone (the list's limit) | Prometheus text, read at most once each 5 seconds: `master_servers{reachable}`, `master_publishers{status}`, `master_publishes_total{result}`, `master_probes_total{result}`, `master_list_requests_total`, `master_peer_requests_total`, `master_build_info{version,protocol}` |
| `GET /`, `GET /apply`, `/admin/*` | people | The list page (the list's limit), how to apply (the Discord bot, and an invite to its server), the admin pages |
## Applications
An operator applies with the master's Discord bot, in the master's
Discord server (the `/apply` page links to it): the bot's `/apply` command
takes the region (a menu of the master's choices) and the number of servers
at once as its options, and answers the applicant alone with a nonce for
the proof of key,
`opence-apply-<unix>-<16 hex>`, good for 24 hours and bound to that Discord
user (a nonce given to another user, or to none, does not prove this one's
key), and a button that opens the application's form: a display name, the
public key, the proof, and a note. The application's name is 3 to 32 printable ASCII characters,
`servers` is 1 to 64, and the region up to 16 of `a-z`, `0-9` and `-`. The
proof of key is required unless the master's policy says otherwise
(`MASTER_REQUIRE_PROOF`, true by default): it is the publisher key's
Ed25519 signature of the nonce's ASCII text, in hexadecimal (128 digits,
what `halo --server --sign <nonce>` prints) or base64. An application
without one is shown to the approvers as unproven. A key already a
publisher's is refused, and so is a key with an application pending. The
applicant is answered on Discord, and told of the decision by a direct
message; the applicant's identity is their Discord user id and username.
Each application is posted to the master's log channel with Approve and
Deny buttons, which only the members of the master's approver roles may
press; the admin pages decide too. Once decided, anywhere, the message
shows the outcome and who decided. The master's operator can also add an
application on its command line (`opence-master challenge` for the nonce,
then `add-application`), as the conformance test does.
A master limits applications, since each one is posted to its approvers:
`opence-master` takes one pending application at a time and 3 a day per
Discord user, 3 a day per key, and, of applications without a proof of key,
100 an hour in all; one with a proof is not refused for the hour's number,
but past 100 applications in an hour the approvers are alerted once and the
next ones are not posted one by one (its settings change these numbers). It
deletes a denied application 30 days after its denial.
The earlier HTTP application (`POST /v1/applications` with an e-mail
address verified by a mailed link, `GET /v1/applications/challenge`, and
the application's status by its mailed token) is gone: its endpoints
answer `410 applications_by_discord`. A master keeps the applications made
that way readable to its admins.
## Approval sharing between masters
The official masters share approvals, so an operator applies once. Each
master fetches each peer's `GET /v1/publishers?since=<unix>` (every minute
in `opence-master`), signed with its own master key in the request scheme
above (`keyid` is its master key id, and the signed string's master key id
is the peer's, the one it fetches from; a master answers only the peers it
is configured with, else `403 not_a_peer`). The answer is signed as the list
is (`Signature`, `Signature-Key`, `Signature-Time`, the body's
`master.time`):
```json
{"protocol":1,"master":{"name","key_id","time"},
"publishers":[{"id","name","status","since","updated","origin","quota",
"keys":[{"key_id","public_key","status","updated"}]}]}
```
A master shares only what it holds a word of its own on: the publishers it
approved or moderated (`status` is its own word: `approved`, `suspended` or
`revoked`; `null` when it only vouches for keys), and the keys it added or
revoked (`active` or `revoked`). `origin` is the key id of the master that
approved the publisher, as the sharing master knows it (a master records a
publisher new to it as come from the peer it fetched the record from,
whatever origin the record claims, and only that peer's records rename
it); `since` its approval time; `updated` the time of
the newest word in the record; `since=` returns the records updated after
it. The next fetch's `since` is the answer's `master.time` less 120 seconds,
on the peer's own clock.
The importing master keeps each master's word apart and takes the most
restrictive of the trusted masters' words as the publisher's status
(`revoked` over `suspended` over `approved`) and the smallest quota given;
a newer word from a master replaces that master's older one. So a
suspension or revocation anywhere wins everywhere, and only the master that
suspended a publisher can lift its suspension. A key revoked by any trusted
master is revoked, for good; a key two publishers claim is refused. A
master may refuse a peer's words (`MASTER_PEERS_TRUST`); they then count
for nothing.
## Errors
Every error is `{"ok":false,"error":{"code":"…","message":"…","field":"…"?},"master_time":<unix>}`.
The message is for people and may change; programs read the code.
| Status | Code | Meaning | A server's publisher should |
| --- | --- | --- | --- |
| 400 | `schema` | A field is missing, of the wrong type or out of range (`field` names it), or the body is not one JSON object | Log it once; it is a bug |
| 400 | `server_id` | The path's id is not the key's and the instance's | Log it once |
| 400 | `listing` | The listing does not parse, its signature fails, its key has a small order, or its time is an hour off | Log it once |
| 401 | `bad_signature` | The Authorization header is malformed or its signature fails | Log it once |
| 401 | `clock` | `ts` is more than 300 seconds from `master_time` | Log the difference (from the answer's `master_time`): the machine's clock is wrong |
| 401 | `replay` | The nonce was used in the last 600 seconds | Send a new nonce |
| 403 | `unknown_key` | No publisher or application has the key | Log `master: apply with key <id>` once a minute |
| 403 | `publisher_pending` | The key's application waits for review | Log `master: publisher pending` once a minute; keep publishing every 30 s |
| 403 | `application_denied` | The key's application was denied (`message` says why) | Log it once a minute |
| 403 | `publisher_suspended` | The publisher is suspended | Log it; keep publishing slowly |
| 403 | `publisher_revoked`, `key_revoked` | Revoked for good | Log it; stop publishing to that master |
| 403 | `quota_exceeded` | The publisher has its quota of servers live | Log it |
| 403 | `instance_taken` | Another key of the publisher has a live server of this instance | Log it; the old server expires after `ttl` |
| 403 | `listing_taken` | The listing's host key is that of another publisher's live server, which has renewed it within 90 seconds | Log it once a minute; it is someone else's listing, or the host key is shared; keep publishing |
| 403 | `too_many_instances` | The publisher holds its quota and 16 server records, none of which can be dropped | Log it; use fewer instance names |
| 403 | `tls_required` | Plain HTTP from beyond loopback | Use the `https://` URL |
| 403 | `not_a_peer` | A peer's request from a master not configured as a peer | |
| 404 | `not_found` | No such server, publisher or endpoint | |
| 409 | `key_exists` | The key added (`POST /v1/keys`) is known already | |
| 410 | `applications_by_discord` | An application sent over HTTP: applications are made with the master's Discord bot | Log it: apply with the bot's `/apply` |
| 413 | `too_large` | The body is over 16 KB | |
| 429 | `rate_limited` | Too many requests; `Retry-After` gives the seconds to wait | Wait that long (the header's name read in any case; the game waits a day at most, and 30 seconds without one) |
| 500 | `internal` | The master failed | Try again at the next interval |
## Privacy and limits
| What | Rule |
| --- | --- |
| Servers' addresses | Kept 7 days after the server's last publish, for probes and abuse handling; never served unless the operator and the master both chose to; not in the master's log unless its operator asks (`MASTER_LOG_ADDRESSES`) |
| Applicants | Their Discord user id and username, seen by the master's admins and approvers (the log channel) only; no address is kept |
| Applications | A denied one: deleted 30 days after the denial |
| Servers' records | A closed server's: deleted an hour after it closed; one not published again: after 24 hours (unless an admin flagged it) |
| Contacts | Discord names (and the earlier HTTP applications' e-mail addresses) are seen by the master's admins and approvers only, and are not shared with peers |
| Strings | Printable ASCII, cut to the listing's lengths: name 32, map 32, gametype and variant 24, build 32 |
| Requests | 60 list requests a minute per address (the list, one server, a publisher's page, the list page and the metrics together); the application limits above; bodies 16 KB at most; the publish limits above. Every limit by address counts an IPv6 address by its /64 |
## Known limitations
A listing's host key is bound to the first publisher whose live server
publishes it, not to the host's own publisher: the listing does not say
which publisher key the host chose. A publisher that copies a listing from a
list while the host's publisher is not publishing (more than `ttl`) holds
the host key, and the host's publisher is refused `listing_taken`, until the
copy goes 90 seconds without a newer listing; one that keeps copying the
host's newest listings from other lists keeps it until an admin hides its
server or suspends it. The planned fix is in the listing: the host signs the
key id of the publisher key it publishes with into the listing (a new
listing format, with a new network version), and a master takes a listing
only from that key.
## Versions
This is protocol 1: `protocol` in bodies, `/v1/` in paths and
`OpenCE-Master-v1` in signed strings (followed by the receiving master's
key id). A change that an older client or
server would misread is a new version, with new paths; fields may be added
to version 1, and both sides ignore what they do not know. The listing's
own format follows the game's network version: a client hides entries
whose `network_version` is not its own, as it does for the brokers'
listings.
## Testing an implementation
`testdata/vectors.json` in the master's repository has, from fixed seeds:
three key pairs with their key ids (the publisher's, the master's, a
host's), a server id, a signed publish and a signed `GET /v1/me` to the
vectors' master (its key id, the canonical strings, the signatures, the
headers), a probe and its answer,
four listings (a dedicated team game, a password game in progress with its
sealed token, a tombstone, and an altered listing that must be refused), a
signed list body with its headers and ETag, a small-order key that must be
refused, and a proof of key. Monocypher's `crypto_ed25519_sign`,
`crypto_ed25519_check` and `crypto_aead_lock` give the same bytes.
`tests/conformance/opence_publisher.py` is a reference publisher in Python
(keys, signatures, listings, publishing, the probe's answer), and
`tests/conformance/test_master_protocol.py` runs a master through the whole
flow: an application (on the master's command line, since the Discord bot
is beyond a test's reach), the HTTP application's `410`, a pending
publish, approval, the probe, the listed
server's exact bytes in a signed list, closing, every refusal, and two
masters sharing an approval, a suspension and a revocation.
+27 -6
View File
@@ -1,6 +1,7 @@
# Android
The app of Ringfall: Mjolnir VR (application id `io.github.cesarus85.ringfall`;
The app of Mjolnir VR (application id `io.github.cesarus85.ringfall`, from
the name before, "Ringfall: Mjolnir VR", kept so that installed apps update;
its Java classes keep the decompilation's package, `com.halo.decomp`).
`ninja android` builds the game for 64-bit ARM Android (arm64-v8a).
`ninja android_apk` makes an app from it:
@@ -232,7 +233,7 @@ These settings are only for Android:
| `display.shader_cache` | `true` (the default): the linked shader programs are kept in `shader_cache` in the data folder (their binaries, the driver that made them and their sources), and each map's list of the programs it drew with; as a map loads, the programs on its list are made ready, so that its first frames do not wait for the driver to compile them. A driver update compiles them again from the kept sources. `false`: each program is compiled the first time it is drawn. The folder may be deleted at any time. |
| `display.shader_worker` | `true` (the default): the shader programs are made on a thread of their own, whose GL context shares the game's (loaded from the shader cache, or compiled), and drawn with once there (`debug.shader_warm_up`: `"worker"`, `"load"` on the game's thread as a map loads, or `"off"`); a draw whose program is not made yet is left out for the frames it takes, and the frame does not wait. As a map loads, its own programs and then every map's (`shader_cache/all.txt`) are asked for. `false`: each is made on the game's thread when first drawn with. |
| `debug.sample_seconds` | Refer to "Find problems". |
| `debug.memory_watch` | `true` (the default): the app notices the game's writes to textures and vertices by page protection. `false`: it compares page contents once a frame instead, which is slower. Refer to "Limits". |
| `debug.memory_watch` | `true` (the default): the app notices the game's writes to cached textures by page protection. `false`: it compares page contents once a frame instead, which is slower. Geometry uses the streaming path in either mode. Refer to "Limits". |
## Internet play
@@ -542,6 +543,23 @@ assembly of the port is necessary:
- The symbol aliases in `guest/libc/src_include/features.h`. The Darwin
target does not accept alias attributes.
## Geometry uploads
Android streams vertex and index data from the current CPU bytes instead
of reusing the persistent geometry mirror or its cached index extents.
This is automatic; no console command or configuration change is needed.
Affected players reported that bypassing the cache resolved stretched or
missing geometry, with some also reporting better performance. The exact
cache failure mechanism remains unconfirmed.
The Android-only guard in `mirror_range` uses the existing streaming
fallback. Streamed upload methods, frame fences, shaders, texture caching
and CPU write tracking are unchanged. Desktop and web retain their cache.
Xbox and Custom Edition maps keep their existing loaders and resource
paths. `tools/test_android_mirror_uploads.py` checks the bypass with large
and reused ranges, frame-counter rollover and desktop/web cache controls;
it does not substitute for device gameplay validation.
## Find problems
- Enter `adb logcat -s halo` to see the log of the port and the errors of
@@ -571,8 +589,11 @@ assembly of the port is necessary:
operate. The Xbox memory uses 4 KB pages.
- The x86 Android emulator runs the app through its ARM translation. The
translation cannot deliver the page faults that the renderer uses to
notice changed textures and vertices. On the emulator the app compares
notice changed textures. On the emulator the app compares
page contents once a frame instead ("write tracking: page hashes" in the
log). This is slower, and a write shows one frame later, so moving
geometry can glitch briefly. `debug.memory_watch = false` does the same
on a device.
log). This is slower, and texture changes may appear one frame later.
`debug.memory_watch = false` does the same on a device. The translation
also has no scalar conversion from floating
point to an integer in a SIMD register (`fcvtzs s0, s1`, an illegal
instruction there), so `tools/android_asm_convert.py` writes each as the
vector form, which leaves the register and the exception flags the same.
+8 -6
View File
@@ -10,10 +10,10 @@ On the Frame, in Desktop Mode (Steam menu > Power > Switch to Desktop):
1. Put your own disc image of Halo: Combat Evolved for the original Xbox (`.iso` or
`.xiso`, any version) in Downloads (or Documents, the Desktop, a memory
card).
2. Download `Install-Ringfall-Mjolnir-VR.desktop` from the latest release and open it
2. Download `Install-Mjolnir-VR.desktop` from the latest release and open it
(double-click; confirm running it).
3. Answer the dialogs: the installer finds the disc image (or asks for it),
copies the game data out of it, adds "Ringfall: Mjolnir VR" to the Steam library
copies the game data out of it, adds "Mjolnir VR" to the Steam library
and switches back to Gaming Mode. Start it from the library there.
The game updates itself: while it runs, its launcher looks for a newer
@@ -23,18 +23,20 @@ release, fetches it and puts it in place as the next start begins
too (settings, saves and game data stay).
The desktop file (`steam_frame_installer.desktop`) downloads the latest
release's `ringfall-mjolnir-vr-steam-frame.zip` (`tools/steam_frame_bundle.py`, made by
release's `mjolnir-vr-steam-frame.zip` (`tools/steam_frame_bundle.py`, made by
the release job of `.github/workflows/build.yml`) and runs its
`install.sh` (`steam_frame_install.sh`), with zenity dialogs:
- `~/Documents/RingfallMjolnirVR`: the launcher (`ringfall-mjolnir-vr.sh`)
and the release APK (`RingfallMjolnirVR.apk`); the folder of the builds
before the name, `~/Documents/HaloCE`, renamed to it, and their "Halo VR"
shortcut replaced;
shortcut replaced. (These keep the name of builds 302 to 313, "Ringfall:
Mjolnir VR": the Steam shortcut of an installed game starts the launcher
there, and the launcher's update looks for them in the bundle.);
- the maps folder out of the disc image (`steam_frame_xiso.py`, the app's
`XisoExtractor.java` in Python), unless `maps/ui.map` is there;
- the Steam shortcut, unless it is there: added by Steam itself
(`steam://addnonsteamgame`, as SteamOS's "Add to Steam" does) from
`Ringfall Mjolnir VR.desktop` beside the game, then the library pictures
`Mjolnir VR.desktop` beside the game, then the library pictures
under the id Steam gave it. Steam is not closed: on the Frame, Desktop
Mode runs inside Gaming Mode's session, and closing Steam ends it (and the
installer with it). An old "Halo VR" shortcut is left for the player to
@@ -83,7 +85,7 @@ dialogs, for testing over adb; it leaves Steam and its shortcuts alone.
## Starting it on the Frame
A button in the Steam library ("Ringfall: Mjolnir VR", a non-Steam game)
A button in the Steam library ("Mjolnir VR", a non-Steam game)
runs `~/Documents/RingfallMjolnirVR/ringfall-mjolnir-vr.sh` (`port/android/steam_frame_launch.sh`),
which starts the game as Steam starts an Android title of its own:
`lepton waitforexitandrun -- ~/Documents/RingfallMjolnirVR/RingfallMjolnirVR.apk`, in a container
+4 -3
View File
@@ -1,6 +1,6 @@
# VR roadmap
What Ringfall: Mjolnir VR (Quest 3, Steam Frame) has, and what comes next, in the
What Mjolnir VR (Quest 3, Steam Frame) has, and what comes next, in the
agreed order. Updated with every step: a step is **done** once the user has
tried it in the headset and it is merged into `main`; **built** means in a
branch, not yet tried in the headset.
@@ -24,8 +24,8 @@ named where code is taken over.
| Scores | The menu button held shows the scores on the Quest (a press pauses, as it is let go); the Steam Frame's View button as before; the text chat's lines where the desktop has them (2026-10-18) |
| Comfort | Snap or smooth turning, a comfort vignette in vehicles, VR options in the main and pause menus (Y), a page of every controller button |
| Menus | The PC version's menus in VR (`vr.menus`), clicked with a laser; text typed on the on-screen keyboard |
| Multiplayer | Up to date with OpenCE (network version 29, 2026-10-14): cross-play, its server browser, co-op campaign, password lobbies; join codes and the VR online list |
| Bots | Bots in multiplayer: on foot (paths, items, objectives), in vehicles and at turrets; they make room for a joining person, on the LAN too (a lobby they fill is advertised open, 2026-10-18) |
| Multiplayer | Up to date with OpenCE (network version 32, 2026-10-20; HDR kept off in VR): cross-play, its server browser, co-op campaign, password lobbies; join codes and the VR online list |
| Bots | Bots in multiplayer (`host_bots.c`; OpenCE's own, `bots.c`, are local split screen games' and off in VR): on foot (paths, items, objectives), in vehicles and at turrets; they make room for a joining person, on the LAN too (2026-10-18); they climb ladders (Damnation's) and take paths as near their goal as a search reaches, as OpenCE's do: on Damnation 0 searches of 1747 failed, 1078 of 1605 before (2026-10-20). Later: OpenCE's bots' aiming (lead, bursts, taps for the pistol and sniper rifle, field of view), learnt obstacles and map fixes into ours |
| Voice chat | Push to talk on any button (`vr.button_talk`, BUTTONS page; the free hand's grip by default, sending nothing while it reaches for the foregrip or the wheel), open mic, off (2026-10-13) |
| Builds | The Android build's assembly conversion (`tools/android_asm_convert.py`) keeps string data as it is: strings and tables starting with "_" or holding \" lost a "_" (Opus's pulse cache among them: the Steam Frame's crashes in online games while talking), 2026-10-13 |
| Languages | The European disc in Spanish and Italian (a maps folder for each, `maps_es` and `maps_it`, none called `maps`) imported on the Quest and the Steam Frame: the headset's language's, its language the game's and the menus' (`maps/language.txt`, unless `game.language` is set), 2026-10-17; not yet tried with that disc |
@@ -46,6 +46,7 @@ named where code is taken over.
| 4 | Later: disc image import in the launcher; moving by swinging the arms (in place of the stick, never faster than it: online too), and a sprint by swinging them harder (faster than the game allows: offline only) | import **done** (in `main` 2026-10-06): the app's import (tried on the Quest 3: all 24 maps; on the Frame kept in `~/Documents/RingfallMjolnirVR`), a Steam Frame installer from Desktop Mode (`STEAM_FRAME.md`; tried on the Frame: the old folder renamed, the shortcut added by Steam), a release signing key (CI and local builds the same). Arm swinging and its offline sprint still open |
| 5 | Later: multiview again (both eyes in one pass, half the drawing's CPU cost): find why its eyes do not fuse in big online games on the Quest 3 (and now and then on the Steam Frame), then turn it back on | open: off by default since 2026-10-16 (`debug.multiview`); findings in the open points |
| R | Release as **Ringfall: Mjolnir VR** (no "Halo" in the product's name): app name, id `io.github.cesarus85.ringfall`, icon and library pictures (`tools/ringfall_art.py`), Frame folder and installer, release assets, README; the repository renamed | **done** (in `main` 2026-10-06; Quest 3 and Steam Frame good) |
| R2 | Renamed **Mjolnir VR** ("Ringfall" is another game's name): app and Steam names, logo (`tools/mjolnir_art.py`), release assets (also under the old names for the updaters of builds 302 to 313), updaters, README; the repository renamed `Cesarus85/mjolnir-vr` (GitHub forwards the old links). Kept: the app id, the signing key's alias, the Frame's `~/Documents/RingfallMjolnirVR` and the names inside its bundle (installed games and their shortcuts) | in `feature/rename-mjolnir-vr` (2026-10-21) |
## Step 2, first part (done)
@@ -147,7 +147,7 @@ public class LauncherActivity extends Activity {
layout.setBackgroundColor(Color.rgb(12, 16, 20));
TextView title = new TextView(this);
title.setText("Ringfall: Mjolnir VR needs game data");
title.setText("Mjolnir VR needs game data");
title.setTextColor(Color.WHITE);
title.setTextSize(TypedValue.COMPLEX_UNIT_SP, 24);
title.setGravity(Gravity.CENTER);
@@ -36,7 +36,7 @@ import java.util.zip.ZipInputStream;
* the latest release when it starts, on a thread of its own, and if it is
* newer asks the player whether to update:
*
* - Yes: the release's app (ringfall-mjolnir-vr-android-release.zip or
* - Yes: the release's app (mjolnir-vr-android-release.zip or
* -debug.zip) is
* downloaded and handed to Android's package installer, which replaces the
* game (closing it) and offers to open the new version.
@@ -53,8 +53,8 @@ import java.util.zip.ZipInputStream;
final class Updater {
/* the VR port's own releases: the original's, made without VR, must
never replace it (they share the package name) */
private static final String APP_NAME = "Ringfall: Mjolnir VR";
private static final String REPOSITORY = "Cesarus85/ringfall-mjolnir-vr";
private static final String APP_NAME = "Mjolnir VR";
private static final String REPOSITORY = "Cesarus85/mjolnir-vr";
private static final String USER_AGENT = "halo-ce-universal-updater";
private static final int TIMEOUT_MILLISECONDS = 20000;
/** the most a download (a release's zip, about 35 MB) or the app in it may be */
@@ -240,7 +240,7 @@ final class Updater {
/* ---------- updating */
private static void update(Activity activity, int latest) {
String asset = "ringfall-mjolnir-vr-android-" + (BuildConfig.DEBUG ? "debug" : "release") + ".zip";
String asset = "mjolnir-vr-android-" + (BuildConfig.DEBUG ? "debug" : "release") + ".zip";
File directory = new File(activity.getCacheDir(), UpdateProvider.DIRECTORY);
LinearLayout layout = new LinearLayout(activity);
TextView status = new TextView(activity);
@@ -4,101 +4,101 @@ import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.channels.FileChannel;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.BitSet;
import java.util.List;
import java.util.Locale;
/**
* Copies the maps folder out of an Xbox disc image (an "xiso", or a whole
* disc's ".iso"), as the desktop games do (port/linux/src/xiso.c, which this
* follows).
* Copies the maps folder out of the player's Xbox disc image of Halo, for
* LauncherActivity, as the desktop games do (port/linux/src/xiso.c; the web
* page's is port/web/site/xiso-worker.js). The image is a document the
* player picked, read through its FileChannel at absolute positions.
*
* The image's file system is XDVDFS, read as extract-xiso does
* (https://github.com/XboxDev/extract-xiso, extract-xiso.c, whose format
* handling this follows; its license is below and in
* port/third_party/extract-xiso/LICENSE.TXT): 2048-byte sectors; a volume
* descriptor at 0x10000 that starts and ends with "MICROSOFT*XBOX*MEDIA" and
* gives the root directory's sector and size; and directories whose entries
* form a binary tree (each entry: left and right subtree offsets in 4-byte
* units, the start sector, the size, attributes, the name's length and the
* name, 4-byte aligned). Images made from a whole disc put the game partition
* further in, at one of the offsets below.
* Written from a description of the Xbox's disc file system, XDVDFS
* (xboxdevwiki's XDVDFS page, https://xboxdevwiki.net/XDVDFS, and the format
* facts OpenCE's readers rely on). What this class relies on:
*
* The files are written to maps.partial first and moved into maps once they
* all are, so an interrupted extraction never leaves maps/ui.map behind.
* - Sectors are 2048 bytes and integers little-endian. Sector numbers count
* from the start of the game partition: an image of the partition alone
* has it at 0, an image of a whole disc further in (0x0FD90000, 0x02080000
* or 0x18300000 for XGD2, XGD3 and XGD1 discs). They are tried in that
* order.
* - The volume descriptor is the partition's sector 32 (at 0x10000). It
* holds "MICROSOFT*XBOX*MEDIA" at its start and again at 0x7EC, and the
* root directory table's start sector (u32 at 0x14) and size in bytes (u32
* at 0x18).
* - A directory table is a binary tree of entries whose root is the entry at
* offset 0. An entry is a left and a right subtree link (u16 each, in
* 4-byte units from the table's start, 0 for none), the start sector and
* the size of the file or of the subdirectory's table (u32 each), the
* attributes (u8, 0x10 for a directory), the name's length (u8) and the
* name. Unused bytes of a table are 0xFF, so a left link of 0xFFFF is
* padding, not an entry.
* - A file is one contiguous run of bytes from the start of its sector.
*
* A European disc in two languages (Spanish and Italian) has no maps folder
* but one for each, maps_es and maps_it: the device's language's is taken,
* else English's, else the first, and its language written to
* maps/language.txt, which the game asks the Xbox for (game.language unset,
* port/linux/src/xbox_xapi.c): the menus in it too.
* The image is the player's file and nothing read from it is trusted. Only
* the root's table and the maps folder's are read, each whole and at most
* 4 MB; the walk of a table visits each offset once, goes at most 64 links
* deep and looks at most 4096 entries; and a file is written only under a
* plain name that no file before it had (ignoring case).
*
* Some parts of this code are copyright in@fishtank.com. This product
* includes software developed by in &lt;in@fishtank.com&gt;.
* The loading screen's picture, which the retail disc has no file of, is
* taken out of the root's default.xbe (read whole, at most 64 MB) and
* written beside the maps as the loading.tga the game reads, when the maps
* folder has none (loadingPicture, as xiso.c's xiso_write_loading_picture);
* without it the light sweeps over black, as the game's own does.
*
* Copyright (c) 2003 in &lt;in@fishtank.com&gt;
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
*
* This product includes software developed by in &lt;in@fishtank.com&gt;.
*
* 4. Neither the name of "in" nor the email address "in@fishtank.com"
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED `AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES
* INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* AUTHOR OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
* The app starts the game once maps/ui.map exists, and makes the maps folder
* itself, so the copy is written to maps.partial (emptied first of what an
* earlier attempt left) and its files moved into maps once all are
* complete, ui.map last.
*/
final class XisoExtractor {
private static final int SECTOR_SIZE = 2048;
private static final long VOLUME_DESCRIPTOR_OFFSET = 0x10000;
private static final int ENTRY_HEADER_SIZE = 14;
private static final int DESCRIPTOR_OFFSET = 0x10000;
private static final byte[] MAGIC = "MICROSOFT*XBOX*MEDIA".getBytes(StandardCharsets.ISO_8859_1);
private static final int SECOND_MAGIC_OFFSET = 0x7EC;
private static final int ENTRY_FIXED_SIZE = 14;
private static final int ATTRIBUTE_DIRECTORY = 0x10;
/* directory tables are a few sectors; anything much larger is not one */
private static final long MAXIMUM_DIRECTORY_SIZE = 4 << 20;
private static final int MAXIMUM_FILES = 256;
private static final int COPY_BUFFER_SIZE = 1 << 20;
private static final byte[] VOLUME_MAGIC = "MICROSOFT*XBOX*MEDIA".getBytes(StandardCharsets.US_ASCII);
/* where the game partition starts: a plain image, and whole-disc images
(extract-xiso's GLOBAL, XGD3 and XGD1 offsets) */
private static final long[] PARTITION_OFFSETS = { 0, 0x0FD90000L, 0x02080000L, 0x18300000L };
private static final int PADDING_LINK = 0xFFFF;
/** where the game partition may start, in the order they are tried */
private static final long[] PARTITION_STARTS = {
0x00000000L, // an image of the game partition alone
0x0FD90000L, // a whole XGD2 disc
0x02080000L, // a whole XGD3 disc
0x18300000L, // a whole XGD1 disc (the original Xbox's)
};
/** directory tables are a few sectors; anything much larger is not one */
private static final int MAXIMUM_TABLE_SIZE = 4 * 1024 * 1024;
private static final int MAXIMUM_DEPTH = 64;
private static final int MAXIMUM_VISITS = 4096;
private static final int MAXIMUM_ENTRIES = 256;
private static final int COPY_CHUNK = 1024 * 1024;
private static final String PARTIAL_DIRECTORY = "maps.partial";
/** the loading screen's picture (source/interface/progress_bar.c), out of default.xbe; the executable is a few MB */
private static final int LOADING_WIDTH = 320;
private static final int LOADING_HEIGHT = 240;
private static final int TGA_HEADER_SIZE = 18;
private static final long MAXIMUM_XBE_SIZE = 64 * 1024 * 1024;
private static final String LOADING_PICTURE = "loading.tga";
/** Told as the copy goes: the file being copied, and the bytes copied of all the files'. */
interface Progress {
void report(String file, long done, long total);
}
/** a reason the player can act on */
/** A reason the player can act on: its message is shown as it is. */
static final class ExtractException extends IOException {
ExtractException(String message) {
super(message);
}
}
/** a file or folder found in a directory table */
private static final class Entry {
final String name;
final long sector;
@@ -111,140 +111,66 @@ final class XisoExtractor {
}
}
private final FileChannel image;
private long partition;
private XisoExtractor(FileChannel image) {
this.image = image;
private XisoExtractor() {
}
/** copies the image's maps folder to destination/maps */
/** Copies the image's maps folder to destination/maps. */
static void extractMaps(FileChannel image, File destination, Progress progress) throws IOException {
new XisoExtractor(image).extract(destination, progress);
}
long imageSize = image.size();
long partition = -1;
long rootSector = 0, rootSize = 0;
ByteBuffer descriptor = ByteBuffer.allocate(SECTOR_SIZE);
private void readAt(long offset, ByteBuffer buffer) throws IOException {
while (buffer.hasRemaining()) {
int count = image.read(buffer, offset);
if (count <= 0)
throw new ExtractException("Could not read the disc image (is it complete?).");
offset += count;
}
buffer.flip();
}
private static boolean magicAt(ByteBuffer buffer, int offset) {
for (int index = 0; index < VOLUME_MAGIC.length; index++) {
if (buffer.get(offset + index) != VOLUME_MAGIC[index])
return false;
}
return true;
}
/** whether a name is one to write in the maps folder: no path, no "." or
* "..", and only printable ASCII that every file system takes as a plain
* name (a disc's maps folder holds .map files and loading.tga) */
static boolean isPlainName(String name) {
if (name.isEmpty() || name.equals(".") || name.equals(".."))
return false;
for (int index = 0; index < name.length(); index++) {
char c = name.charAt(index);
if (c < 0x20 || c > 0x7E || "/\\:*?\"<>|".indexOf(c) >= 0)
return false;
}
return true;
}
/** the partition's volume descriptor: the root directory's sector and size */
private long[] findVolume() throws IOException {
for (long offset : PARTITION_OFFSETS) {
ByteBuffer descriptor = ByteBuffer.allocate(SECTOR_SIZE).order(ByteOrder.LITTLE_ENDIAN);
try {
readAt(offset + VOLUME_DESCRIPTOR_OFFSET, descriptor);
} catch (IOException e) {
for (long start : PARTITION_STARTS) {
if (start + DESCRIPTOR_OFFSET + SECTOR_SIZE > imageSize)
continue;
}
if (!magicAt(descriptor, 0) || !magicAt(descriptor, 0x7EC))
descriptor.clear();
if (!readFully(image, descriptor, start + DESCRIPTOR_OFFSET))
continue;
partition = offset;
return new long[] {
descriptor.getInt(20) & 0xFFFFFFFFL, descriptor.getInt(24) & 0xFFFFFFFFL,
};
byte[] bytes = descriptor.array();
if (!hasMagic(bytes, 0) || !hasMagic(bytes, SECOND_MAGIC_OFFSET))
continue;
partition = start;
rootSector = u32(bytes, 0x14);
rootSize = u32(bytes, 0x18);
break;
}
throw new ExtractException("This is not an Xbox disc image.");
}
if (partition < 0)
throw new ExtractException("This is not an Xbox disc image.");
/** a directory's table, read whole */
private ByteBuffer readDirectory(long sector, long size, String what) throws IOException {
if (size <= 0 || size > MAXIMUM_DIRECTORY_SIZE)
throw new ExtractException(what);
ByteBuffer table = ByteBuffer.allocate((int) size).order(ByteOrder.LITTLE_ENDIAN);
readAt(partition + sector * SECTOR_SIZE, table);
return table;
}
/**
* collects the entries of the subtree at offset (4-byte units), files or
* directories as asked
*/
private static void walk(ByteBuffer table, long offset, int depth, boolean directories, List<Entry> out,
int[] visited) {
offset *= 4;
/* a malformed table must not loop or run off its end */
if (depth > 64 || ++visited[0] > 4096 || offset + ENTRY_HEADER_SIZE > table.limit())
return;
int at = (int) offset;
int left = table.getShort(at) & 0xFFFF;
int right = table.getShort(at + 2) & 0xFFFF;
/* 0xFFFF: padding, an empty directory */
if (left == 0xFFFF)
return;
int nameLength = table.get(at + 13) & 0xFF;
if (left != 0)
walk(table, left, depth + 1, directories, out, visited);
boolean isDirectory = (table.get(at + 12) & ATTRIBUTE_DIRECTORY) != 0;
if (at + ENTRY_HEADER_SIZE + nameLength <= table.limit() && nameLength > 0 && isDirectory == directories
&& out.size() < MAXIMUM_FILES) {
byte[] bytes = new byte[nameLength];
for (int index = 0; index < nameLength; index++)
bytes[index] = table.get(at + ENTRY_HEADER_SIZE + index);
String name = new String(bytes, StandardCharsets.ISO_8859_1);
/* (as extract-xiso refuses them: no name may leave the folder, and
none but a plain file name is written) */
if (isPlainName(name))
out.add(new Entry(name, table.getInt(at + 4) & 0xFFFFFFFFL, table.getInt(at + 8) & 0xFFFFFFFFL));
}
if (right != 0)
walk(table, right, depth + 1, directories, out, visited);
}
private void extract(File destination, Progress progress) throws IOException {
long[] root = findVolume();
/* the root's maps folder */
ByteBuffer table = readDirectory(root[0], root[1], "The disc image's file system is damaged.");
List<Entry> directories = new ArrayList<>();
walk(table, 0, 0, true, directories, new int[1]);
// the root's maps folder
byte[] root = readTable(image, partition, rootSector, rootSize, "The disc image's file system is damaged.");
Entry maps = null;
for (Entry entry : directories) {
if (entry.name.equalsIgnoreCase("maps"))
maps = entry;
Entry xbe = null;
for (Entry entry : walkTable(root, false)) {
if (entry.name.equalsIgnoreCase("default.xbe"))
xbe = entry;
}
List<Entry> directories = walkTable(root, true);
for (Entry entry : directories) {
if (entry.name.equalsIgnoreCase("maps")) {
maps = entry;
break;
}
}
// (Mjolnir VR: a European disc in two languages, Spanish and Italian,
// has no maps folder but one for each, maps_es and maps_it: the
// device's language's is taken, else English's, else the first, and
// its language written to maps/language.txt, which the game asks the
// Xbox for while game.language is unset: port/linux/src/xbox_xapi.c)
String language = null;
if (maps == null) {
String wanted = Locale.getDefault().getLanguage();
Entry english = null, first = null;
for (Entry entry : directories) {
for (Entry entry : walkTable(root, true)) {
String code = mapsLanguage(entry.name);
if (code == null)
continue;
if (code.equals(wanted))
if (code.equals(wanted) && maps == null)
maps = entry;
if (code.equals("en"))
if (code.equals("en") && english == null)
english = entry;
if (first == null)
first = entry;
@@ -257,73 +183,72 @@ final class XisoExtractor {
if (maps == null)
throw new ExtractException("The disc image has no maps folder: it is not a Halo disc.");
/* its files */
table = readDirectory(maps.sector, maps.size, "The disc image's maps folder is damaged.");
List<Entry> files = new ArrayList<>();
walk(table, 0, 0, false, files, new int[1]);
long total = 0;
boolean hasUi = false;
// its files
byte[] table = readTable(image, partition, maps.sector, maps.size, "The disc image's maps folder is damaged.");
List<Entry> files = walkTable(table, false);
Entry userInterface = null;
boolean hasLoading = false;
for (Entry file : files) {
total += file.size;
hasUi |= file.name.equalsIgnoreCase("ui.map");
if (file.name.equalsIgnoreCase("ui.map"))
userInterface = file;
hasLoading |= file.name.equalsIgnoreCase(LOADING_PICTURE);
}
if (!hasUi)
if (userInterface == null)
throw new ExtractException("The disc image's maps folder has no ui.map: it is not a Halo disc.");
File partial = new File(destination, "maps.partial");
File finished = new File(destination, "maps");
if (!partial.isDirectory() && !partial.mkdirs())
throw new ExtractException("Could not create " + partial + ".");
ByteBuffer buffer = ByteBuffer.allocateDirect(COPY_BUFFER_SIZE);
long done = 0;
// (an image that ends before a file does is refused before anything
// is written; an empty file's sector need not be anywhere)
long total = 0;
for (Entry file : files) {
File path = new File(partial, file.name);
long offset = partition + file.sector * SECTOR_SIZE;
long remaining = file.size;
if (file.size > 0 && partition + file.sector * SECTOR_SIZE + file.size > imageSize)
throw new ExtractException(readFailure(file));
total += file.size;
}
try (FileOutputStream out = new FileOutputStream(path)) {
FileChannel output = out.getChannel();
while (remaining > 0) {
buffer.clear();
buffer.limit((int) Math.min(remaining, COPY_BUFFER_SIZE));
readAt(offset, buffer);
int count = buffer.remaining();
while (buffer.hasRemaining())
output.write(buffer);
offset += count;
remaining -= count;
done += count;
progress.report(file.name, done, total);
}
} catch (ExtractException e) {
throw new ExtractException("Could not read " + file.name + " from the disc image (is it complete?).");
} catch (IOException e) {
throw new ExtractException("Could not write " + path + " (is the storage full?).");
// the copy, to maps.partial
File partial = new File(destination, PARTIAL_DIRECTORY);
if (partial.isDirectory()) {
File[] leftovers = partial.listFiles();
if (leftovers != null) {
for (File leftover : leftovers)
leftover.delete();
}
} else {
partial.delete();
partial.mkdirs();
}
if (!partial.isDirectory())
throw new ExtractException("Could not create " + partial.getPath() + ".");
ByteBuffer buffer = ByteBuffer.allocate(COPY_CHUNK);
long done = 0;
for (Entry file : files)
done = copyFile(image, partition, file, new File(partial, file.name), buffer, done, total, progress);
if (!hasLoading && writeLoadingPicture(image, imageSize, partition, xbe, new File(partial, LOADING_PICTURE)))
files.add(new Entry(LOADING_PICTURE, 0, 0));
/* (the maps folder may be there, empty: the app makes it for adb) */
if (!finished.isDirectory() && !finished.mkdirs())
throw new ExtractException("Could not create " + finished + ".");
for (Entry file : files) {
File from = new File(partial, file.name);
File to = new File(finished, file.name);
to.delete();
if (!from.renameTo(to))
throw new ExtractException("Could not move " + file.name + " into " + finished + ".");
}
partial.delete();
File languageFile = new File(finished, "language.txt");
// then into maps, ui.map (the app's sign that the data is there) last
File mapsFolder = new File(destination, "maps");
if (!mapsFolder.isDirectory() && !mapsFolder.mkdirs() && !mapsFolder.isDirectory())
throw new ExtractException("Could not create " + mapsFolder.getPath() + ".");
// (the language of a language's maps folder: before ui.map is there)
File languageFile = new File(mapsFolder, "language.txt");
languageFile.delete();
if (language != null) {
try (FileOutputStream out = new FileOutputStream(languageFile)) {
out.write((language + "\n").getBytes(StandardCharsets.US_ASCII));
} catch (IOException e) {
throw new ExtractException("Could not write " + languageFile + " (is the storage full?).");
throw new ExtractException("Could not write " + languageFile.getPath() + " (is the storage full?).");
}
}
List<Entry> order = new ArrayList<>(files);
order.remove(userInterface);
order.add(userInterface);
for (Entry file : order) {
File target = new File(mapsFolder, file.name);
target.delete();
if (!new File(partial, file.name).renameTo(target))
throw new ExtractException("Could not move " + file.name + " into " + mapsFolder.getPath() + ".");
}
partial.delete();
}
/** a language's maps folder's language ("maps_it": "it"), else null */
@@ -333,4 +258,267 @@ final class XisoExtractor {
String code = name.substring(5).toLowerCase(Locale.ROOT);
return Character.isLetter(code.charAt(0)) && Character.isLetter(code.charAt(1)) ? code : null;
}
/** No path, no . or .., and only printable ASCII that every file system takes as a plain name. */
static boolean isPlainName(String name) {
if (name == null || name.isEmpty() || name.equals(".") || name.equals(".."))
return false;
for (int index = 0; index < name.length(); index++) {
char character = name.charAt(index);
if (character < 0x20 || character > 0x7E || "/\\:*?\"<>|".indexOf(character) >= 0)
return false;
}
return true;
}
/* ---------- the image */
private static long u16(byte[] bytes, int offset) {
return (bytes[offset] & 0xFF) | (bytes[offset + 1] & 0xFF) << 8;
}
private static long u32(byte[] bytes, int offset) {
return u16(bytes, offset) | u16(bytes, offset + 2) << 16;
}
private static boolean hasMagic(byte[] bytes, int offset) {
for (int index = 0; index < MAGIC.length; index++) {
if (bytes[offset + index] != MAGIC[index])
return false;
}
return true;
}
/** Fills buffer from the image at position; false if the image ends first. */
private static boolean readFully(FileChannel image, ByteBuffer buffer, long position) throws IOException {
while (buffer.hasRemaining()) {
int count = image.read(buffer, position);
if (count <= 0)
return false;
position += count;
}
return true;
}
private static byte[] readTable(FileChannel image, long partition, long sector, long size, String damaged)
throws IOException {
if (size == 0 || size > MAXIMUM_TABLE_SIZE)
throw new ExtractException(damaged);
ByteBuffer table = ByteBuffer.allocate((int) size);
if (!readFully(image, table, partition + sector * SECTOR_SIZE))
throw new ExtractException("Could not read the disc image (is it complete?).");
return table.array();
}
/* ---------- directory tables */
private static final class Walk {
final byte[] table;
final boolean directories;
final BitSet visited = new BitSet();
final List<Entry> entries = new ArrayList<>();
int visits;
boolean stopped;
Walk(byte[] table, boolean directories) {
this.table = table;
this.directories = directories;
}
}
/** The folders (or the files) of a table with plain names, in the tree's order. */
private static List<Entry> walkTable(byte[] table, boolean directories) {
Walk walk = new Walk(table, directories);
walkEntry(walk, 0, 0);
return walk.entries;
}
/**
* The subtree whose root entry is at offset: its left subtree, the
* entry, its right subtree. A link to padding, past the table or back to
* an entry already visited ends that branch.
*/
private static void walkEntry(Walk walk, int offset, int depth) {
byte[] table = walk.table;
if (walk.stopped || depth > MAXIMUM_DEPTH)
return;
if (offset >= table.length || table.length - offset < ENTRY_FIXED_SIZE)
return;
int left = (int) u16(table, offset);
int right = (int) u16(table, offset + 2);
if (left == PADDING_LINK || walk.visited.get(offset / 4))
return;
walk.visited.set(offset / 4);
if (walk.visits >= MAXIMUM_VISITS) {
walk.stopped = true;
return;
}
walk.visits++;
if (left != 0)
walkEntry(walk, left * 4, depth + 1);
int nameLength = table[offset + 13] & 0xFF;
if (nameLength != 0 && nameLength <= table.length - offset - ENTRY_FIXED_SIZE)
collect(walk, offset, nameLength);
if (right != 0)
walkEntry(walk, right * 4, depth + 1);
}
private static void collect(Walk walk, int offset, int nameLength) {
byte[] table = walk.table;
boolean directory = (table[offset + 12] & ATTRIBUTE_DIRECTORY) != 0;
if (directory != walk.directories || walk.entries.size() >= MAXIMUM_ENTRIES)
return;
String name = new String(table, offset + ENTRY_FIXED_SIZE, nameLength, StandardCharsets.ISO_8859_1);
if (!isPlainName(name))
return;
// (the destination's file system may ignore case)
for (Entry entry : walk.entries) {
if (entry.name.equalsIgnoreCase(name))
return;
}
walk.entries.add(new Entry(name, u32(table, offset + 4), u32(table, offset + 8)));
}
/* ---------- the loading screen's picture */
/**
* The loading screen's picture out of a default.xbe, as the TGA the game
* reads (uncompressed, 24 bits, rows from the bottom), or null. The
* executable holds it, 320 by 240, as runs of 4-bit greys (a byte each:
* the grey's high four bits in its low nibble, the run's length in its
* high one) after the width and height as u32s: found by those two
* numbers followed by runs that fill the picture exactly (a run of none,
* or one past the picture's end, is not it).
*/
static byte[] loadingPicture(byte[] xbe) {
int pixels = LOADING_WIDTH * LOADING_HEIGHT;
byte[] greys = new byte[pixels];
boolean found = false;
for (int at = 0; at + 8 <= xbe.length && !found; at++) {
if (u32(xbe, at) != LOADING_WIDTH || u32(xbe, at + 4) != LOADING_HEIGHT)
continue;
int pixel = 0;
for (int next = at + 8; next < xbe.length && pixel < pixels; next++) {
int run = (xbe[next] & 0xFF) >> 4;
if (run == 0 || run > pixels - pixel)
break;
Arrays.fill(greys, pixel, pixel + run, (byte) ((xbe[next] & 0x0F) << 4));
pixel += run;
}
found = pixel == pixels;
}
if (!found)
return null;
byte[] tga = new byte[TGA_HEADER_SIZE + pixels * 3];
tga[2] = 2;
tga[12] = (byte) (LOADING_WIDTH & 0xFF);
tga[13] = (byte) (LOADING_WIDTH >> 8);
tga[14] = (byte) (LOADING_HEIGHT & 0xFF);
tga[15] = (byte) (LOADING_HEIGHT >> 8);
tga[16] = 24;
for (int y = 0; y < LOADING_HEIGHT; y++) {
int row = (LOADING_HEIGHT - 1 - y) * LOADING_WIDTH;
for (int x = 0; x < LOADING_WIDTH; x++) {
int out = TGA_HEADER_SIZE + (y * LOADING_WIDTH + x) * 3;
tga[out] = tga[out + 1] = tga[out + 2] = greys[row + x];
}
}
return tga;
}
/**
* Writes default.xbe's picture to output, if it has one; whether it did.
* One that cannot be written whole is removed (the loading screen would
* read past one cut short).
*/
private static boolean writeLoadingPicture(FileChannel image, long imageSize, long partition, Entry xbe,
File output) {
if (xbe == null || xbe.size <= 0 || xbe.size > MAXIMUM_XBE_SIZE
|| partition + xbe.sector * SECTOR_SIZE + xbe.size > imageSize)
return false;
try {
ByteBuffer bytes = ByteBuffer.allocate((int) xbe.size);
if (!readFully(image, bytes, partition + xbe.sector * SECTOR_SIZE))
return false;
byte[] tga = loadingPicture(bytes.array());
if (tga == null)
return false;
try (FileOutputStream stream = new FileOutputStream(output)) {
stream.write(tga);
}
return true;
} catch (IOException | OutOfMemoryError exception) {
output.delete();
return false;
}
}
/* ---------- the copy */
private static String readFailure(Entry file) {
return "Could not read " + file.name + " from the disc image (is it complete?).";
}
/** Copies one file of the image to output; returns the bytes copied of all the files so far. */
private static long copyFile(FileChannel image, long partition, Entry file, File output, ByteBuffer buffer,
long done, long total, Progress progress) throws IOException {
String writeFailure = "Could not write " + output.getPath() + " (is the storage full?).";
long position = partition + file.sector * SECTOR_SIZE;
long remaining = file.size;
FileOutputStream stream = null;
try {
stream = new FileOutputStream(output);
FileChannel channel = stream.getChannel();
while (remaining > 0) {
int count = (int) Math.min(remaining, COPY_CHUNK);
boolean read;
buffer.clear();
buffer.limit(count);
try {
read = readFully(image, buffer, position);
} catch (IOException exception) {
read = false;
}
if (!read)
throw new ExtractException(readFailure(file));
buffer.flip();
while (buffer.hasRemaining()) {
if (channel.write(buffer) <= 0)
throw new ExtractException(writeFailure);
}
position += count;
remaining -= count;
done += count;
if (progress != null)
progress.report(file.name, done, total);
}
FileOutputStream closing = stream;
stream = null;
closing.close();
} catch (ExtractException exception) {
throw exception;
} catch (IOException exception) {
throw new ExtractException(writeFailure);
} finally {
if (stream != null) {
try {
stream.close();
} catch (IOException ignored) {
// (the copy failed already)
}
}
}
return done;
}
}
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Ringfall: Mjolnir VR</string>
<string name="app_name">Mjolnir VR</string>
</resources>
+8
View File
@@ -198,4 +198,12 @@ void host_touch_scene(int scene);
for the overlay's labels */
void host_touch_bindings(const int *controls);
/* ---------- the server browser's master servers (host_https.c) */
/* a GET of an https:// url (port/linux/src/master_list.c): 1 with the
status, the headers ("Name: value" lines) and up to body_capacity bytes of
the body (its size in body_size), else 0 and why in error */
int host_https_get(const char *url, int *status, char *headers, int headers_size, char *body, int body_capacity,
int *body_size, char *error, int error_size);
#endif
+35
View File
@@ -0,0 +1,35 @@
/*
HOST_HTTPS.C
The server browser's requests to the master servers (host_https_get,
port/android/guest/runtime/guest_host.h; port/linux/src/master_list.c), made
in the host with the desktop's HTTPS client (port/linux/src/posix_update.c's
update_https_request, Mbed TLS, the system's certificate authorities): the
guest has no TLS of its own, and its memory is the host's to read and write.
*/
#include "host.h"
#include "../../linux/src/update.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int host_https_get(const char *url, int *status, char *headers, int headers_size, char *body, int body_capacity,
int *body_size, char *error, int error_size)
{
struct update_response response;
*status = 0;
*body_size = 0;
if (!update_https_request("GET", url, NULL, NULL, 0, (unsigned long)body_capacity, &response, error, error_size))
return 0;
*status = response.status;
snprintf(headers, (size_t)headers_size, "%s", response.headers);
if (response.body_size > (unsigned long)body_capacity)
response.body_size = (unsigned long)body_capacity;
memcpy(body, response.body, response.body_size);
*body_size = (int)response.body_size;
free(response.body);
return 1;
}
+2 -2
View File
@@ -65,7 +65,7 @@ void host_fatal(const char *format, ...)
vsnprintf(message, sizeof(message), format, arguments);
va_end(arguments);
__android_log_write(ANDROID_LOG_FATAL, "halo", message);
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Ringfall: Mjolnir VR", message, NULL);
SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Mjolnir VR", message, NULL);
_exit(1);
}
@@ -540,7 +540,7 @@ int main(int argc, char *argv[])
{
(void)argc;
(void)argv;
host_logf(HOST_LOG_INFO, "Ringfall: Mjolnir VR starting");
host_logf(HOST_LOG_INFO, "Mjolnir VR starting");
host_install_signal_handlers();
if (host_native_thread_create(game_main, NULL, MAIN_STACK_SIZE) != 0)
host_fatal("cannot start the game thread");
+10 -4
View File
@@ -834,6 +834,10 @@ long host_guest_mprotect(uint64_t address, uint64_t size, int protection)
#define WATCH_PAGE_COUNT (HALO_GUEST_WINDOW_SIZE / PAGE)
/* (each page: 0 not watched, 1 watched and read-only, 2 made writable by a
watched write. A fault on a page at 2 is a write another thread made as
this one was making the page writable, and is made again; one on a page at
0, freed memory or none of the watch's, is a crash) */
static uint8_t page_protected[WATCH_PAGE_COUNT];
static uint32_t page_generation[WATCH_PAGE_COUNT];
static volatile uint32_t current_generation = 1;
@@ -867,7 +871,7 @@ static uint64_t watch_page(uint64_t address)
static void mark_written(uint64_t page)
{
page_generation[page] = __sync_add_and_fetch(&current_generation, 1);
page_protected[page] = 0;
page_protected[page] = 2;
mprotect((void *)(HALO_GUEST_WINDOW_BASE + page * PAGE), PAGE, PROT_READ | PROT_WRITE);
}
@@ -934,11 +938,13 @@ static void segv_handler(int signal_number, siginfo_t *information, void *contex
{
uint64_t page = watch_page(address);
if (page_protected[page])
if (page_protected[page] == 1)
{
mark_written(page);
return;
}
if (page_protected[page] == 2)
return;
}
report_crash(signal_number, information, context);
chain(&previous_segv, signal_number, information, context);
@@ -1001,7 +1007,7 @@ void host_memory_watch_protect(uint32_t address, uint32_t size)
}
for (page = first; page <= last; page++)
{
if (!page_protected[page])
if (page_protected[page] != 1)
{
page_protected[page] = 1;
mprotect((void *)(HALO_GUEST_WINDOW_BASE + page * PAGE), PAGE, PROT_READ);
@@ -1056,7 +1062,7 @@ void host_memory_watch_prepare_write(uint32_t address, uint32_t size)
last = WATCH_PAGE_COUNT - 1;
for (page = first; page <= last; page++)
{
if (page_protected[page])
if (page_protected[page] == 1)
mark_written(page);
}
}
+2 -2
View File
@@ -1256,7 +1256,7 @@ with vr.log_performance: host_main.c) */
android.applicationVM = machine;
android.applicationActivity = activity;
instance.next = &android;
strcpy(instance.applicationInfo.applicationName, "Ringfall Mjolnir VR");
strcpy(instance.applicationInfo.applicationName, "Mjolnir VR");
instance.applicationInfo.applicationVersion = 1;
strcpy(instance.applicationInfo.engineName, "halo-ce-universal");
instance.applicationInfo.engineVersion = 1;
@@ -2275,7 +2275,7 @@ void host_xr_test(void)
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
window = SDL_CreateWindow("Ringfall: Mjolnir VR", 640, 480, SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN);
window = SDL_CreateWindow("Mjolnir VR", 640, 480, SDL_WINDOW_OPENGL | SDL_WINDOW_FULLSCREEN);
context = window ? SDL_GL_CreateContext(window) : NULL;
if (!context || !SDL_GL_MakeCurrent(window, context))
host_fatal("VR test: no OpenGL ES context: %s", SDL_GetError());
+1
View File
@@ -85,5 +85,6 @@ host_touch_look_read
host_touch_rumble
host_touch_scene
host_touch_bindings
host_https_get
host_errno
Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 70 KiB

+28 -12
View File
@@ -1,6 +1,6 @@
#!/bin/bash
# Ringfall: Mjolnir VR's installer for the Steam Frame, run in its Desktop
# Mode from the bundle the release's "Install Ringfall: Mjolnir VR" desktop
# Mjolnir VR's installer for the Steam Frame, run in its Desktop
# Mode from the bundle the release's "Install Mjolnir VR" desktop
# file downloads (steam_frame_installer.desktop; the bundle: this script,
# RingfallMjolnirVR.apk, ringfall-mjolnir-vr.sh = steam_frame_launch.sh,
# steam_frame_xiso.py and the library pictures in grid/). Everything is
@@ -19,28 +19,31 @@
# Steam Frame Desktop Mode runs inside Gaming Mode's session, which ends
# with Steam. The shortcut of the builds before the name ("Halo VR") is
# left for the player to remove (Steam would write it back).
# RINGFALL_UNATTENDED=1 answers every question with its default and prints
# instead of showing dialogs (RINGFALL_IMAGE: the disc image to use), for
# MJOLNIR_UNATTENDED=1 answers every question with its default and prints
# instead of showing dialogs (MJOLNIR_IMAGE: the disc image to use), for
# testing over adb; it never closes Steam.
BUNDLE="$(cd "$(dirname "$0")" && pwd)"
GAME_DIR="$HOME/Documents/RingfallMjolnirVR"
STEAM_DIR="$HOME/.local/share/Steam"
LEPTON="$STEAM_DIR/steamapps/common/Lepton/lepton"
TITLE="Ringfall: Mjolnir VR"
NAME="Ringfall: Mjolnir VR"
TITLE="Mjolnir VR"
NAME="Mjolnir VR"
APK_NAME="RingfallMjolnirVR.apk"
LAUNCHER="ringfall-mjolnir-vr.sh"
EXE="\"$GAME_DIR/$LAUNCHER\""
# (the desktop file Steam adds the game from)
NAME_FILE="Ringfall Mjolnir VR"
NAME_FILE="Mjolnir VR"
# the builds before the name: their folder and Steam shortcut
OLD_DIR="$HOME/Documents/HaloCE"
OLD_NAME="Halo VR"
# the name of builds 302 to 313, which their shortcut keeps (Steam writes
# its shortcuts back from memory: the player renames it)
FORMER_NAME="Ringfall: Mjolnir VR"
# what the installer did, for looking into problems: written to /tmp while
# it runs, then kept beside the game as install.log
LOG="/tmp/ringfall-mjolnir-vr-install.log"
LOG="/tmp/mjolnir-vr-install.log"
: > "$LOG"
log() { echo "$(date '+%F %T') $*" >> "$LOG"; }
keep_log() { [ -d "$GAME_DIR" ] && cp -f "$LOG" "$GAME_DIR/install.log" 2>/dev/null; }
@@ -59,7 +62,7 @@ steam_running()
pgrep -f 'ubuntu12_32/steam( |$)' >/dev/null || pgrep -x steam >/dev/null
}
unattended() { [ "${RINGFALL_UNATTENDED:-0}" = 1 ] || ! command -v zenity >/dev/null; }
unattended() { [ "${MJOLNIR_UNATTENDED:-0}" = 1 ] || ! command -v zenity >/dev/null; }
info()
{
@@ -185,7 +188,7 @@ PYTHON
# must run), from a desktop file beside the game; then its pictures
add_shortcut()
{
local desktop="$GAME_DIR/$NAME_FILE.desktop" url file id
local desktop="$GAME_DIR/$NAME_FILE.desktop" url
printf '[Desktop Entry]\nType=Application\nName=%s\nExec=%s\nPath=%s\nIcon=steam\nTerminal=false\n' \
"$NAME" "$GAME_DIR/$LAUNCHER" "$GAME_DIR" > "$desktop" && chmod 755 "$desktop" || return 1
url="steam://addnonsteamgame/$(python3 -c 'import sys, urllib.parse; print(urllib.parse.quote(sys.argv[1], safe=""))' "$desktop")"
@@ -195,6 +198,16 @@ add_shortcut()
steam "$url" >/dev/null 2>&1 &
for _ in $(seq 30); do have_shortcut && break; sleep 1; done
have_shortcut || return 1
add_pictures
return 0
}
# the library pictures of the game's shortcut, for every Steam user who has
# it (again on an update: the builds before the name "Mjolnir VR" had
# Ringfall's)
add_pictures()
{
local file id
while read -r file; do
id="$(shortcut_id "$file" "$EXE")" || continue
log "shortcut $id in $file"
@@ -204,7 +217,6 @@ add_shortcut()
cp "$BUNDLE/grid/library_hero.png" "$(dirname "$file")/grid/${id}_hero.png"
cp "$BUNDLE/grid/library_logo.png" "$(dirname "$file")/grid/${id}_logo.png"
done < <(shortcut_files)
return 0
}
# --- the game
@@ -245,7 +257,7 @@ rm -rf "$GAME_DIR/update"
# --- the game data
if [ ! -f "$GAME_DIR/maps/ui.map" ]; then
image="${RINGFALL_IMAGE:-}"
image="${MJOLNIR_IMAGE:-}"
if [ -z "$image" ]; then
mapfile -t images < <(find_images)
for candidate in "${images[@]}"; do
@@ -271,6 +283,7 @@ fi
if have_shortcut; then
log "the Steam shortcut is there"
add_pictures
elif unattended; then
echo "info: the Steam shortcut is missing (not added unattended)"
elif ! steam_running; then
@@ -286,6 +299,9 @@ fi
if have_shortcut_to "$OLD_DIR/halo-vr.sh"; then
info "The library still shows the old \"$OLD_NAME\" from before the game's new name. It no longer starts: remove it in Steam (its gear or Manage > Remove non-Steam game)."
fi
if have_shortcut_to "$FORMER_NAME"; then
info "The library shows the game by its former name, \"$FORMER_NAME\". To call it $NAME there: its gear > Properties, then its name at the top."
fi
if ask "$NAME is installed.${image_note:-}\n\nSwitch to Gaming Mode now? Start $NAME from your library there (its pictures may show once Steam starts again)." yes; then
steamos-session-select gamescope >/dev/null 2>&1 ||
info "Switch to Gaming Mode yourself (the \"Return to Gaming Mode\" icon or the power menu)."
+5 -5
View File
@@ -1,14 +1,14 @@
[Desktop Entry]
# Ringfall: Mjolnir VR's installer for the Steam Frame
# Mjolnir VR's installer for the Steam Frame
# (port/android/STEAM_FRAME.md): a release asset,
# "Install-Ringfall-Mjolnir-VR.desktop", opened in Desktop Mode. It downloads
# "Install-Mjolnir-VR.desktop", opened in Desktop Mode. It downloads
# the latest release's bundle (tools/steam_frame_bundle.py, which fills in
# the repository) and runs its installer, steam_frame_install.sh.
# (no "$", "\" or "%" in Exec: the desktop entry format would need them
# escaped)
Type=Application
Name=Install Ringfall: Mjolnir VR
Comment=Installs Ringfall: Mjolnir VR for the Steam Frame, or updates it
Name=Install Mjolnir VR
Comment=Installs Mjolnir VR for the Steam Frame, or updates it
Icon=steam
Terminal=false
Exec=bash -c "if curl -fL --retry 3 -o /tmp/ringfall-mjolnir-vr-steam-frame.zip https://github.com/@REPOSITORY@/releases/latest/download/ringfall-mjolnir-vr-steam-frame.zip && rm -rf /tmp/ringfall-mjolnir-vr-install && python3 -m zipfile -e /tmp/ringfall-mjolnir-vr-steam-frame.zip /tmp/ringfall-mjolnir-vr-install; then exec bash /tmp/ringfall-mjolnir-vr-install/install.sh; else zenity --error --width=460 --title='Ringfall: Mjolnir VR' --text='Ringfall: Mjolnir VR could not be downloaded. Is the Steam Frame online?'; fi"
Exec=bash -c "if curl -fL --retry 3 -o /tmp/mjolnir-vr-steam-frame.zip https://github.com/@REPOSITORY@/releases/latest/download/mjolnir-vr-steam-frame.zip && rm -rf /tmp/mjolnir-vr-install && python3 -m zipfile -e /tmp/mjolnir-vr-steam-frame.zip /tmp/mjolnir-vr-install; then exec bash /tmp/mjolnir-vr-install/install.sh; else zenity --error --width=460 --title='Mjolnir VR' --text='Mjolnir VR could not be downloaded. Is the Steam Frame online?'; fi"
+2 -2
View File
@@ -1,5 +1,5 @@
#!/bin/bash
# Ringfall: Mjolnir VR on the Steam Frame: Lepton runs the APK in a container of its own,
# Mjolnir VR on the Steam Frame: Lepton runs the APK in a container of its own,
# and installs it anew whenever the APK is newer than the installed one
# (port/android/STEAM_FRAME.md). The game's data: ~/Documents/RingfallMjolnirVR.
# (a container of its own, not the shortcut's id: with that, SteamVR's
@@ -121,7 +121,7 @@ update_check()
log "update: build $latest found (this is $installed), fetching it"
rm -rf "$UPDATE" && mkdir -p "$UPDATE" || return 0
if curl -fsSL --retry 2 --max-time 900 -o "$UPDATE/bundle.zip" \
"https://github.com/$REPOSITORY/releases/download/build-$latest/ringfall-mjolnir-vr-steam-frame.zip" &&
"https://github.com/$REPOSITORY/releases/download/build-$latest/mjolnir-vr-steam-frame.zip" &&
python3 -I -m zipfile -e "$UPDATE/bundle.zip" "$UPDATE/bundle" &&
[ "$(cat "$UPDATE/bundle/build.txt" 2>/dev/null)" = "$latest" ] &&
[ -s "$UPDATE/bundle/RingfallMjolnirVR.apk" ] && [ -s "$UPDATE/bundle/ringfall-mjolnir-vr.sh" ]
+161 -148
View File
@@ -1,66 +1,50 @@
#!/usr/bin/env python3
"""
Copies the maps folder out of an Xbox disc image (an "xiso", or a whole
disc's ".iso") on the Steam Frame's SteamOS side, for its installer
(steam_frame_install.sh). It reads the image as the app's own import does
Copies the maps folder out of the player's Xbox disc image of Halo (an
"xiso", or a whole disc's ".iso") on the Steam Frame's SteamOS side, for
its installer (steam_frame_install.sh), as the app's own import does
(app/src/main/java/com/halo/decomp/XisoExtractor.java, which this follows;
the desktop games' is port/linux/src/xiso.c).
steam_frame_xiso.py <image> <destination>
writes <destination>/maps (through maps.partial, so an interrupted copy
never leaves maps/ui.map behind) and prints its progress for zenity
--progress: a percentage on a line of its own, and "# <text>" lines. On
failure it prints "error: <reason the player can act on>" to stderr and
exits 1.
writes <destination>/maps (through maps.partial, ui.map moved in last, so
an interrupted copy never leaves maps/ui.map behind) and prints its
progress for zenity --progress: a percentage on a line of its own, and
"# <text>" lines. On failure it prints "error: <reason the player can act
on>" to stderr and exits 1.
The image's file system is XDVDFS, read as extract-xiso does
(https://github.com/XboxDev/extract-xiso, extract-xiso.c, whose format
handling this follows; its license is below and in
port/third_party/extract-xiso/LICENSE.TXT): 2048-byte sectors; a volume
descriptor at 0x10000 that starts and ends with "MICROSOFT*XBOX*MEDIA" and
gives the root directory's sector and size; and directories whose entries
form a binary tree (each entry: left and right subtree offsets in 4-byte
units, the start sector, the size, attributes, the name's length and the
name). Images made from a whole disc put the game partition further in, at
one of the offsets below.
Written from a description of the Xbox's disc file system, XDVDFS
(xboxdevwiki's XDVDFS page, https://xboxdevwiki.net/XDVDFS), as
XisoExtractor.java is:
Some parts of this code are copyright in@fishtank.com. This product
includes software developed by in <in@fishtank.com>.
- Sectors are 2048 bytes and integers little-endian. Sector numbers count
from the start of the game partition: an image of the partition alone has
it at 0, an image of a whole disc further in (PARTITION_STARTS, tried in
that order).
- The volume descriptor is the partition's sector 32 (at 0x10000). It holds
"MICROSOFT*XBOX*MEDIA" at its start and again at 0x7EC, and the root
directory table's start sector (u32 at 0x14) and size in bytes (u32 at
0x18).
- A directory table is a binary tree of entries whose root is the entry at
offset 0. An entry is a left and a right subtree link (u16 each, in 4-byte
units from the table's start, 0 for none), the start sector and the size
of the file or of the subdirectory's table (u32 each), the attributes (u8,
0x10 for a directory), the name's length (u8) and the name. Unused bytes
are 0xFF, so a left link of 0xFFFF is padding, not an entry.
- A file is one contiguous run of bytes from the start of its sector.
Copyright (c) 2003 in <in@fishtank.com>
All rights reserved.
The image is the player's file and nothing read from it is trusted: only
the root's table and the maps folder's are read, each whole and at most
4 MB; a table's walk visits each offset once, goes at most 64 links deep
and looks at most 4096 entries; and a file is written only under a plain
name that no file before it had (ignoring case).
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. All advertising materials mentioning features or use of this software
must display the following acknowledgement:
This product includes software developed by in <in@fishtank.com>.
4. Neither the name of "in" nor the email address "in@fishtank.com"
may be used to endorse or promote products derived from this software
without specific prior written permission.
THIS SOFTWARE IS PROVIDED `AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR OR ANY CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
A European disc in two languages (Spanish and Italian) has no maps folder
but one for each, maps_es and maps_it: the one for the language asked for
(MJOLNIR_LANGUAGE, else the system's) is taken, else English's, else the
first, and its language written to maps/language.txt, which the game takes
as the Xbox's language while game.language is unset.
"""
import os
@@ -68,74 +52,100 @@ import struct
import sys
SECTOR_SIZE = 2048
VOLUME_DESCRIPTOR_OFFSET = 0x10000
ENTRY_HEADER_SIZE = 14
DESCRIPTOR_OFFSET = 0x10000
MAGIC = b"MICROSOFT*XBOX*MEDIA"
SECOND_MAGIC_OFFSET = 0x7EC
ENTRY_FIXED_SIZE = 14
ATTRIBUTE_DIRECTORY = 0x10
PADDING_LINK = 0xFFFF
# where the game partition may start: an image of the partition alone, a
# whole XGD2, XGD3 and XGD1 (the original Xbox's) disc
PARTITION_STARTS = (0x00000000, 0x0FD90000, 0x02080000, 0x18300000)
# directory tables are a few sectors; anything much larger is not one
MAXIMUM_DIRECTORY_SIZE = 4 << 20
MAXIMUM_FILES = 256
COPY_BUFFER_SIZE = 1 << 20
VOLUME_MAGIC = b"MICROSOFT*XBOX*MEDIA"
# where the game partition starts: a plain image, and whole-disc images
# (extract-xiso's GLOBAL, XGD3 and XGD1 offsets)
PARTITION_OFFSETS = (0, 0x0FD90000, 0x02080000, 0x18300000)
MAXIMUM_TABLE_SIZE = 4 << 20
MAXIMUM_DEPTH = 64
MAXIMUM_VISITS = 4096
MAXIMUM_ENTRIES = 256
COPY_CHUNK = 1 << 20
PARTIAL_DIRECTORY = "maps.partial"
class ExtractError(Exception):
"""a reason the player can act on"""
def read_at(image, offset, size):
image.seek(offset)
def read_exactly(image, position, size):
"""size bytes of the image from position; None if it ends first"""
image.seek(position)
data = image.read(size)
if len(data) != size:
raise ExtractError("Could not read the disc image (is it complete?).")
return data
return data if len(data) == size else None
def find_volume(image):
"""the game partition's offset, and the root directory's sector and size"""
for offset in PARTITION_OFFSETS:
try:
descriptor = read_at(image, offset + VOLUME_DESCRIPTOR_OFFSET, SECTOR_SIZE)
except ExtractError:
def find_partition(image, image_size):
"""the game partition's start, and the root table's sector and size"""
for start in PARTITION_STARTS:
if start + DESCRIPTOR_OFFSET + SECTOR_SIZE > image_size:
continue
if descriptor[:20] != VOLUME_MAGIC or descriptor[0x7EC:0x7EC + 20] != VOLUME_MAGIC:
descriptor = read_exactly(image, start + DESCRIPTOR_OFFSET, SECTOR_SIZE)
if (descriptor is None or descriptor[:len(MAGIC)] != MAGIC or
descriptor[SECOND_MAGIC_OFFSET:SECOND_MAGIC_OFFSET + len(MAGIC)] != MAGIC):
continue
sector, size = struct.unpack_from("<II", descriptor, 20)
return offset, sector, size
sector, size = struct.unpack_from("<II", descriptor, 0x14)
return start, sector, size
raise ExtractError("This is not an Xbox disc image.")
def read_directory(image, partition, sector, size, what):
if size <= 0 or size > MAXIMUM_DIRECTORY_SIZE:
raise ExtractError(what)
return read_at(image, partition + sector * SECTOR_SIZE, size)
def read_table(image, partition, sector, size, damaged):
if size == 0 or size > MAXIMUM_TABLE_SIZE:
raise ExtractError(damaged)
table = read_exactly(image, partition + sector * SECTOR_SIZE, size)
if table is None:
raise ExtractError("Could not read the disc image (is it complete?).")
return table
def walk(table, offset, depth, directories, out, visited):
"""collects the entries (name, sector, size) of the subtree at offset
(4-byte units), files or directories as asked"""
at = offset * 4
# a malformed table must not loop or run off its end
visited[0] += 1
if depth > 64 or visited[0] > 4096 or at + ENTRY_HEADER_SIZE > len(table):
return
left, right, sector, size, attributes, name_length = struct.unpack_from("<HHIIBB", table, at)
# 0xFFFF: padding, an empty directory
if left == 0xFFFF:
return
if left:
walk(table, left, depth + 1, directories, out, visited)
is_directory = bool(attributes & ATTRIBUTE_DIRECTORY)
if (at + ENTRY_HEADER_SIZE + name_length <= len(table) and name_length > 0
and is_directory == directories and len(out) < MAXIMUM_FILES):
name = table[at + ENTRY_HEADER_SIZE:at + ENTRY_HEADER_SIZE + name_length].decode("latin-1")
# (as extract-xiso refuses them: no name may leave the folder)
if name not in (".", "..") and "/" not in name and "\\" not in name:
out.append((name, sector, size))
if right:
walk(table, right, depth + 1, directories, out, visited)
def is_plain_name(name):
"""no path, no . or .., and only printable ASCII that every file system
takes as a plain name"""
if not name or name in (".", ".."):
return False
return all(0x20 <= ord(character) <= 0x7E and character not in '/\\:*?"<>|' for character in name)
def walk_table(table, directories):
"""the folders (or the files) of a table with plain names, as (name,
sector, size), in the tree's order: each entry's left subtree, the entry,
its right subtree; a link to padding, past the table or back to an entry
already visited ends that branch"""
entries, visited = [], set()
visits = [0]
def walk(offset, depth):
if depth > MAXIMUM_DEPTH or visits[0] >= MAXIMUM_VISITS:
return
if offset >= len(table) or len(table) - offset < ENTRY_FIXED_SIZE:
return
left, right = struct.unpack_from("<HH", table, offset)
if left == PADDING_LINK or offset // 4 in visited:
return
visited.add(offset // 4)
visits[0] += 1
if left:
walk(left * 4, depth + 1)
name_length = table[offset + 13]
if name_length and name_length <= len(table) - offset - ENTRY_FIXED_SIZE:
is_directory = bool(table[offset + 12] & ATTRIBUTE_DIRECTORY)
name = table[offset + ENTRY_FIXED_SIZE:offset + ENTRY_FIXED_SIZE + name_length].decode("latin-1")
# (the destination's file system may ignore case)
if (is_directory == directories and len(entries) < MAXIMUM_ENTRIES and is_plain_name(name) and
all(entry[0].lower() != name.lower() for entry in entries)):
sector, size = struct.unpack_from("<II", table, offset + 4)
entries.append((name, sector, size))
if right:
walk(right * 4, depth + 1)
walk(0, 0)
return entries
def maps_language(name):
@@ -145,65 +155,67 @@ def maps_language(name):
return None
def choose_maps(folders):
"""the maps folder, and its language (None for a plain "maps")"""
for folder in folders:
if folder[0].lower() == "maps":
return folder, None
languages = [(maps_language(folder[0]), folder) for folder in folders if maps_language(folder[0])]
wanted = (os.environ.get("MJOLNIR_LANGUAGE") or os.environ.get("LC_ALL") or
os.environ.get("LC_MESSAGES") or os.environ.get("LANG") or "")[:2].lower()
for preferred in (wanted, "en"):
for language, folder in languages:
if language == preferred:
return folder, language
if languages:
return languages[0][1], languages[0][0]
raise ExtractError("The disc image has no maps folder: it is not a Halo disc.")
def extract(image_path, destination):
with open(image_path, "rb") as image:
partition, root_sector, root_size = find_volume(image)
image_size = os.fstat(image.fileno()).st_size
partition, root_sector, root_size = find_partition(image, image_size)
# the root's maps folder
table = read_directory(image, partition, root_sector, root_size,
"The disc image's file system is damaged.")
directories = []
walk(table, 0, 0, True, directories, [0])
maps = [entry for entry in directories if entry[0].lower() == "maps"]
# (a European disc in two languages, Spanish and Italian, has a maps
# folder for each, maps_es and maps_it: the one for the language
# asked for (RINGFALL_LANGUAGE, else the system's), else English's,
# else the first; its language goes into maps/language.txt, which the
# game takes as game.language's when that is unset)
language = None
if not maps:
languages = [(maps_language(entry[0]), entry) for entry in directories if maps_language(entry[0])]
wanted = (os.environ.get("RINGFALL_LANGUAGE") or os.environ.get("LC_ALL") or
os.environ.get("LC_MESSAGES") or os.environ.get("LANG") or "")[:2].lower()
for preferred in (wanted, "en"):
chosen = [pair for pair in languages if pair[0] == preferred]
if chosen:
break
chosen = chosen or languages[:1]
if chosen:
language, entry = chosen[0]
maps = [entry]
if not maps:
raise ExtractError("The disc image has no maps folder: it is not a Halo disc.")
root = read_table(image, partition, root_sector, root_size, "The disc image's file system is damaged.")
(_, maps_sector, maps_size), language = choose_maps(walk_table(root, True))
# its files
table = read_directory(image, partition, maps[-1][1], maps[-1][2],
"The disc image's maps folder is damaged.")
files = []
walk(table, 0, 0, False, files, [0])
if not any(name.lower() == "ui.map" for name, _, _ in files):
table = read_table(image, partition, maps_sector, maps_size, "The disc image's maps folder is damaged.")
files = walk_table(table, False)
user_interface = next((file for file in files if file[0].lower() == "ui.map"), None)
if user_interface is None:
raise ExtractError("The disc image's maps folder has no ui.map: it is not a Halo disc.")
# (an image that ends before a file does is refused before anything
# is written; an empty file's sector need not be anywhere)
for name, sector, size in files:
if size and partition + sector * SECTOR_SIZE + size > image_size:
raise ExtractError("Could not read %s from the disc image (is it complete?)." % name)
total = sum(size for _, _, size in files) or 1
partial = os.path.join(destination, "maps.partial")
finished = os.path.join(destination, "maps")
# the copy, to maps.partial (emptied of what an earlier attempt left)
partial = os.path.join(destination, PARTIAL_DIRECTORY)
try:
os.makedirs(partial, exist_ok=True)
for leftover in os.listdir(partial):
os.remove(os.path.join(partial, leftover))
except OSError:
raise ExtractError("Could not create %s." % partial)
done = 0
shown = -1
done, shown = 0, -1
for name, sector, size in files:
path = os.path.join(partial, name)
offset = partition + sector * SECTOR_SIZE
remaining = size
position, remaining = partition + sector * SECTOR_SIZE, size
print("# Copying maps/%s" % name, flush=True)
try:
with open(path, "wb") as out:
while remaining > 0:
count = min(remaining, COPY_BUFFER_SIZE)
out.write(read_at(image, offset, count))
offset += count
count = min(remaining, COPY_CHUNK)
data = read_exactly(image, position, count)
if data is None:
raise ExtractError("Could not read %s from the disc image (is it complete?)." % name)
out.write(data)
position += count
remaining -= count
done += count
# (zenity closes at 100: that is left to the caller)
@@ -211,23 +223,24 @@ def extract(image_path, destination):
if percent != shown:
print(percent, flush=True)
shown = percent
except ExtractError:
raise ExtractError("Could not read %s from the disc image (is it complete?)." % name)
except OSError:
raise ExtractError("Could not write %s (is the storage full?)." % path)
# (the maps folder may be there, empty)
# then into maps (which may be there, empty), the language before and
# ui.map (the sign that the data is there) last
finished = os.path.join(destination, "maps")
try:
os.makedirs(finished, exist_ok=True)
for name, _, _ in files:
os.replace(os.path.join(partial, name), os.path.join(finished, name))
os.rmdir(partial)
language_file = os.path.join(finished, "language.txt")
if os.path.exists(language_file):
os.remove(language_file)
if language:
with open(language_file, "w") as out:
out.write(language + "\n")
order = [file for file in files if file is not user_interface] + [user_interface]
for name, _, _ in order:
os.replace(os.path.join(partial, name), os.path.join(finished, name))
os.rmdir(partial)
except OSError as error:
raise ExtractError("Could not move the maps into %s (%s)." % (finished, error.strerror))
+223
View File
@@ -0,0 +1,223 @@
/* Real mirror decisions with a delayed, renaming GPU. No API failures. */
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef int BOOL;
typedef unsigned GLuint, GLenum;
#define TRUE 1
#define FALSE 0
#ifndef TEST_DESKTOP
#define HALO_GLES 1
#endif
#define STREAM_BUFFER_RING 3
#define GL_COPY_WRITE_BUFFER 1
#define GL_DYNAMIC_DRAW 2
#define SEGMENT_SIZE 0x400000u
#define PLATFORM_CONTIGUOUS_SIZE (2 * SEGMENT_SIZE)
static unsigned char cpu[PLATFORM_CONTIGUOUS_SIZE];
#define PLATFORM_CONTIGUOUS_BASE ((unsigned long)cpu)
#define CHECK(x) do { if (!(x)) { fprintf(stderr, "line %d: %s\n", __LINE__, #x); exit(1); } } while (0)
static struct { unsigned long frame, buffer_ring; } device;
static struct { unsigned long mirrored_bytes; } stats;
static unsigned long generations[PLATFORM_CONTIGUOUS_SIZE / 4096], serial;
static unsigned mapped, subdata, overlaps, draws, mismatches, uploads;
static unsigned watch_reads, protections;
/* A subdata update may rename storage immediately and queue preservation
of the old store plus its changed bytes. A later unsynchronized write to
the new store can then be overwritten, even at a disjoint offset. */
static unsigned char *stores[2];
static GLuint bound, next_buffer;
struct command
{
struct command *next;
unsigned char *source, *destination, *expected;
unsigned long offset, size, sequence;
};
static struct command *head, *tail;
static unsigned long submitted, fences[STREAM_BUFFER_RING];
static void enqueue(unsigned char *source, unsigned char *destination,
unsigned char *expected, unsigned long offset, unsigned long size)
{
struct command *command = calloc(1, sizeof(*command));
CHECK(command);
command->source = source;
command->destination = destination;
command->expected = expected;
command->offset = offset;
command->size = size;
command->sequence = ++submitted;
if (tail) tail->next = command;
else head = command;
tail = command;
}
static void complete(unsigned long sequence)
{
while (head && head->sequence <= sequence)
{
struct command *command = head;
if (command->expected)
{
draws++;
if (memcmp(command->source + command->offset, command->expected, command->size)) mismatches++;
free(command->expected);
}
else
{
memcpy(command->destination + command->offset, command->source, command->size);
free(command->source);
}
head = command->next;
free(command);
}
if (!head) tail = NULL;
}
static void host_gl_fence_frame(unsigned slot) { fences[slot] = submitted; }
static void host_gl_wait_frame(unsigned slot) { complete(fences[slot]); }
static void next_frame(void)
{
/* The actual fence/rotation/wait statements from Present. */
#include "rotation.inc"
device.frame++;
}
static unsigned long memory_watch_generation(unsigned long address, unsigned long size)
{
unsigned long page = (address - PLATFORM_CONTIGUOUS_BASE) / 4096;
unsigned long last = (address - PLATFORM_CONTIGUOUS_BASE + size - 1) / 4096, newest = 0;
watch_reads++;
for (; page <= last; page++) if (generations[page] > newest) newest = generations[page];
return newest;
}
static void memory_watch_protect(unsigned long address, unsigned long size) { (void)address; (void)size; protections++; }
static void write_pages(unsigned first, unsigned count, unsigned char value)
{
unsigned page;
for (page = first; page < first + count; page++) generations[page] = ++serial;
memset(cpu + first * 4096, value, count * 4096);
}
static void glGenBuffers(int count, GLuint *buffer) { CHECK(count == 1 && next_buffer < 2); *buffer = ++next_buffer; }
static void glBindBuffer(GLenum target, GLuint buffer) { CHECK(target == GL_COPY_WRITE_BUFFER && buffer && buffer <= 2); bound = buffer - 1; }
static void glBufferData(GLenum target, unsigned long size, const void *data, GLenum usage)
{
CHECK(target == GL_COPY_WRITE_BUFFER && size == SEGMENT_SIZE && !data && usage == GL_DYNAMIC_DRAW);
stores[bound] = calloc(1, size);
CHECK(stores[bound]);
}
static void buffer_upload(GLenum target, unsigned long offset, unsigned long size, const void *data)
{
unsigned char *old = stores[bound], *copy = malloc(size);
CHECK(target == GL_COPY_WRITE_BUFFER && offset + size <= SEGMENT_SIZE && copy);
stores[bound] = calloc(1, SEGMENT_SIZE);
CHECK(stores[bound]);
memcpy(copy, data, size);
enqueue(old, stores[bound], NULL, 0, SEGMENT_SIZE);
enqueue(copy, stores[bound], NULL, offset, size);
subdata++;
uploads++;
}
static void host_gl_buffer_write(GLenum target, unsigned offset, unsigned size, const void *data)
{
struct command *command;
CHECK(target == GL_COPY_WRITE_BUFFER && offset + size <= SEGMENT_SIZE);
for (command = head; command; command = command->next)
{
if (command->destination == stores[bound] && offset < command->offset + command->size &&
command->offset < offset + size) overlaps++;
if (command->expected && command->source == stores[bound] && offset < command->offset + command->size &&
command->offset < offset + size) overlaps++;
}
memcpy(stores[bound] + offset, data, size);
mapped++;
uploads++;
}
#include "mirror.inc"
static int draw_pages(unsigned first, unsigned count)
{
GLuint buffer;
unsigned long offset;
unsigned char *expected;
if (!mirror_range(PLATFORM_CONTIGUOUS_BASE + first * 4096, count * 4096, &buffer, &offset, NULL)) return 0;
expected = malloc(count * 4096);
CHECK(expected);
memcpy(expected, cpu + first * 4096, count * 4096);
enqueue(stores[buffer - 1], NULL, expected, offset, count * 4096);
return 1;
}
int main(int argc, char **argv)
{
unsigned index, old_uploads;
int rollover = argc > 1 && !strcmp(argv[1], "rollover");
device.frame = rollover ? ~0UL - 1 : 100;
#ifdef HALO_ANDROID
/* First-use and reused ranges must always go to the caller's existing
streaming path, without creating GPU storage or consulting tracking. */
for (index = 0; index < 1200; index++)
{
GLuint buffer = 99;
unsigned long offset = 77, generation = 55;
write_pages(0, 300, (unsigned char)index);
CHECK(!mirror_range(PLATFORM_CONTIGUOUS_BASE, 300 * 4096, &buffer, &offset, &generation));
CHECK(buffer == 99 && offset == 77 && generation == 55);
CHECK(!draw_pages(0, 1));
CHECK(!draw_pages(1023, 2));
CHECK(!draw_pages(1024, 1));
next_frame();
}
CHECK(!next_buffer && !uploads && !watch_reads && !protections && !stats.mirrored_bytes);
fprintf(stderr, "bypassed=4800 allocations=0 uploads=0 watch_reads=0 protections=0\n");
return 0;
#endif
write_pages(0, 1, 1);
CHECK(draw_pages(0, 1));
CHECK(watch_reads && protections);
next_frame();
/* An ordinary reused allocation: some previously mirrored pages and
some first-time pages. 300 pages also crosses the 256-page refresh chunk. */
write_pages(0, 300, 2);
CHECK(draw_pages(0, 300));
CHECK(draw_pages(0, 1));
next_frame();
write_pages(300, 1, 3);
CHECK(draw_pages(300, 1));
next_frame();
write_pages(301, 1, 4);
CHECK(draw_pages(301, 1));
/* A different segment has no pending preservation copy. */
write_pages(1024, 1, 5);
CHECK(draw_pages(1024, 1));
CHECK(!draw_pages(1023, 2)); /* segment boundary streams instead */
for (index = 0; index < STREAM_BUFFER_RING; index++) next_frame();
index = mapped;
write_pages(302, 1, 6);
CHECK(draw_pages(302, 1));
#if defined(HALO_ANDROID) || defined(TEST_DESKTOP)
CHECK(mapped == 0); /* every persistent-cache upload is ordered */
#else
CHECK(mapped == index + 1); /* fast path returns after the fence */
#endif
complete(submitted);
old_uploads = uploads;
/* CPU generations are unchanged: any GPU damage is retained. */
for (index = 0; index < 1200; index++)
{
CHECK(draw_pages(256, 1));
next_frame();
}
complete(submitted);
CHECK(uploads == old_uploads);
fprintf(stderr, "mapped=%u subdata=%u overlaps=%u bad_draws=%u draws=%u repair_uploads=%u\n",
mapped, subdata, overlaps, mismatches, draws, uploads - old_uploads);
for (index = 0; index < 2; index++) free(stores[index]);
CHECK(overlaps == 0 && mismatches == 0);
return 0;
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 131 KiB

+317
View File
@@ -0,0 +1,317 @@
{
"assets": [
{
"name": "ce_hud_unit_meters",
"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_meters",
"bitmap": 0,
"scale": 4,
"format": "a8r8g8b8",
"ce_only": true,
"cells": [
{
"source": "hud_unit_meters__0",
"from": [
20,
288,
958,
505
],
"to": [
23.0,
136.0,
257.5,
190.25
],
"alignment": {
"anchor": "top_right",
"xbox_sprite": [
122,
34
],
"ce_sprite": [
262,
132
],
"pixels_per_xbox_texel": 8,
"ce_resolution": 2
}
},
{
"source": "hud_unit_meters__0",
"from": [
1141,
16,
1904,
129
],
"to": [
271.0,
2.0,
366.0,
16.0
]
},
{
"source": "hud_unit_meters__0",
"from": [
714,
527,
1403,
625
],
"to": [
84.5,
199.75,
256.75,
224.25
],
"alignment": {
"anchor": "top_right",
"xbox_sprite": [
176,
65
],
"ce_sprite": [
258,
198
],
"pixels_per_xbox_texel": 8,
"ce_resolution": 2
}
},
{
"source": "hud_unit_meters__0",
"from": [
68,
527,
684,
577
],
"to": [
389.0,
1.0,
466.0,
7.0
]
},
{
"source": "hud_unit_meters__0",
"from": [
132,
648,
923,
688
],
"to": [
33.0,
251.0,
237.0,
262.0
]
},
{
"source": "hud_unit_meters__0",
"from": [
1085,
400,
1803,
416
],
"to": [
271.0,
67.0,
364.0,
71.0
]
},
{
"source": "hud_unit_meters__0",
"from": [
5,
95,
799,
193
],
"to": [
15.0,
84.0,
169.0,
103.0
]
},
{
"source": "hud_unit_meters__0",
"from": [
981,
279,
1670,
377
],
"to": [
14.0,
3.0,
153.0,
22.0
]
}
],
"width": 512,
"height": 512,
"size": 262144,
"crc": 3491893663,
"coverage": true,
"point_threshold": true
},
{
"name": "ce_hud_ammo_meters",
"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_meters",
"bitmap": 0,
"scale": 4,
"format": "a8r8g8b8",
"ce_only": true,
"cells": [
{
"source": "hud_ammo_meters__0",
"from": [
0,
504,
830,
616
],
"to": [
2.0,
122.0,
208.0,
151.0
]
},
{
"source": "hud_ammo_meters__0",
"from": [
7,
11,
898,
208
],
"to": [
1.0,
2.0,
225.0,
51.0
]
},
{
"source": "hud_ammo_meters__0",
"from": [
1048,
224,
1903,
352
],
"to": [
268.0,
54.0,
469.0,
86.0
]
},
{
"source": "hud_ammo_meters__0",
"from": [
848,
504,
1672,
592
],
"to": [
211.0,
122.0,
417.0,
145.0
]
},
{
"source": "hud_ammo_meters__0",
"from": [
872,
368,
1740,
488
],
"to": [
216.0,
89.0,
434.0,
120.0
]
},
{
"source": "hud_ammo_meters__0",
"from": [
4,
368,
855,
484
],
"to": [
2.0,
89.0,
214.0,
119.0
]
},
{
"source": "hud_ammo_meters__0",
"from": [
920,
8,
1756,
168
],
"to": [
245.0,
2.0,
431.0,
41.0
]
},
{
"source": "hud_ammo_meters__0",
"from": [
14,
224,
887,
352
],
"to": [
2.0,
54.0,
219.0,
87.0
]
},
{
"source": "hud_ammo_meters__0",
"from": [
18,
632,
835,
664
],
"to": [
2.0,
153.0,
187.0,
162.0
]
}
],
"width": 512,
"height": 512,
"size": 1048576,
"crc": 1316117604,
"coverage": true,
"point_threshold": true
}
]
}
+82
View File
@@ -0,0 +1,82 @@
{
"resource_sha256": "317658e0ebd4aa189bac68e994fe0b515928f44d17b62ba676d8850aa329dd3d",
"bitmaps": [
{"tag": "ui\\hud\\bitmaps\\combined\\hud_weapon_backgrounds", "bitmap": 0, "width": 128, "height": 32, "size": 16384, "crc": 2336761448},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_weapon_backgrounds", "bitmap": 1, "width": 128, "height": 32, "size": 16384, "crc": 1382921092},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_weapon_backgrounds", "bitmap": 2, "width": 128, "height": 32, "size": 16384, "crc": 2368424546},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_weapon_backgrounds", "bitmap": 3, "width": 128, "height": 128, "size": 65536, "crc": 2101251412},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_weapon_backgrounds", "bitmap": 4, "width": 64, "height": 64, "size": 16384, "crc": 1083921210},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_outlines", "bitmap": 0, "width": 128, "height": 32, "size": 4096, "crc": 2685300349},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_outlines", "bitmap": 1, "width": 128, "height": 8, "size": 1024, "crc": 2768572645},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_outlines", "bitmap": 2, "width": 128, "height": 32, "size": 4096, "crc": 4194268279},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_outlines", "bitmap": 3, "width": 128, "height": 32, "size": 4096, "crc": 1151077783},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_type_icons", "bitmap": 0, "width": 32, "height": 16, "size": 2048, "crc": 3757329756},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_type_icons", "bitmap": 1, "width": 64, "height": 16, "size": 4096, "crc": 1699380589},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_type_icons", "bitmap": 2, "width": 32, "height": 16, "size": 2048, "crc": 1250297732},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_type_icons", "bitmap": 3, "width": 32, "height": 16, "size": 2048, "crc": 1096370127},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_type_icons", "bitmap": 4, "width": 32, "height": 16, "size": 2048, "crc": 1461299380},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_msg_icons", "bitmap": 0, "width": 128, "height": 128, "size": 65536, "crc": 634647465},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_msg_icons", "bitmap": 1, "width": 128, "height": 128, "size": 65536, "crc": 2663295025},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_msg_icons", "bitmap": 2, "width": 128, "height": 128, "size": 65536, "crc": 4013307535},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_msg_icons", "bitmap": 3, "width": 128, "height": 128, "size": 65536, "crc": 1215291247},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_msg_icons", "bitmap": 4, "width": 128, "height": 128, "size": 65536, "crc": 4173016642},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_waypoints", "bitmap": 0, "width": 128, "height": 128, "size": 65536, "crc": 1547299393},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 0, "width": 128, "height": 128, "size": 65536, "crc": 2514937598},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 1, "width": 64, "height": 64, "size": 16384, "crc": 1934334840},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 2, "width": 64, "height": 64, "size": 16384, "crc": 2036152485},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 3, "width": 64, "height": 64, "size": 16384, "crc": 1222075981},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 4, "width": 64, "height": 64, "size": 16384, "crc": 3524091297},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 5, "width": 64, "height": 64, "size": 16384, "crc": 1478490245},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 6, "width": 64, "height": 64, "size": 16384, "crc": 2425719365},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 7, "width": 64, "height": 64, "size": 16384, "crc": 2841977525},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 8, "width": 64, "height": 64, "size": 16384, "crc": 1789610607},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 9, "width": 64, "height": 64, "size": 16384, "crc": 10769595},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 10, "width": 64, "height": 64, "size": 16384, "crc": 112721360},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 11, "width": 64, "height": 64, "size": 16384, "crc": 1500905970},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 12, "width": 64, "height": 64, "size": 16384, "crc": 2831607766},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 13, "width": 64, "height": 64, "size": 16384, "crc": 3213345147},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticle_warnings", "bitmap": 0, "width": 128, "height": 128, "size": 65536, "crc": 598528602},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_damage_arrows", "bitmap": 0, "width": 256, "height": 256, "size": 262144, "crc": 4014689458},
{"tag": "ui\\hud\\bitmaps\\hud_sweeper", "bitmap": 0, "width": 64, "height": 64, "size": 4096, "crc": 1530348706},
{"tag": "ui\\hud\\bitmaps\\hud_sweeper_mask", "bitmap": 0, "width": 64, "height": 64, "size": 4096, "crc": 3264958306},
{"tag": "ui\\hud\\bitmaps\\hud_multiplayer", "bitmap": 0, "width": 64, "height": 32, "size": 2048, "crc": 279669690},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_counter_numbers", "bitmap": 0, "width": 128, "height": 128, "size": 65536, "crc": 22576901},
{"tag": "ui\\hud\\bitmaps\\hud_sensor_blip", "bitmap": 0, "width": 32, "height": 32, "size": 1024, "crc": 2905414509},
{"tag": "ui\\hud\\bitmaps\\hud_sensor_blip_custom", "bitmap": 0, "width": 32, "height": 32, "size": 512, "crc": 2318551224},
{"tag": "ui\\hud\\bitmaps\\hud_msg_icons_sm", "bitmap": 0, "width": 128, "height": 128, "size": 65536, "crc": 2829841605},
{"tag": "ui\\hud\\bitmaps\\hud_msg_icons_sm", "bitmap": 1, "width": 128, "height": 128, "size": 65536, "crc": 2261388858},
{"tag": "ui\\hud\\bitmaps\\hud_health_base", "bitmap": 0, "width": 128, "height": 32, "size": 8192, "crc": 2334111445},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_alphas", "bitmap": 0, "width": 512, "height": 512, "size": 1048576, "crc": 2672369332},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_meters", "bitmap": 0, "width": 512, "height": 512, "size": 1048576, "crc": 1316117604},
{"tag": "ui\\hud\\bitmaps\\sniper\\hud_reticles_scope", "bitmap": 0, "width": 64, "height": 64, "size": 16384, "crc": 3359213591},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs2", "bitmap": 0, "width": 64, "height": 256, "size": 65536, "crc": 2440566533},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs2", "bitmap": 1, "width": 64, "height": 256, "size": 65536, "crc": 1451459225},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs2", "bitmap": 2, "width": 128, "height": 8, "size": 4096, "crc": 2199832653},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs2", "bitmap": 3, "width": 128, "height": 8, "size": 4096, "crc": 1036536086},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs2", "bitmap": 4, "width": 8, "height": 128, "size": 4096, "crc": 3263269116},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs_sm", "bitmap": 0, "width": 32, "height": 128, "size": 16384, "crc": 703763697},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs_sm", "bitmap": 1, "width": 32, "height": 128, "size": 16384, "crc": 183991369},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs_sm", "bitmap": 2, "width": 128, "height": 4, "size": 2048, "crc": 2030486740},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs_sm", "bitmap": 3, "width": 128, "height": 4, "size": 2048, "crc": 1345205876},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs_sm", "bitmap": 4, "width": 4, "height": 64, "size": 1024, "crc": 1676080439},
{"tag": "ui\\hud\\bitmaps\\sniper\\caption", "bitmap": 0, "width": 128, "height": 128, "size": 65536, "crc": 120126724},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_mask2", "bitmap": 0, "width": 512, "height": 256, "size": 524288, "crc": 2575239539},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_mask_sm", "bitmap": 0, "width": 256, "height": 256, "size": 262144, "crc": 2593381205},
{"tag": "ui\\hud\\bitmaps\\pistol\\pistol_scope_mask", "bitmap": 0, "width": 256, "height": 256, "size": 262144, "crc": 1764629049},
{"tag": "ui\\hud\\bitmaps\\pistol\\pistol_scope_mask split", "bitmap": 0, "width": 256, "height": 256, "size": 262144, "crc": 343664195},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 0, "width": 256, "height": 64, "size": 65536, "crc": 3748199011},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 1, "width": 128, "height": 32, "size": 16384, "crc": 550837563},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 2, "width": 256, "height": 32, "size": 32768, "crc": 2456043857},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 3, "width": 256, "height": 32, "size": 32768, "crc": 1948057961},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 4, "width": 256, "height": 16, "size": 16384, "crc": 2860676839},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 5, "width": 128, "height": 8, "size": 4096, "crc": 3272812517},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 6, "width": 128, "height": 128, "size": 65536, "crc": 1984211349},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 7, "width": 64, "height": 64, "size": 16384, "crc": 1269964274},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 8, "width": 256, "height": 64, "size": 65536, "crc": 526077822},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 9, "width": 256, "height": 64, "size": 65536, "crc": 2003746041},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 10, "width": 256, "height": 64, "size": 65536, "crc": 3746007716},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 11, "width": 128, "height": 32, "size": 16384, "crc": 3375336138},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 12, "width": 256, "height": 64, "size": 65536, "crc": 4225542721},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_meters", "bitmap": 0, "width": 512, "height": 512, "size": 262144, "crc": 3491893663}
]
}
+68
View File
@@ -0,0 +1,68 @@
{
"note": "High-res HUD textures whose bitmap has the same layout in Halo Custom Edition (the same sprites, the same size or twice it), compared against the stock bitmaps.map and bloodgulch.map; hud_hires.c draws them for a Custom Edition map's stock bitmap of that name as well.",
"assets": [
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_outlines", "bitmap": 0, "width": 128, "height": 32, "size": 4096, "crc": 2685300349},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_outlines", "bitmap": 1, "width": 128, "height": 8, "size": 1024, "crc": 2768572645},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_outlines", "bitmap": 2, "width": 128, "height": 32, "size": 4096, "crc": 4194268279},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_outlines", "bitmap": 3, "width": 128, "height": 32, "size": 4096, "crc": 1151077783},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_type_icons", "bitmap": 0, "width": 32, "height": 16, "size": 2048, "crc": 3757329756},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_type_icons", "bitmap": 1, "width": 64, "height": 16, "size": 4096, "crc": 1699380589},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_type_icons", "bitmap": 2, "width": 32, "height": 16, "size": 2048, "crc": 1250297732},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_type_icons", "bitmap": 3, "width": 32, "height": 16, "size": 2048, "crc": 1096370127},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_type_icons", "bitmap": 4, "width": 32, "height": 16, "size": 2048, "crc": 1461299380},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_counter_numbers", "bitmap": 0, "width": 128, "height": 128, "size": 65536, "crc": 22576901},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_damage_arrows", "bitmap": 0, "width": 256, "height": 256, "size": 262144, "crc": 4014689458},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 0, "width": 256, "height": 64, "size": 65536, "crc": 3748199011},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 1, "width": 128, "height": 32, "size": 16384, "crc": 550837563},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 2, "width": 256, "height": 32, "size": 32768, "crc": 2456043857},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 3, "width": 256, "height": 32, "size": 32768, "crc": 1948057961},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 4, "width": 256, "height": 16, "size": 16384, "crc": 2860676839},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 5, "width": 128, "height": 8, "size": 4096, "crc": 3272812517},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 6, "width": 128, "height": 128, "size": 65536, "crc": 1984211349},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_backgrounds", "bitmap": 7, "width": 64, "height": 64, "size": 16384, "crc": 1269964274},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_waypoints", "bitmap": 0, "width": 128, "height": 128, "size": 65536, "crc": 1547299393},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_weapon_backgrounds", "bitmap": 0, "width": 128, "height": 32, "size": 16384, "crc": 2336761448},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_weapon_backgrounds", "bitmap": 1, "width": 128, "height": 32, "size": 16384, "crc": 1382921092},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_weapon_backgrounds", "bitmap": 2, "width": 128, "height": 32, "size": 16384, "crc": 2368424546},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_weapon_backgrounds", "bitmap": 3, "width": 128, "height": 128, "size": 65536, "crc": 2101251412},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_weapon_backgrounds", "bitmap": 4, "width": 64, "height": 64, "size": 16384, "crc": 1083921210},
{"tag": "ui\\hud\\bitmaps\\hud_health_base", "bitmap": 0, "width": 128, "height": 32, "size": 8192, "crc": 2334111445},
{"tag": "ui\\hud\\bitmaps\\hud_multiplayer", "bitmap": 0, "width": 64, "height": 32, "size": 2048, "crc": 279669690},
{"tag": "ui\\hud\\bitmaps\\hud_sensor_blip", "bitmap": 0, "width": 32, "height": 32, "size": 1024, "crc": 2905414509},
{"tag": "ui\\hud\\bitmaps\\hud_sensor_blip_custom", "bitmap": 0, "width": 32, "height": 32, "size": 512, "crc": 2318551224},
{"tag": "ui\\hud\\bitmaps\\hud_sweeper", "bitmap": 0, "width": 64, "height": 64, "size": 4096, "crc": 1530348706},
{"tag": "ui\\hud\\bitmaps\\hud_sweeper_mask", "bitmap": 0, "width": 64, "height": 64, "size": 4096, "crc": 3264958306},
{"tag": "ui\\hud\\bitmaps\\pistol\\pistol_scope_mask", "bitmap": 0, "width": 256, "height": 256, "size": 262144, "crc": 1764629049},
{"tag": "ui\\hud\\bitmaps\\pistol\\pistol_scope_mask split", "bitmap": 0, "width": 256, "height": 256, "size": 262144, "crc": 343664195},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs2", "bitmap": 0, "width": 64, "height": 256, "size": 65536, "crc": 2440566533},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs2", "bitmap": 1, "width": 64, "height": 256, "size": 65536, "crc": 1451459225},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs2", "bitmap": 2, "width": 128, "height": 8, "size": 4096, "crc": 2199832653},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs2", "bitmap": 3, "width": 128, "height": 8, "size": 4096, "crc": 1036536086},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs2", "bitmap": 4, "width": 8, "height": 128, "size": 4096, "crc": 3263269116},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs_sm", "bitmap": 0, "width": 32, "height": 128, "size": 16384, "crc": 703763697},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs_sm", "bitmap": 1, "width": 32, "height": 128, "size": 16384, "crc": 183991369},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs_sm", "bitmap": 2, "width": 128, "height": 4, "size": 2048, "crc": 2030486740},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs_sm", "bitmap": 3, "width": 128, "height": 4, "size": 2048, "crc": 1345205876},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_crosshairs_sm", "bitmap": 4, "width": 4, "height": 64, "size": 1024, "crc": 1676080439},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_mask2", "bitmap": 0, "width": 512, "height": 256, "size": 524288, "crc": 2575239539},
{"tag": "ui\\hud\\bitmaps\\sniper\\sniper_scope_mask_sm", "bitmap": 0, "width": 256, "height": 256, "size": 262144, "crc": 2593381205},
{"tag": "weapons\\sniper rifle\\bitmaps\\angle_ticks", "bitmap": 0, "width": 8, "height": 512, "size": 4096, "crc": 2262136367},
{"tag": "weapons\\sniper rifle\\bitmaps\\angle_ticks2", "bitmap": 0, "width": 8, "height": 512, "size": 4096, "crc": 2208884634},
{"tag": "weapons\\sniper rifle\\bitmaps\\angle_ticks_mask", "bitmap": 0, "width": 8, "height": 256, "size": 2048, "crc": 283547923},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_unit_meters", "bitmap": 0, "width": 512, "height": 512, "size": 262144, "crc": 3491893663, "replacement": "ce_hud_unit_meters"},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_ammo_meters", "bitmap": 0, "width": 512, "height": 512, "size": 1048576, "crc": 1316117604, "replacement": "ce_hud_ammo_meters"},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 0, "width": 128, "height": 128, "size": 65536, "crc": 2514937598},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 1, "width": 64, "height": 64, "size": 16384, "crc": 1934334840},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 2, "width": 64, "height": 64, "size": 16384, "crc": 2036152485},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 3, "width": 64, "height": 64, "size": 16384, "crc": 1222075981},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 4, "width": 64, "height": 64, "size": 16384, "crc": 3524091297},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 5, "width": 64, "height": 64, "size": 16384, "crc": 1478490245},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 6, "width": 64, "height": 64, "size": 16384, "crc": 2425719365},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 7, "width": 64, "height": 64, "size": 16384, "crc": 2841977525},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 8, "width": 64, "height": 64, "size": 16384, "crc": 1789610607},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 9, "width": 64, "height": 64, "size": 16384, "crc": 10769595},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 10, "width": 64, "height": 64, "size": 16384, "crc": 112721360},
{"tag": "ui\\hud\\bitmaps\\combined\\hud_reticles", "bitmap": 11, "width": 64, "height": 64, "size": 16384, "crc": 1500905970}
],
"resource_sha256": "317658e0ebd4aa189bac68e994fe0b515928f44d17b62ba676d8850aa329dd3d"
}
+1 -1
View File
@@ -62,7 +62,7 @@ until it is redrawn.
| `ce/shell/main_menu/settings_select/player_setup/player_profile_edit/profile_options__6.png` | 512x256 | `shell/main_menu/settings_select/player_setup/player_profile_edit/profile_options__6.png` |
| `ce/shell/main_menu/settings_select/player_setup/player_profile_edit/profile_options__8.png` | 512x256 | `shell/main_menu/settings_select/player_setup/player_profile_edit/profile_options__8.png` |
13 of 177 frames are placeholders.
13 of 183 frames are placeholders.
The PC version's `ui\gamespy` and `ui\ticker` fonts are drawn with `ui\small_ui`, which
the Xbox's map has.
+8
View File
@@ -100,6 +100,14 @@ the bitmap has exactly two frames; the game's functions choose others.
A list of texts, which widgets show by number. `\n` starts a new line.
A list may name the PC version's list of the same texts with `map=` (its tag,
`ui\shell\main_menu\main_menu_options`), and each of its texts that is one
of that list's its number there (`<string text="NEW CAMPAIGN" map="0"/>`).
Each Custom Edition has that list in its language in its `loc.map`: with
`display.menu_language = "maps"`, a text with a number is the list's from
the `loc.map` in `custom_maps`, when it has the list and the number. A text
without one (the port's own) is always the file's.
### `<widget>`
A screen, or a part of one. Its children are `<widget>` elements in it, or
+3 -8
View File
@@ -10,18 +10,13 @@ do (save a setting, join a game) does not happen; the screens open and close as
| Function | Uses | |
| --- | --- | --- |
| `common button bar update` | 28 | PC function |
| `common button bar update` | 29 | PC function |
| `direct ip connect init` | 1 | PC function |
| `direct ip connect update` | 1 | PC function |
| `direct ip edit field` | 4 | PC function |
| `gamespy screen update` | 1 | PC function |
| `gamespy select button` | 8 | PC function |
| `gamespy select header` | 22 | PC function |
| `gamespy select item` | 49 | PC function |
| `gamespy update filter settings` | 2 | PC function |
| `gt edit list update` | 1 | PC function |
| `gt select list update` | 1 | PC function |
| `mouse spinner 1wide click` | 84 | PC function |
| `mouse spinner 1wide click` | 99 | PC function |
| `mp map list update` | 1 | PC function |
| `mp prof init teamplay options` | 1 | PC function |
| `mp prof init vehicle options` | 1 | PC function |
@@ -33,4 +28,4 @@ do (save a setting, join a game) does not happen; the screens open and close as
| `ss edit server name` | 2 | PC function |
| `ss start game` | 2 | PC function |
Wired: `campaign menu continue`, `campaign menu init`, `controls back handler`, `controls begin binding`, `controls screen change set`, `controls screen defaults`, `controls screen init`, `controls update menu`, `difficulty item select`, `direct ip connect go`, `emit custom activation event`, `gamespy back handler`, `gamespy dismiss error`, `gamespy dismiss filters`, `gamespy screen dispose`, `gamespy screen init`, `load game list update`, `load game menu activated`, `load game menu delete finish`, `load game menu delete request`, `load game menu dispose`, `load game menu init`, `main menu quit game`, `mouse emit accept event`, `mouse emit back event`, `mouse emit x event`, `mp type set mode`, `profile manager select`, `profile set edit begin`, `single prev cl item activated`, `solo map list update`, `ss edit server password`.
Wired: `campaign menu continue`, `campaign menu init`, `controls back handler`, `controls begin binding`, `controls screen change set`, `controls screen defaults`, `controls screen init`, `controls update menu`, `difficulty item select`, `direct ip connect go`, `emit custom activation event`, `gamespy back handler`, `gamespy dismiss error`, `gamespy dismiss filters`, `gamespy screen dispose`, `gamespy screen init`, `gamespy screen update`, `gamespy select button`, `gamespy select header`, `gamespy select item`, `gamespy update filter settings`, `load game list update`, `load game menu activated`, `load game menu delete finish`, `load game menu delete request`, `load game menu dispose`, `load game menu init`, `main menu quit game`, `mouse emit accept event`, `mouse emit back event`, `mouse emit x event`, `mp type set mode`, `profile manager select`, `profile set edit begin`, `single prev cl item activated`, `solo map list update`, `ss edit server password`.
+6
View File
@@ -348,25 +348,31 @@
<frame png="ce/port/pause/pausebox_left__0.png" width="16" height="256"/>
<frame png="ce/port/pause/pausebox_left__1.png" width="16" height="256"/>
<frame png="ce/port/pause/pausebox_left__2.png" width="16" height="256"/>
<frame png="ce/port/pause/pausebox_left__3.png" width="16" height="256"/>
</bitmap>
<bitmap name="pause/pausebox_center">
<frame png="ce/port/pause/pausebox_center__0.png" width="4" height="256"/>
<frame png="ce/port/pause/pausebox_center__1.png" width="4" height="256"/>
<frame png="ce/port/pause/pausebox_center__2.png" width="4" height="256"/>
<frame png="ce/port/pause/pausebox_center__3.png" width="4" height="256"/>
</bitmap>
<bitmap name="pause/pausebox_right">
<frame png="ce/port/pause/pausebox_right__0.png" width="16" height="256"/>
<frame png="ce/port/pause/pausebox_right__1.png" width="16" height="256"/>
<frame png="ce/port/pause/pausebox_right__2.png" width="16" height="256"/>
<frame png="ce/port/pause/pausebox_right__3.png" width="16" height="256"/>
</bitmap>
<bitmap name="pause/objectives_left">
<frame png="ce/port/pause/objectives_left__0.png" width="16" height="256"/>
<frame png="ce/port/pause/objectives_left__1.png" width="16" height="256"/>
</bitmap>
<bitmap name="pause/objectives_center">
<frame png="ce/port/pause/objectives_center__0.png" width="4" height="256"/>
<frame png="ce/port/pause/objectives_center__1.png" width="4" height="256"/>
</bitmap>
<bitmap name="pause/objectives_right">
<frame png="ce/port/pause/objectives_right__0.png" width="16" height="256"/>
<frame png="ce/port/pause/objectives_right__1.png" width="16" height="256"/>
</bitmap>
<bitmap name="voice/speaker">
<frame png="ce/port/voice/speaker__0.png" width="24" height="24"/>
@@ -3,7 +3,7 @@
<menus>
<widget name="main_menu/multiplayer_type_select/join_game/filters/empty_servers_label" type="text" width="300" height="22" string_list="main_menu/multiplayer_type_select/join_game/filters/filter_options" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/empty_servers_spinner" type="spinner" left="3" top="2" width="187" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="strings/var_boolean" font="ui\large_ui" color="#FF2896FF" align="center" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 190 19 196">
<widget name="main_menu/multiplayer_type_select/join_game/filters/empty_servers_spinner" type="spinner" left="3" top="2" width="187" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" font="ui\large_ui" color="#FF2896FF" align="center" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 190 19 196" strings="NO|YES" setting="network.browser_show_empty" values="false|true">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/filters_button_bar" type="column_list" width="640" height="28" flags="pass_unhandled_to_focused_child left_right_tabs_items">
@@ -22,10 +22,8 @@
<data input="game settings lists text update"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/op_empty_servers" x="54" y="73"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/op_full_servers" x="54" y="103"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/op_ping" x="54" y="133"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/op_game_type" x="54" y="163"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/op_game_options" x="54" y="193"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/op_installed_maps" x="54" y="223"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/op_game_type" x="54" y="133"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/op_installed_maps" x="54" y="163"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/filters_button_bar" y="449"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/filters_screen" width="640" height="480" flags="pass_unhandled_to_focused_child force_handle_mouse" bitmap="bitmaps/gradient_big">
@@ -34,24 +32,19 @@
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/full_servers_label" type="text" width="300" height="22" string_list="main_menu/multiplayer_type_select/join_game/filters/filter_options" string_index="1" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/full_servers_spinner" type="spinner" left="3" top="2" width="187" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="strings/var_boolean" font="ui\large_ui" color="#FF2896FF" align="center" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 190 19 196">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/game_options_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/join_game/filters/filter_options" string_index="4" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/game_options_spinner" type="spinner" left="3" top="2" width="187" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/join_game/filters/var_filter_game_options" font="ui\large_ui" color="#FF2896FF" align="center" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 190 19 196">
<widget name="main_menu/multiplayer_type_select/join_game/filters/full_servers_spinner" type="spinner" left="3" top="2" width="187" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" font="ui\large_ui" color="#FF2896FF" align="center" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 190 19 196" strings="NO|YES" setting="network.browser_show_full" values="false|true">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/game_type_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/join_game/filters/filter_options" string_index="3" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/game_type_spinner" type="spinner" left="3" top="2" width="187" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/join_game/filters/var_filter_gametype" font="ui\large_ui" color="#FF2896FF" align="center" list_flags="items_from_strings one_tooltip" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 190 19 196">
<widget name="main_menu/multiplayer_type_select/join_game/filters/game_type_spinner" type="spinner" left="3" top="2" width="187" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" font="ui\large_ui" color="#FF2896FF" align="center" list_flags="items_from_strings one_tooltip" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 190 19 196" strings="ANY|CTF|SLAYER|ODDBALL|KING|RACE" setting="network.browser_gametype" values="any|ctf|slayer|oddball|king|race">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/header_filters" controller="1" left="35" top="11" width="395" height="59" bitmap="main_menu/multiplayer_type_select/join_game/filters/header_filters">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/installed_maps_label" type="text" width="300" height="22" string_list="main_menu/multiplayer_type_select/join_game/filters/filter_options" string_index="5" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/installed_maps_spinner" type="spinner" left="3" top="2" width="187" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="strings/var_boolean" font="ui\large_ui" color="#FF2896FF" align="center" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 190 19 196">
<widget name="main_menu/multiplayer_type_select/join_game/filters/installed_maps_spinner" type="spinner" left="3" top="2" width="187" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" font="ui\large_ui" color="#FF2896FF" align="center" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 190 19 196" strings="NO|YES|IF DOWNLOADABLE" setting="network.browser_maps" values="no|yes|downloadable">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/op_empty_servers" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
@@ -62,10 +55,6 @@
<child widget="main_menu/multiplayer_type_select/join_game/filters/full_servers_label"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/full_servers_spinner" x="300" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/op_game_options" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/join_game/filters/game_options_label"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/game_options_spinner" x="300" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/op_game_type" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/join_game/filters/game_type_label"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/game_type_spinner" x="300" y="1"/>
@@ -74,13 +63,4 @@
<child widget="main_menu/multiplayer_type_select/join_game/filters/installed_maps_label"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/installed_maps_spinner" x="300" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/op_ping" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/join_game/filters/ping_label"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/ping_spinner" x="300" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/ping_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/join_game/filters/filter_options" string_index="2" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/filters/ping_spinner" type="spinner" left="3" top="2" width="187" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/join_game/filters/var_filter_ping" font="ui\large_ui" color="#FF2896FF" align="center" list_flags="items_from_strings one_tooltip" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 190 19 196">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
</menus>
@@ -52,6 +52,53 @@
<string text="That is not the game's password. Try again."/>
<string text="Could not join the game."/>
</strings>
<strings name="main_menu/multiplayer_type_select/join_game/browser_words">
<string text="of"/>
<string text="players"/>
<string text="player"/>
<string text="under way"/>
<string text="full or starting"/>
<string text="Dedicated server by"/>
<string text="listed on"/>
<string text="master server"/>
<string text="master servers"/>
<string text="Dedicated server"/>
<string text="Hosted by a player (anonymous listing)"/>
<string text="Password required"/>
<string text="Needs the newer build: Settings &gt; Network Setup &gt; Check for updates"/>
<string text="Runs an older build: it can be joined once it updates"/>
<string text="Asking the brokers for the host..."/>
<string text="The host answered: connecting (UDP hole punching)..."/>
<string text="Connected: joining the game..."/>
<string text="The host did not answer (offline, or its listing is stale)"/>
<string text="No route to the host: a forwarded port on either side helps"/>
<string text="The host refused: full"/>
<string text="The host refused: closed"/>
<string text="The host refused: banned"/>
<string text="The host refused: wrong password"/>
<string text="The host refused: another version"/>
<string text="The host refused: its invite changed"/>
<string text="Strict NAT: turn on UPnP, or forward a port"/>
<string text="Internet play is off (Settings)"/>
<string text="The server browser is off (network.public_lobby)"/>
<string text="Looking for public games..."/>
<string text="Games on a newer version (update the game to join them):"/>
<string text="No public games found"/>
<string text="No games match the filters"/>
<string text="No master server answered: showing player-hosted games only"/>
<string text="dedicated"/>
<string text="JOINING"/>
<string text="NEWER"/>
<string text="OLDER"/>
<string text="FAILED"/>
<string text="LIVE"/>
<string text="CLOSED"/>
<string text="Internet play is off:\nSettings &gt; Network Setup"/>
<string text="Neither the master servers\nnor the brokers answer:\ncheck the connection"/>
<string text="The host refused: your player name"/>
</strings>
<widget name="main_menu/multiplayer_type_select/join_game/error_words" type="text" controller="1" width="280" height="159" bitmap="bitmaps/alert_bkd" font="ui\large_ui" color="#FF2896FF" text_x="9" text_y="35" text_flags="no_focus_test">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/header_server_browser" controller="1" left="35" top="11" width="363" height="59" bitmap="main_menu/multiplayer_type_select/join_game/header_server_browser">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/header_direct_link" controller="1" left="35" top="11" width="363" height="59" bitmap="main_menu/multiplayer_type_select/join_game/header_direct_link">
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- The PC version's menus: ui\shell\main_menu\multiplayer_type_select\join_game (tools/ce_menus.py) -->
<menus>
<widget name="main_menu/multiplayer_type_select/join_game/browser_mode_spinner" type="spinner" left="3" top="2" width="97" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/join_game/join_game_mode" font="ui\large_ui" color="#FFCCCCCC" align="center" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 100 19 106">
<widget name="main_menu/multiplayer_type_select/join_game/browser_mode_spinner" type="spinner" left="3" top="2" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" color="#FFCCCCCC" align="center" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" strings="ALL GAMES|DEDICATED|P2P GAMES" setting="network.browser_source" values="all|dedicated|players" width="117" footer_bounds="7 120 19 126" font="ui\small_ui" text_y="3">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/gamespy_error_fullscreen" width="640" height="480" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/black">
@@ -9,6 +9,7 @@
<on event="start" run="gamespy dismiss error"/>
<on event="b" run="gamespy dismiss error"/>
<on event="back" run="gamespy dismiss error"/>
<child widget="main_menu/multiplayer_type_select/join_game/error_words" x="192" y="176"/>
<child widget="error/error_modal"/>
<child widget="error/error_modal_button_bar" x="194" y="309"/>
</widget>
@@ -110,8 +111,8 @@
<child widget="main_menu/multiplayer_type_select/join_game/gamespy_error_fullscreen"/>
<child widget="main_menu/multiplayer_type_select/join_game/filters/filters_screen"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/op_browser_mode" width="150" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds_sm2" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/join_game/browser_mode_spinner" x="25" y="1"/>
<widget name="main_menu/multiplayer_type_select/join_game/op_browser_mode" width="150" height="28" flags="pass_unhandled_to_focused_child" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/join_game/browser_mode_spinner" x="16" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/op_sort_header_classic" width="20" height="18" bitmap="bitmaps/server_header_background_0" string_list="main_menu/multiplayer_type_select/join_game/join_game_column_headers" string_index="1" font="ui\small_ui" color="#FFFFFFFF" text_y="1">
<on event="a" run="gamespy select header"/>
@@ -166,12 +167,12 @@
<child widget="main_menu/multiplayer_type_select/join_game/header_sort_arrows" x="24" y="4"/>
<child widget="main_menu/multiplayer_type_select/join_game/sort_header_type"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/page_count_label" type="text" controller="1" width="170" height="30" font="ui\small_ui" color="#FFFFFFFF" text_flags="no_focus_test">
<widget name="main_menu/multiplayer_type_select/join_game/page_count_label" type="text" controller="1" width="170" height="30" font="ui\small_ui" color="#FFFFFFFF" text_flags="no_focus_test" align="center">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/player_count_label" type="text" controller="1" width="170" height="30" font="ui\small_ui" color="#FFFFFFFF" text_flags="no_focus_test">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/screen_stats_container" controller="1" width="640" height="480" color="#FFFFFFFF" align="right">
<child widget="main_menu/multiplayer_type_select/join_game/server_count_label" x="450" y="60"/>
<child widget="main_menu/multiplayer_type_select/join_game/server_count_label" x="410" y="60"/>
<child widget="main_menu/multiplayer_type_select/join_game/player_count_label" x="15" y="60"/>
<child widget="main_menu/multiplayer_type_select/join_game/page_count_label" x="310" y="60"/>
</widget>
@@ -191,7 +192,7 @@
<on event="left_mouse" run="mouse emit accept event"/>
<child widget="main_menu/multiplayer_type_select/join_game/scroll_up_arrow" x="268" y="3"/>
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/server_count_label" type="text" controller="1" width="170" height="30" font="ui\small_ui" color="#FFFFFFFF" align="right" text_flags="no_focus_test">
<widget name="main_menu/multiplayer_type_select/join_game/server_count_label" type="text" controller="1" height="30" font="ui\small_ui" color="#FFFFFFFF" align="right" text_flags="no_focus_test" width="210">
</widget>
<widget name="main_menu/multiplayer_type_select/join_game/server_item_1" width="620" height="18" bitmap="bitmaps/server_item_bkds">
<on event="a" run="gamespy select item"/>
@@ -105,6 +105,9 @@
</widget>
<widget name="main_menu/multiplayer_type_select/lobby/lobby_game_data" type="text" controller="1" left="417" top="250" width="146" height="144" font="ui\small_ui" color="#FF2896FF">
</widget>
<strings name="main_menu/multiplayer_type_select/lobby/lobby_words">
<string text="dedicated"/>
</strings>
<widget name="main_menu/multiplayer_type_select/lobby/lobby_button_bar" type="column_list" width="640" height="28" flags="pass_unhandled_to_focused_child left_right_tabs_items">
<child widget="main_menu/multiplayer_type_select/lobby/lobby_button_team" x="120" y="1"/>
<child widget="main_menu/multiplayer_type_select/lobby/lobby_button_start" x="250" y="1"/>
@@ -216,12 +216,13 @@
<string text="Each team's vehicles and their respawn time, for\nthis game."/>
<string text="The motion tracker and nav points, for this game."/>
<string text="Friendly fire and team balance, for this game."/>
<string text="Anyone can see and join your game: it is listed\nin everyone's Server Browser."/>
<string text="Anyone can see and join your game: it is listed\nfor everyone through the brokers."/>
<string text="Only players with your invite link can join."/>
<string text="Friendly fire, the enemies and player collisions,\nfor this game."/>
<string text="Voice chat, text chat and votes to kick a player,\nfor this game."/>
<string text="Players from the Server Browser must type it to\njoin (an invite link needs none). Enter sets it."/>
<string text="Sending players who join without the game's\nCustom Edition map the map, and how fast."/>
<string text="Listed for everyone through the brokers, and on\nthe master servers with your publisher key."/>
</strings>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_screen" width="640" height="480" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/gradient">
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/header_coop_options"/>
@@ -236,9 +237,12 @@
<on event="created" run="port setup options init"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_friendly_fire" x="54" y="73"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_extra_enemies" x="54" y="103"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_enemies_per_player" x="54" y="133"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_enemies_multiplier" x="54" y="133"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_player_collisions" x="54" y="163"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_extra_pickups" x="54" y="133"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_extra_vehicles" x="54" y="163"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_enemies_multiplier" x="54" y="193"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_enemies_per_player" x="54" y="223"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_player_collisions" x="54" y="253"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_ally_friendly_fire" x="54" y="283"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_button_bar" y="414"/>
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_button_bar" type="column_list" width="640" height="28" flags="pass_unhandled_to_focused_child left_right_tabs_items">
@@ -276,31 +280,43 @@
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_extra_enemies">
<string text="NONE"/>
<string text="PER PLAYER"/>
<string text="STATIC MULTIPLIER"/>
<string text="NONE"/>
</strings>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_enemies_per_player" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_per_player_label"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_per_player_spinner" x="286" y="1"/>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_extra_pickups" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_extra_pickups_label"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_extra_pickups_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_per_player_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_labels" string_index="2" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_extra_pickups_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_labels" string_index="2" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_per_player_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_enemies_per_player" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_extra_pickups_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_extra_pickups" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_enemies_per_player">
<string text="25%"/>
<string text="50%"/>
<string text="100%"/>
<string text="150%"/>
<string text="200%"/>
<strings name="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_extra_pickups">
<string text="PER PLAYER"/>
<string text="STATIC MULTIPLIER"/>
<string text="NONE"/>
</strings>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_extra_vehicles" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_extra_vehicles_label"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_extra_vehicles_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_extra_vehicles_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_labels" string_index="3" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_extra_vehicles_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_extra_vehicles" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_extra_vehicles">
<string text="PER PLAYER"/>
<string text="STATIC MULTIPLIER"/>
<string text="NONE"/>
</strings>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_enemies_multiplier" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_multiplier_label"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_multiplier_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_multiplier_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_labels" string_index="3" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_multiplier_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_labels" string_index="4" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_multiplier_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_enemies_multiplier" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
@@ -312,11 +328,27 @@
<string text="16X"/>
<string text="32X"/>
</strings>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_enemies_per_player" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_per_player_label"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_per_player_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_per_player_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_labels" string_index="5" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_enemies_per_player_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_enemies_per_player" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_enemies_per_player">
<string text="25%"/>
<string text="50%"/>
<string text="100%"/>
<string text="150%"/>
<string text="200%"/>
</strings>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_player_collisions" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_player_collisions_label"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_player_collisions_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_player_collisions_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_labels" string_index="4" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_player_collisions_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_labels" string_index="6" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_player_collisions_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_player_collisions" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
@@ -325,33 +357,57 @@
<string text="ON"/>
<string text="OFF"/>
</strings>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/op_coop_ally_friendly_fire" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_ally_friendly_fire_label"/>
<child widget="main_menu/multiplayer_type_select/server_settings/coop_options/coop_ally_friendly_fire_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_ally_friendly_fire_label" type="text" controller="1" width="300" height="22" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_labels" string_index="7" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_ally_friendly_fire_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_ally_friendly_fire" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/multiplayer_type_select/server_settings/coop_options/var_coop_ally_friendly_fire">
<string text="ON"/>
<string text="OFF"/>
</strings>
<strings name="main_menu/multiplayer_type_select/server_settings/coop_options/coop_options_labels">
<string text="FRIENDLY FIRE:"/>
<string text="EXTRA ENEMIES:"/>
<string text="PER PLAYER:"/>
<string text="EXTRA PICKUPS:"/>
<string text="EXTRA VEHICLES:"/>
<string text="MULTIPLIER:"/>
<string text="PER PLAYER:"/>
<string text="PLAYER COLLISIONS:"/>
<string text="ALLY FRIENDLY FIRE:"/>
</strings>
<strings name="main_menu/multiplayer_type_select/server_settings/coop_options/cap_coop_options">
<string text="Players can not be hurt by weapons and explosives\nfired by the other players."/>
<string text="Players can be hurt by weapons or explosives\nfired by the other players."/>
<string text="Damage from the other players will only reduce\nshields. Health will be unaffected."/>
<string text="Players can be hurt by damage from explosives\nfired by the other players."/>
<string text="Enemy squads grow with the players: by the value of\n'Per Player' for each player past the first."/>
<string text="Enemy squads use 'Multiplier', however many players\nthere are."/>
<string text="Enemy squads are as the campaign has them."/>
<string text="Enemy squads grow with the players: by the amount\nbelow for each player past the first."/>
<string text="Enemy squads are the amount below times as large,\nhowever many players there are."/>
<string text="For each player past the first, enemy squads get\nthis much more of themselves (100%: as many again)."/>
<string text="For each player past the first, enemy squads get\nthis much more of themselves (100%: as many again)."/>
<string text="For each player past the first, enemy squads get\nthis much more of themselves (100%: as many again)."/>
<string text="For each player past the first, enemy squads get\nthis much more of themselves (100%: as many again)."/>
<string text="For each player past the first, enemy squads get\nthis much more of themselves (100%: as many again)."/>
<string text="Each enemy squad is this many times as large."/>
<string text="Each enemy squad is this many times as large."/>
<string text="Each enemy squad is this many times as large."/>
<string text="Each enemy squad is this many times as large."/>
<string text="Each enemy squad is this many times as large."/>
<string text="Pickups grow with the players: by the value of\n'Per Player' for each player past the first."/>
<string text="Pickups use 'Multiplier', up to eight times as many,\nhowever many players there are."/>
<string text="Pickups are as the campaign has them."/>
<string text="Vehicles respawn after being driven a short distance\nbased on the number of players: by two thirds the value of\n'Per Player' for each player past the first."/>
<string text="Vehicles respawn after being driven a short distance,\nwith extra copies equal to ('Multiplier' - 1) * 2/3,\nrounded down, however many players there are."/>
<string text="Vehicles are as the campaign has them."/>
<string text="Static amounts for the options set to this mode.\nPickups are capped at eight times as many."/>
<string text="Static amounts for the options set to this mode.\nPickups are capped at eight times as many."/>
<string text="Static amounts for the options set to this mode.\nPickups are capped at eight times as many."/>
<string text="Static amounts for the options set to this mode.\nPickups are capped at eight times as many."/>
<string text="Static amounts for the options set to this mode.\nPickups are capped at eight times as many."/>
<string text="For each player past the first, options set to Per\nPlayer get this much more (100%: as many again)."/>
<string text="For each player past the first, options set to Per\nPlayer get this much more (100%: as many again)."/>
<string text="For each player past the first, options set to Per\nPlayer get this much more (100%: as many again)."/>
<string text="For each player past the first, options set to Per\nPlayer get this much more (100%: as many again)."/>
<string text="For each player past the first, options set to Per\nPlayer get this much more (100%: as many again)."/>
<string text="Players bump into each other, as in the campaign."/>
<string text="Players walk through each other, so that no one\nblocks a doorway. The AI's characters still block."/>
<string text="Players can hurt and kill their AI allies, as in\nthe campaign."/>
<string text="Players can not hurt their AI allies, so that no\none can kill Keyes or the Marines a level needs."/>
</strings>
<widget name="main_menu/multiplayer_type_select/server_settings/voice_options/voice_options_screen" width="640" height="480" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/gradient">
<child widget="main_menu/multiplayer_type_select/server_settings/voice_options/header_voice_options"/>
@@ -0,0 +1,246 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- The port's multiplayer screens, in the PC version's style (tools/port_settings.py) -->
<menus>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_screen" width="640" height="480" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/gradient">
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/header_opence"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_menu"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/header_opence" controller="1" left="35" top="11" width="363" height="59" type="text" text="OPENCE OPTIONS" font="ui\large_ui" color="#FFFFFFFF" text_x="13" text_y="16">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_help" type="text" controller="1" left="68" top="341" width="482" height="79" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/cap_opence" font="ui\large_ui" color="#FFFFFFFF">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_menu" type="column_list" width="640" height="480" flags="pass_unhandled_to_focused_child up_down_tabs_children" description="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_help">
<data input="game settings lists text update"/>
<on event="created" run="mp profile init opence options"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_oce_mode" x="54" y="73"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_oce_hardcore" x="54" y="103"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_zombies" x="54" y="133"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_speed" x="54" y="163"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_damage" x="54" y="193"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_respawn" x="54" y="223"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_countdown" x="54" y="253"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_shields" x="54" y="283"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_gg_order" x="54" y="313"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_gg_melee" x="54" y="343"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_button_bar" y="414"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_button_bar" type="column_list" width="640" height="28" flags="pass_unhandled_to_focused_child left_right_tabs_items">
<data input="common button bar update"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_button_ok" x="380" y="1"/>
<child widget="common_button_cancel" x="510" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_button_ok" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="1" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
<on event="a" run="mp profile set opence options" back="true"/>
<on event="start" run="mp profile set opence options" back="true"/>
<on event="left_mouse" run="mouse emit accept event"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_oce_mode" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/oce_mode_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/oce_mode_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/oce_mode_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_labels" string_index="0" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/oce_mode_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_oce_mode" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_oce_mode">
<string text="NONE"/>
<string text="SWAT"/>
<string text="INFECTION"/>
<string text="GUN GAME"/>
</strings>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_oce_hardcore" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/oce_hardcore_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/oce_hardcore_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/oce_hardcore_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_labels" string_index="1" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/oce_hardcore_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_oce_hardcore" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_oce_hardcore">
<string text="OFF"/>
<string text="ON"/>
</strings>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_zombies" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_zombies_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_zombies_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_zombies_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_labels" string_index="2" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_zombies_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_zombies" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_zombies">
<string text="1"/>
<string text="2"/>
<string text="3"/>
<string text="4"/>
<string text="8"/>
<string text="16"/>
</strings>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_speed" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_speed_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_speed_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_speed_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_labels" string_index="3" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_speed_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_speed" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_speed">
<string text="100%"/>
<string text="110%"/>
<string text="125%"/>
<string text="150%"/>
<string text="175%"/>
<string text="200%"/>
</strings>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_damage" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_damage_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_damage_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_damage_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_labels" string_index="4" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_damage_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_damage" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_damage">
<string text="100%"/>
<string text="150%"/>
<string text="200%"/>
<string text="250%"/>
</strings>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_respawn" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_respawn_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_respawn_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_respawn_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_labels" string_index="5" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_respawn_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_respawn" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_respawn">
<string text="1 SECOND"/>
<string text="3 SECONDS"/>
<string text="5 SECONDS"/>
<string text="10 SECONDS"/>
<string text="15 SECONDS"/>
<string text="30 SECONDS"/>
</strings>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_countdown" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_countdown_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_countdown_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_countdown_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_labels" string_index="6" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_countdown_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_countdown" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_countdown">
<string text="NONE"/>
<string text="5 SECONDS"/>
<string text="10 SECONDS"/>
<string text="15 SECONDS"/>
<string text="30 SECONDS"/>
</strings>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_inf_shields" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_shields_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_shields_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_shields_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_labels" string_index="7" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/inf_shields_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_shields" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_inf_shields">
<string text="OFF"/>
<string text="ON"/>
</strings>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_gg_order" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/gg_order_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/gg_order_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/gg_order_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_labels" string_index="8" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/gg_order_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_gg_order" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_gg_order">
<string text="STRONGEST FIRST"/>
<string text="WEAKEST FIRST"/>
<string text="RANDOM"/>
</strings>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/op_gg_melee" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/gg_melee_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/opence_options_edit/gg_melee_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/gg_melee_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_labels" string_index="9" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/opence_options_edit/gg_melee_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_gg_melee" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/var_gg_melee">
<string text="OFF"/>
<string text="ON"/>
</strings>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_labels">
<string text="MODE:"/>
<string text="HARDCORE:"/>
<string text="FIRST ZOMBIES:"/>
<string text="ZOMBIE SPEED:"/>
<string text="SKULL DAMAGE:"/>
<string text="ZOMBIE RESPAWN:"/>
<string text="COUNTDOWN:"/>
<string text="ZOMBIE SHIELDS:"/>
<string text="WEAPON ORDER:"/>
<string text="MELEE DEMOTES:"/>
</strings>
<strings name="main_menu/settings_select/multiplayer_setup/opence_options_edit/cap_opence">
<string text="The game type's own rules."/>
<string text="No shields, and a shot to the head kills. Slayer only."/>
<string text="Humans killed join the zombies, who win when\nno human is left. Team Slayer only."/>
<string text="Each kill gives the next weapon; a kill with the\nlast wins. Free for all Slayer only."/>
<string text="The motion sensor and aim assist as the game\ntype has them."/>
<string text="No motion sensor, no aim assist, and a kill\nrestores the killer's health and shields."/>
<string text="The zombies chosen when the round starts\n(a human is always left)."/>
<string text="The zombies chosen when the round starts\n(a human is always left)."/>
<string text="The zombies chosen when the round starts\n(a human is always left)."/>
<string text="The zombies chosen when the round starts\n(a human is always left)."/>
<string text="The zombies chosen when the round starts\n(a human is always left)."/>
<string text="The zombies chosen when the round starts\n(a human is always left)."/>
<string text="How fast zombies move, of a human's speed."/>
<string text="How fast zombies move, of a human's speed."/>
<string text="How fast zombies move, of a human's speed."/>
<string text="How fast zombies move, of a human's speed."/>
<string text="How fast zombies move, of a human's speed."/>
<string text="How fast zombies move, of a human's speed."/>
<string text="The damage of a zombie's skull's melee."/>
<string text="The damage of a zombie's skull's melee."/>
<string text="The damage of a zombie's skull's melee."/>
<string text="The damage of a zombie's skull's melee."/>
<string text="How long a dead zombie waits to respawn."/>
<string text="How long a dead zombie waits to respawn."/>
<string text="How long a dead zombie waits to respawn."/>
<string text="How long a dead zombie waits to respawn."/>
<string text="How long a dead zombie waits to respawn."/>
<string text="How long a dead zombie waits to respawn."/>
<string text="How long the round waits, once two players are\nalive, before the first zombies are chosen."/>
<string text="How long the round waits, once two players are\nalive, before the first zombies are chosen."/>
<string text="How long the round waits, once two players are\nalive, before the first zombies are chosen."/>
<string text="How long the round waits, once two players are\nalive, before the first zombies are chosen."/>
<string text="How long the round waits, once two players are\nalive, before the first zombies are chosen."/>
<string text="Zombies have no shields."/>
<string text="Zombies have shields, as humans do."/>
<string text="From the rocket launcher to the pistol."/>
<string text="From the pistol to the rocket launcher."/>
<string text="In an order the host draws for each game."/>
<string text="A melee kill takes nothing from the victim."/>
<string text="A melee kill takes the victim back a weapon."/>
</strings>
<widget name="main_menu/settings_select/multiplayer_setup/playlist_edit/playlist_edit_opence_item" type="text" left="51" top="309" width="232" height="32" bitmap="bitmaps/list_item_bkd" text="OPENCE OPTIONS" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="5">
<on event="a" open="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_screen"/>
<on event="start" open="main_menu/settings_select/multiplayer_setup/opence_options_edit/opence_screen"/>
<on event="left_mouse" run="mouse emit accept event"/>
</widget>
</menus>
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- The port's multiplayer screens, in the PC version's style (tools/port_settings.py) -->
<menus>
<widget name="main_menu/settings_select/multiplayer_setup/player_options_edit/op_aim_assist" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/aim_assist_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/aim_assist_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/player_options_edit/aim_assist_label" type="text" controller="1" width="280" height="22" string_list="main_menu/settings_select/multiplayer_setup/player_options_edit/player_options_labels" string_index="8" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/player_options_edit/aim_assist_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/player_options_edit/var_aim_assist" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/player_options_edit/op_shield_effects" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/shield_effects_label"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/shield_effects_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/player_options_edit/shield_effects_label" type="text" controller="1" width="280" height="22" string_list="main_menu/settings_select/multiplayer_setup/player_options_edit/player_options_labels" string_index="9" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/player_options_edit/shield_effects_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" string_list="main_menu/settings_select/multiplayer_setup/player_options_edit/var_shield_effects" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" list_flags="items_from_strings" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="left_mouse" run="mouse spinner 1wide click"/>
</widget>
<strings name="main_menu/settings_select/multiplayer_setup/player_options_edit/var_aim_assist">
<string text="ALLOWED"/>
<string text="BLOCK M+KB"/>
</strings>
<strings name="main_menu/settings_select/multiplayer_setup/player_options_edit/var_shield_effects">
<string text="STOCK"/>
<string text="GLOW"/>
<string text="LIGHT SHOW"/>
<string text="OVERSHIELD"/>
<string text="GLOW+OVERSHIELD"/>
<string text="SHOW+OVERSHIELD"/>
<string text="PLAYERS' OWN"/>
</strings>
</menus>
@@ -65,19 +65,21 @@
<on event="start" run="mp profile set player options" back="true"/>
<on event="left_mouse" run="mouse emit accept event"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/player_options_edit/player_options_help" type="text" controller="1" left="68" top="321" width="482" height="79" string_list="main_menu/settings_select/multiplayer_setup/player_options_edit/cap_player_options" font="ui\large_ui" color="#FFFFFFFF">
<widget name="main_menu/settings_select/multiplayer_setup/player_options_edit/player_options_help" type="text" controller="1" left="68" top="345" width="482" height="60" string_list="main_menu/settings_select/multiplayer_setup/player_options_edit/cap_player_options" font="ui\large_ui" color="#FFFFFFFF">
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/player_options_edit/player_options_menu" type="column_list" width="640" height="480" flags="pass_unhandled_to_focused_child up_down_tabs_children" description="main_menu/settings_select/multiplayer_setup/player_options_edit/player_options_help">
<data input="game settings lists text update"/>
<on event="created" run="mp profile init player opts"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_number_of_lives" x="54" y="73"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_maximum_health" x="54" y="103"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_shields" x="54" y="133"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_respawn_time" x="54" y="163"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_respawn_time_growth" x="54" y="193"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_odd_man_out" x="54" y="223"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_invisible_players" x="54" y="253"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_suicide_penalty" x="54" y="283"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_maximum_health" x="54" y="100"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_shields" x="54" y="127"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_respawn_time" x="54" y="154"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_respawn_time_growth" x="54" y="181"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_odd_man_out" x="54" y="208"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_invisible_players" x="54" y="235"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_suicide_penalty" x="54" y="262"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_aim_assist" x="54" y="289"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/op_shield_effects" x="54" y="316"/>
<child widget="main_menu/settings_select/multiplayer_setup/player_options_edit/player_button_bar" y="414"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/player_options_edit/player_options_screen" width="640" height="480" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/gradient">
@@ -3,6 +3,7 @@
<menus>
<widget name="main_menu/settings_select/multiplayer_setup/playlist_edit/edit_playlist_select_list" type="column_list" width="640" height="480" flags="pass_unhandled_to_focused_child up_down_tabs_children" description="main_menu/settings_select/multiplayer_setup/playlist_edit/playlist_edit_list_extended_desc">
<data input="playlist settings menu update desc"/>
<data input="port playlist edit desc"/>
<child widget="main_menu/settings_select/multiplayer_setup/playlist_edit/playlist_edit_name_list_item"/>
<child widget="main_menu/settings_select/multiplayer_setup/playlist_edit/playlist_edit_game_type_item"/>
<child widget="main_menu/settings_select/multiplayer_setup/playlist_edit/playlist_edit_player_opts_item"/>
@@ -10,6 +11,7 @@
<child widget="main_menu/settings_select/multiplayer_setup/playlist_edit/playlist_edit_vehicles_list_item"/>
<child widget="main_menu/settings_select/multiplayer_setup/playlist_edit/playlist_edit_indicators_item"/>
<child widget="main_menu/settings_select/multiplayer_setup/playlist_edit/playlist_edit_team_item"/>
<child widget="main_menu/settings_select/multiplayer_setup/playlist_edit/playlist_edit_opence_item"/>
<child widget="main_menu/settings_select/multiplayer_setup/playlist_edit/playlist_edit_button_bar" y="414"/>
</widget>
<widget name="main_menu/settings_select/multiplayer_setup/playlist_edit/gametype_edit_screen" width="640" height="480" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/gradient">
@@ -70,7 +70,7 @@
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/gamepad_setup/button_preset_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/gamepad_setup/labels" string_index="4" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/gamepad_setup/button_preset_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="DEFAULT|SWAP TRIGGERS|SWAP A, L TRIGGER|SWAP B, L TRIGGER|SWAP B, R STICK" setting="profile.button_preset" values="0|1|2|3|4" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<widget name="main_menu/settings_select/player_setup/player_profile_edit/gamepad_setup/button_preset_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="DEFAULT|SWAP TRIGGERS|SWAP A, L TRIGGER|SWAP B, L TRIGGER|SWAP B, R STICK|BUMPER JUMPER|FISHSTICKS|RECON" setting="profile.button_preset" values="0|1|2|3|4|5|6|7" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/gamepad_setup/op_joystick_preset" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
@@ -0,0 +1,115 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- The port's settings screen, in the PC version's style (tools/port_settings.py) -->
<menus>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/server_browser_settings_screen" width="640" height="480" flags="pass_unhandled_to_focused_child pause_game" bitmap="bitmaps/gradient">
<on event="b" back="true"/>
<on event="back" back="true"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/header_profile_network_settings"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/options_menu"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/header_profile_network_settings" controller="1" left="35" top="11" width="605" height="59" bitmap="main_menu/settings_select/player_setup/player_profile_edit/network_setup/header_profile_network_settings">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/help" type="text" controller="1" left="68" top="350" width="482" height="60" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/help_strings" font="ui\large_ui" color="#FFFFFFFF">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/options_menu" type="column_list" width="640" height="480" flags="pass_unhandled_to_focused_child up_down_tabs_children" description="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/help">
<data input="port settings help"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_listings" x="54" y="73"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_browser_show_empty" x="54" y="103"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_browser_show_full" x="54" y="133"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_browser_maps" x="54" y="163"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_browser_sort" x="54" y="193"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_master_servers" x="54" y="223"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/button_bar" y="414"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/button_bar" type="column_list" width="640" height="28" flags="pass_unhandled_to_focused_child left_right_tabs_items">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/button_defaults" y="1"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/button_ok" x="380" y="1"/>
<child widget="common_button_cancel" x="510" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_listings" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/listings_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/listings_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/listings_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/labels" string_index="0" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/listings_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="ALL GAMES|DEDICATED|P2P GAMES" setting="network.listings" values="both|masters|brokers" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_browser_show_empty" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_show_empty_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_show_empty_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_show_empty_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/labels" string_index="1" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_show_empty_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="YES|NO" setting="network.browser_show_empty" values="true|false" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_browser_show_full" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_show_full_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_show_full_spinner" x="320" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_show_full_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/labels" string_index="2" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_show_full_spinner" type="spinner" left="3" top="2" width="147" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="YES|NO" setting="network.browser_show_full" values="true|false" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -6 19 0" footer_bounds="7 150 19 156">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_browser_maps" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_maps_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_maps_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_maps_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/labels" string_index="3" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_maps_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="NO|YES|IF DOWNLOADABLE" setting="network.browser_maps" values="no|yes|downloadable" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_browser_sort" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_sort_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_sort_spinner" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_sort_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/labels" string_index="4" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/browser_sort_spinner" type="spinner" top="2" width="206" height="20" flags="pass_unhandled_to_focused_child left_right_tabs_items" strings="DEDICATED FIRST|PLAYERS|NAME|MAP|GAME TYPE|LOCKED FIRST" setting="network.browser_sort" values="servers|players|name|map|type|locked" font="ui\large_ui" color="#FF2896FF" align="center" text_y="4" header_bitmap="bitmaps/arrow_sm_left" footer_bitmap="bitmaps/arrow_sm_right" header_bounds="7 -13 19 -7" footer_bounds="7 208 19 214">
<on event="created" run="port setting load"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/op_master_servers" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/master_servers_label"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/master_servers_value" x="286" y="1"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/master_servers_label" type="text" controller="1" width="300" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/labels" string_index="5" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/master_servers_value" type="text" controller="1" width="212" height="22" font="ui\large_ui" color="#FF2896FF" align="center" text_y="1" text_flags="no_focus_test">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/button_defaults" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="3" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
<on event="a" run="port settings defaults"/>
<on event="start" run="port settings defaults"/>
<on event="left_mouse" run="mouse emit accept event"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/button_ok" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="1" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
<on event="a" run="port settings save" back="true"/>
<on event="start" run="port settings save" back="true"/>
<on event="left_mouse" run="mouse emit accept event"/>
</widget>
<strings name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/labels">
<string text="LISTS:"/>
<string text="SHOW EMPTY SERVERS:"/>
<string text="SHOW FULL SERVERS:"/>
<string text="SHOW MISSING MAPS:"/>
<string text="SORT BY:"/>
<string text="MASTER SERVERS:"/>
</strings>
<strings name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/words">
<string text="OF"/>
<string text="NONE LISTED"/>
<string text="NOT ASKED YET"/>
<string text="OFF"/>
</strings>
<strings name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/help_strings">
<string text=""/>
<string text="The master servers' dedicated servers, the games\nplayers host (through the brokers), or all of them."/>
<string text="List games no one is playing yet."/>
<string text="List games with no room left."/>
<string text="List games on maps you do not have: IF\nDOWNLOADABLE, those Map Sharing can download."/>
<string text="The list's order. Its column titles sort it too;\nchoosing one again reverses it."/>
<string text="The master servers (masters.txt) that answered\nwhen the Server Browser last asked."/>
</strings>
</menus>
@@ -22,6 +22,8 @@
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_multiplayer_hud" x="54" y="103" platform="web"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_streamer_mode" x="54" y="253" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_streamer_mode" x="54" y="133" platform="web"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_server_browser" x="54" y="283" platform="desktop android"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_server_browser" x="54" y="163" platform="web"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/button_bar" y="414"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/button_bar" type="column_list" width="640" height="28" flags="pass_unhandled_to_focused_child left_right_tabs_items">
@@ -89,6 +91,14 @@
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/streamer_mode_label" type="text" controller="1" width="512" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/labels" string_index="6" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/op_server_browser" width="512" height="28" flags="pass_unhandled_to_focused_child" bitmap="bitmaps/option_bkds" color="#FF2896FF">
<on event="a" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/server_browser_settings_screen"/>
<on event="start" open="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser/server_browser_settings_screen"/>
<on event="left_mouse" run="mouse emit accept event"/>
<child widget="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser_label"/>
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/server_browser_label" type="text" controller="1" width="512" height="22" string_list="main_menu/settings_select/player_setup/player_profile_edit/network_setup/labels" string_index="7" font="ui\large_ui" color="#FF2896FF" text_x="13" text_y="4">
</widget>
<widget name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/button_defaults" type="text" width="128" height="24" bitmap="bitmaps/text_button_background" string_list="strings/common_button_captions" string_index="3" font="ui\small_ui" color="#FFFFFFFF" align="center" text_y="2">
<on event="a" run="port settings defaults"/>
<on event="start" run="port settings defaults"/>
@@ -107,6 +117,7 @@
<string text="MAP SHARING:"/>
<string text="MULTIPLAYER HUD:"/>
<string text="STREAMER MODE:"/>
<string text="SERVER BROWSER:"/>
</strings>
<strings name="main_menu/settings_select/player_setup/player_profile_edit/network_setup/help_strings">
<string text=""/>
@@ -117,5 +128,6 @@
<string text="Downloading Custom Edition maps you do not have,\nand helping send them to other players."/>
<string text="Players' names above their heads, the\nscoreboard, and the text chat."/>
<string text="Hide offensive words in names and text from\nother players, maps and mods, as stars."/>
<string text="What the Server Browser lists and its order: the\nsame settings as its Filters screen."/>
</strings>
</menus>
Loaded 100 of 589 files, more files were not shown because too many files have changed in this diff. Show more