Skip to content

About

Mobile-first Last Ignition co-op game and Alcheme External Program example.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Last Ignition

Last Ignition is a mobile-first browser action roguelite with solo play, two-to-three-player co-op, touch controls, and an Alcheme External Program integration.

Players can turn selected run discoveries into Circle-scoped SourceMaterial candidates. Accepted material is returned through Knowledge Context and reused in the strategy community and stage-preparation screens.

Features

  • A four-chapter campaign with combat, recovery, escort, and ignition objectives
  • Solo play plus host-authoritative co-op for two or three players
  • Mobile front door, room browser, room codes, ready checks, and touch controls
  • Local BroadcastChannel transport and Alcheme-backed room/relay integration
  • Server-signed Alcheme claims; signing material never enters browser code
  • Circle-reviewed strategy and run-experience knowledge reuse

Requirements

  • Node.js 22.12 or a newer LTS release (Node.js 23 is not supported)
  • npm

Local Setup

git clone https://github.com/alcheme-labs/examplesGame.git
cd examplesGame
npm ci
cp .env.example .env.local
npm run alcheme:keygen

Put the generated server key and operator-provisioned Alcheme values in .env.local. Never commit that file or expose its signing key to client code.

Build and start the same-origin game/API server:

npm run build
npm run preview

The default local URL is http://127.0.0.1:4173.

Alcheme Configuration

The following values must match an approved External Program registration and its target Primary Circle:

  • ALCHEME_EXTERNAL_APP_ID
  • ALCHEME_PRIMARY_CIRCLE_ID
  • ALCHEME_API_BASE_URL for the private server-side API
  • ALCHEME_PUBLIC_API_BASE_URL for browser-safe public operations
  • ALCHEME_SERVER_KEY_VERSION
  • ALCHEME_SERVER_PRIVATE_KEY_PKCS8_BASE64
  • GAME_PUBLIC_ORIGIN

The Demo production route is intentionally fixed at ALCHEME_API_BASE_URL=http://127.0.0.1:4320/api/v1. The Alcheme deployment owns the implementation behind that loopback endpoint. The Game release consumes and verifies it but never changes Nginx, Docker, Alcheme images, or Alcheme data.

Before a new sandbox registration, create a manifest containing the public key derived by npm run alcheme:keygen, then generate the short-lived proof that the Game server holds the matching private key:

npm run alcheme:proof -- --manifest ./registration-manifest.json

The output contains only a public key, fingerprint, manifest hash, and signed proof. Paste its serverKeyProof into the Developer Portal; never copy the private key. Existing registrations can be attested without changing their key:

npm run alcheme:attest

The release and monitoring gate performs a real signed Knowledge Context read, checks Circle binding 247 (or the configured Primary Circle), verifies the registered key fingerprint, and requires the PRIVATE_SIDECAR response header:

npm run alcheme:readiness

Production startup rejects ephemeral signing. Community and run-experience submissions remain Circle-only candidates until an operator accepts them; only Knowledge Context entries with canDisplay=true are shown to players.

Controls

  • Touch: left virtual stick to move; right-side action buttons to dash and act
  • Keyboard: WASD or arrow keys to move, Space to dash
  • Enter: confirm deployment
  • 1, 2, 3: choose a draft reward
  • R: restart or return to the launch bay
  • O: open settings

Multiplayer room creation, browsing, joining, readiness, and departure are available from the in-game mobile lobby; no manually shared URL is required.

Verification

npm test
npm run test:release
npx tsc --noEmit
npm run build

Demo server releases use the single rollback-capable entrypoint documented in docs/operations/demo-release.md.

With the preview server running, the focused browser suites under tests/web exercise mobile, room, co-op, relay, and Alcheme integration flows.

License

This repository is licensed under the MIT License. Dependencies, including the Apache-2.0 Alcheme SDK package, retain their respective licenses.

About

Mobile-first Last Ignition co-op game and Alcheme External Program example.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages