all repos — xrxs @ main

experimental networked application/game server with 9p

31756bc2
update varvara file device, update to version 0.4
Iris Lightshard nilix@nilfm.cc
6864b143
use environment to set addr and port in wrappers
Iris Lightshard nilix@nilfm.cc
614c8864
update file device and fix padding lengths
Iris Lightshard nilix@nilfm.cc

xrxs

xrxs is an experimental game server using the Plan 9 protocol 9p.

The client is a specialized uxn ROM that can load other ROMs over the network via the 9p service.

design

This is the working structure of the 9p filesystem:

realm format

Each realm directory on the server should have the following files:

The realm should be synchronized to disc when realm membership, limit, or password change. Fenagling some periodic autosave should be possible…

configuration

config.h in the source contains the following configuration macros:

build/run

server

The xrxs server is built/tested in a Linux environment with plan9port and the C standard library as the only dependencies. With minimal modifications it will probably run just as well on Plan9, *BSD, WSL, and MacOS.

Running ./build.sh from the server directory should build the xrxs executable.

You can run a local server (for testing, split-screen games, or single-player games) with:

./xrxs -m /path/to/mountpoint

or expose a service on the network (uses 9pserve to support multiple users and gracefully handle disconnects) with:

./xrxs-srv.sh start

Add the -d option to the above command to enable 9p debugging output. The default port is 5460 but can be changed by setting the XRXS_PORT environment variable.

Similarly, you can stop the service with:

./xrxs-srv.sh stop

The executable itself supports the following options, one of which is required (no options prints the help text):

client

There are two versions of the client ROM. One is the normal xrxs client, and one is a standalone client for use as a generic uxn bootloader. The latter reads a ROM list out of a file called index, and appends the .rom extension to your selection and loads a file so named. Note that while the 9p filesystem will be located under the parent directory of ./n, the standalone bootloader assumes a flat filesystem.

You can run ./build.sh with no options to build the normal xrxs client, or with any of the following options:

When the client ROM has been built, run ./uxn-xrxs.sh to mount the 9p service and run the client. As with the server, the default port is 5460 but can be overridden with the XRXS_PORT environment variable. The default server address is 127.0.0.1 but can be similarly changed by setting the XRXS_ADDR environment variable.

The scripts assume you have uxnasm and uxnemu in your PATH. 9pfuse is used to mount the service, but other implementations could possibly be used.

clone
git clone https://hacklab.nilfm.cc/xrxs