Skip to content
llblabPublic

About

Entropy fighting mathematactic game

Topics

Resources

Stars

6 stars

Watchers

2 watching

Forks

Repository files navigation

Get it on Google Play

Entropy fighting mathematactic game

A deterministic survival puzzle game begins with a reserve of 100 energy points. Each move, which increment a card's value by one, consumes 10 points from this reserve. Adjacent cards with identical values merge to form a cluster, when a cards values matches the cluster's size, the cluster is eliminated, replenishing your energy by an amount equal to the cards values. The player's objective is to survive as long as possible while accumulating the highest score achievable. The game features a decentralized leaderboard with 1000 slots, allowing you to immortalize your string name. The integrity of game records is ensured through validation mechanisms implemented directly on each game client.

digifall.appdigifall.app

Architecture

  • Immortal Software: A protocol-as-game designed to survive without central servers
  • Deterministic Core: All game logic is seeded and reproducible
  • Trustless P2P: Leaderboard data synchronizes via libp2p relays
  • Domain DAG: domain-dag.json records the intended dependency layers and boundary checks; the validator skill is vendored in .agents/skills/domain-dag

Project Control

Development Checks

Use Node 24 with npm 11 to match CI and the lockfile toolchain.

npm ci
npm test
npx playwright install chromium
npm run test:browser
npm run check
npm run lint
npm run build

The browser check covers long-press cleanup, reused cards, overlay/dialog keyboard navigation, score switching, focus restoration, and leaderboard startup validation/persistence/sync plus concurrent local-record normalization, using real IndexedDB with fake local peer connections. Set CHROME_PATH to use an existing Chrome executable instead of Playwright's downloaded Chromium. Android release checks and publishing are described in Release Flow.

Build dependency hardening

package.json overrides transitive deepmerge with the exact npm alias npm:@shivammathur/[email protected]. This reviewed fork preserves the deepmerge 4 API and MIT license while rejecting __proto__ in both target and source copy loops. The lockfile pins registry tarball integrity; there are no install-time patches or new lifecycle scripts.

npm test exercises the merge implementation resolved from each affected consumer (Svelte plugin and Workbox's Rollup resolver), covering null-prototype targets, nested placeholders, target copying, arrays, CommonJS/ESM loading, and normal merge options. These tests fail against upstream 4.3.1. Keep them when updating or removing the override.

CVE-2026-93753 was rejected because the CNA did not consider the behavior a security vulnerability; GHSA-gcqx-w48m-w2h4 remains active. This change deliberately hardens returned-object prototypes rather than claiming global Object.prototype pollution or an exploitable game/P2P path. Remaining Workbox/glob/minimatch advisories are tracked in BACKLOG.md.

Server Nodes

Prerequisites

  • A server running Linux (Debian/Ubuntu or RHEL/CentOS/Fedora)
  • Root access to the server
  • A domain name pointing to your server (for SSL certificate)
  • Node.js v22+ with npm (the relay installer provisions Node 26 via fnm if no suitable runtime is available)

Relay Node

Circuit relay for NAT traversal, enabling browser peers to connect.

curl -fsSL https://raw.githubusercontent.com/llblab/digifall/main/scripts/deploy-relay.sh -o deploy-relay.sh
chmod +x deploy-relay.sh
sudo ./deploy-relay.sh

The installer reuses an existing Node.js ≥22 with its matching npm when both work as the digifall service user. It does not upgrade the system Node/npm. Otherwise it installs fnm and Node 26.x in the root-owned /opt/digifall-runtime directory, without changing shell profiles or global symlinks. The major is fixed; the initial installation resolves a matching patch version. Systemd runs the resolved Node binary directly, without npm or an fnm shell environment.

To remove the relay:

curl -fsSL https://raw.githubusercontent.com/llblab/digifall/main/scripts/undeploy-relay.sh -o undeploy-relay.sh
chmod +x undeploy-relay.sh
sudo ./undeploy-relay.sh

Uninstallation leaves Node/npm and /opt/digifall-runtime intact. Automatic application-directory deletion is limited to the canonical /opt/digifall path; custom installations require manual directory cleanup. Non-interactive removal defaults to deleting the application, service user, and certificate; set REMOVE_APP=n, REMOVE_USER=n, or REMOVE_CERT=n to retain them.

Leaderboard Node

Headless leaderboard peer for network bootstrapping and data persistence.

git clone https://github.com/llblab/digifall.git
cd digifall
npm install
npm run leaderboard

Custom relays via environment variable:

DIGIFALL_RELAYS="/dns4/your.relay/tcp/443/wss/p2p/12D3KooW..." npm run leaderboard

About

Entropy fighting mathematactic game

Topics

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Used by

Contributors

Languages