@spup/game-server
v2.9.0
Published
The Shy's Power-Up Factory server, its base mods, and the harness a mod's tests run against
Readme
@spup/game-server
The Shy's Power-Up Factory server, the base mods, and the test harness a mod's specs run against.
The spup-dev command lives in @spup/game-client; this package is what its server verb needs.
npm i -D @spup/game-client @spup/game-server
npx spup-dev serverJoining it
Log into the client, then use the server list's Connect to a URL field (ws://localhost:27500).
Testing against the engine
node --import @spup/game-server/test-loader --test test/*.spec.jsimport {makeGameEngine, makeGame, ModPackage, CreateObjectMessage, Direction} from "@spup/game-server/test";
const engine = await makeGameEngine([new ModPackage(new MyDeclaration(), {sim: new MySimMod()})]);
engine.applyMessage(new CreateObjectMessage(MyType.typeId, 5, 5, Direction.UP));
engine.tickAll();