The dedicated server runs headless on macOS #30
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "task/3995-the-dedicated-server-runs-headless-on-ma"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Tracker: #3995
Delivers
server.sx, the dedicated server: step 1's serve loop (src/sim/host.sx) on its main thread overbaked/first_map.hbwalone, with no window, GPU or SDL.tools/sx build server.sx -o sx-out/macos/hulken-serverbuilds it (configureServerBuildinbuild.sxbakes first, as the app's build does);tools/run_tests.shruns that build, so the gate does.otool -Llists only/usr/lib/libSystem.B.dylib: no SDL3, Metal or QuartzCore.--portnames;--joinor any other argument prints its usage and exits 2 (serving()insrc/net/launch.sx). A held port or a missing world file prints why and exits 1.PlayerEvent: joined, left, or silent for 10 s), and the serve loop prints them, in the dedicated server and in a hosting app's server thread alike.stoppedand exits 0.tests/dedicated_server.sxchecksotool -L, starts the binary as a process on a free port, joins a scripted client over UDP, walks it for a second and sees its player move in the snapshots at 60 Hz, sees the join and leave printed, and stops it with SIGINT.net_handshakepins the join, leave and silent records;net_launchpinsserving().--join 127.0.0.1.In the app: run
sx-out/macos/hulken-serverin Terminal, then start two apps withopen -n sx-out/macos/Hulken.app --args --join 127.0.0.1; both play on it.