ANTI-HORIZON

ANTI-HORIZON private multiplayer arena

The full single-player game still works by opening index.html. It never starts a server or opens a network connection unless you explicitly select Multiplayer and Connect.

The optional backend uses Python 3.10 or newer and its standard library. No pip packages, Node.js, npm, accounts, database or paid service are required. Python is needed only on the computer hosting the arena.

Same computer

If your browser blocks a connection from a local file, open http://127.0.0.1:8765 instead. The optional server serves the same local game files. This fallback changes nothing about the offline single-player launch.

Friends on the same network

Run python3 backend/server.py --host 0.0.0.0 --port 8765 on the host. Permit that port through the host firewall for your private network. Friends open http://HOST-LAN-IP:8765 and use ws://HOST-LAN-IP:8765 in Multiplayer. Replace HOST-LAN-IP with the host computer's actual LAN address. Everyone must use the same room code. Stop the process with Ctrl+C when finished.

Room codes separate arenas; they are not passwords. Optionally set ANTI_HORIZON_ACCESS_KEY in the host's environment before starting. Share that key privately with players, who enter it in the Access key field. Do not put credentials into a WebSocket URL. The server does not save the key, rooms or chat to a database.

Public hosting and encrypted connections

This release does not deploy anything. For a public server, provide a reachable host, domain, trusted TLS certificate and firewall configuration. The server accepts --cert /path/to/certificate.pem --private-key /path/to/key.pem and then serves HTTPS and WSS. Clients use wss://YOUR-HOST:8765. An HTTPS game page requires a secure WSS connection. A trusted reverse proxy that forwards WebSocket upgrades is another option.

Restrict browser origins with repeated --origin arguments, for example --origin https://YOUR-DOMAIN --origin null. The literal null permits local file clients. Origin checks are a browser restriction, not user authentication; use the access key for a private server. Plain ws:// does not encrypt chat or the access key. Use WSS outside a trusted private network.

Arena rules and boundaries

Troubleshooting

Protocol and implementation references: MDN WebSocket, MDN client guide, Python asyncio streams, RFC 6455.