Open PHP libraries and Symfony bundles for games and gamification: dice, loot, random generators, weather, points, levels, badges, quests, collections and exchanges.
Tilttek is a set of small tilttek/* packages, each doing one thing: a library in plain PHP, usually paired with a
Symfony bundle that wires it into configuration, Doctrine, Twig, the console and Messenger. They follow the rules of
the phil/* packages of PHIL: typed for PHPStan at its
maximum level and tested down to the mutation of every line of their domain.
This repository is the monorepo where every package is developed, tested and documented together. Each package is then split into its own read-only repository, from which Composer installs it through Packagist.
| Package | Description |
|---|---|
tilttek/dice |
Dice notation parsed, checked and rolled: pools, keep and drop, explosions, rerolls, successes, verifiable and replayable rolls. |
tilttek/dice-bundle |
Dice in a Symfony application: limits and custom dice in configuration, replayable rolls in Doctrine, macros, a form field, Twig and an accessible detail of a roll. |
tilttek/dice-skins |
A member's dice appearance — skins, colours, materials and owned dice — applied to the roller, its numbers kept readable, in high contrast for a viewer who asks. |
tilttek/dice-probability |
The exact odds of a dice expression, as fractions: distributions, at least and at most, mean, comparisons. |
tilttek/dice-probability-bundle |
The odds of a dice expression in Symfony: an accessible table and chart in Twig, updated live as the expression is typed. |
tilttek/loot-tables |
Loot tables rolled with any die, drawn in a way anyone can verify, physical dice included. |
tilttek/loot-tables-bundle |
Loot boxes sold in Symfony orders: committed when placed, drawn once paid, physical dice at a register, and the proof of each draw kept. |
tilttek/accessible-dice |
An accessible dice form for Symfony, with or without JavaScript: large targets, faces spoken by label, shape and value, results announced to screen readers. |
tilttek/secret-rolls |
The game master's hidden rolls, committed before they are made and verifiable by the players after the reveal. |
tilttek/dice-jail |
Unlucky dice sent to jail and checked with a fair statistical test, explained plainly, that never calls a die loaded without the evidence. |
tilttek/dice-tower |
A shared dice tower for a table in Symfony: every roll seen by everyone, live and in order, with missed rolls read back from the log. |
| Package | Description |
|---|---|
tilttek/generator |
Random generators written as data: weighted lists, Markov names, Twig templates in a sandbox, grammar in six languages, maps, tables with a memory, replayable draws. |
tilttek/generator-bundle |
Random generators in a Symfony application: lists from YAML and JSON, ready-made random tables, commands, Twig, a Stimulus controller and a rate-limited draw API. |
tilttek/weather |
Weather in the game world: seasons and climate zones, conditions that follow the day before, temperatures rolled within the season, reproducible from a seed. |
tilttek/heraldry |
Coats of arms drawn from a seed, blazoned in English and French, and written as safe SVG. |
| Package | Description |
|---|---|
tilttek/activity |
A journal of what members do, recorded once per gesture, with the projections every other module reads. |
tilttek/activity-bundle |
The activity journal in a Symfony application: Doctrine DBAL tables, projections kept up to date live or by Messenger. |
tilttek/points |
Points kept in a double-entry ledger: currencies, earning rules, caps, expiry, spending and transfers. |
tilttek/points-bundle |
Points in a Symfony application: rules in configuration, the ledger in Doctrine DBAL, balances and histories. |
tilttek/progression |
Experience, levels on a curve, seasons, milestones and streaks counted in the member's timezone. |
tilttek/progression-bundle |
Levels and streaks in a Symfony application: tracks in configuration, a progress bar and a streak in Twig. |
tilttek/badges |
Badges earned on members' activity: criteria, tiers, progress, hidden badges and showcases the member chooses. |
tilttek/badges-bundle |
Badges in a Symfony application: criteria in configuration, awards stored, a showcase in Twig, Open Badges credentials. |
tilttek/quests |
Quests and challenges: steps read on activity, dates that come back, chains, team quests and duels. |
tilttek/quests-bundle |
Quests in a Symfony application: in configuration or the database, with their progress, events and templates. |
tilttek/collections |
Collectible items and sets: copies and doubles, the item of the day, packs drawn with published odds. |
tilttek/collections-bundle |
Collections in a Symfony application: the catalog in configuration or the database, copies in Doctrine DBAL, an album and the item of the day in Twig. |
tilttek/exchange |
Rewards bought with points in two steps, points given between members, and items traded by offers and counter-offers in one transaction. |
tilttek/exchange-bundle |
Exchanges in a Symfony application: rewards redeemed, points given and items traded, kept in the database with forms, safeguards and expiry. |
tilttek/bounties |
Playful bounties prepaid in points and held in escrow, claimed and awarded within a bounded time; never money. |
tilttek/friend-challenges |
Challenges between friends or open to all, with a points prize held in escrow, proofs, judges and the site's moderation. |
tilttek/leaderboards |
Leaderboards kept up to date from the activity journal: periods and sliding windows, tie-breaks, snapshots, weekly leagues, titles and teams. |
tilttek/leaderboards-bundle |
Leaderboards in Symfony: boards, periods and weekly leagues in configuration, scores in Doctrine DBAL or Valkey kept up to date from members' activity, and standings drawn with a UX Toolkit kit. |
tilttek/luck-tokens |
Luck, inspiration or fate tokens a table hands out and spends, every move in an append-only ledger. |
tilttek/luck-tokens-bundle |
Luck tokens in Symfony: inspiration and fate tokens per table, every move stored in the database, with events, access rules and member erasure. |
tilttek/rating |
Per-game ratings of players from their results: Elo or OpenSkill, duels, teams and draws, private by default, and a replay that gives the same values. |
tilttek/advent-calendar |
An advent calendar: one box per day in the calendar's timezone, an opening policy, each box opened once and told by an event. |
tilttek/advent-calendar-bundle |
An advent calendar in Symfony: calendars in configuration or the database, each box opened once, a screen that works without JavaScript and a celebration. |
tilttek/writing-goals |
An author's writing goals: a target in words or pages, a plan on a curve, a daily quota recomputed from what remains, no streak counted. |
tilttek/seasonal-events |
Yearly seasons by RFC 5545 rule, with their contents and the multipliers they announce. |
tilttek/sets |
Versioned sets with tiers and rewards: a neutral building block that collections and badges build on. |
tilttek/stickers |
Stickers placed on surfaces, with limits per surface and per holder, and moderation. |
tilttek/bingo |
Bingo with cards drawn from a server secret, printed cards that can be verified, and wins checked on the server. |
tilttek/raffle |
Raffles with one chance per entrant and none for sale: the entrant list is fixed and hashed first, and anyone can check the draw was fair. |
tilttek/quiz |
Quiz games: six kinds of questions, a timer and a speed bonus, self-paced plays and live sessions with pseudonymous guests and teams. |
tilttek/game-engine |
Turn-based games as a log of moves: seeded randomness committed in advance, undo, snapshots and replay. |
tilttek/game-engine-bundle |
Game tables in Symfony: opaque seat identifiers, the log in DBAL, a lock, and private Mercure updates. |
tilttek/table-safety |
Safety tools for tabletop games: lines and veils, anonymous signals, and the credits of each tool. |
tilttek/table-safety-bundle |
Table safety in Symfony: screens for lines, veils and signals, the game master's screen with live alerts, anonymous by default. |
| Package | Description |
|---|---|
tilttek/deck-builder |
Card decks built to a format's declared rules: sizes, copies, banned cards and taboo lists, every violation readable, no publisher's catalogue bundled. |
tilttek/wargame-army |
Army lists for miniatures games on a generic engine: units, options, points and detachment slots checked against a catalogue the application provides. |
tilttek/puzzle-builder |
Puzzles for a scenario, checked on the server: normalized and partial answers, bounded guesses, tiered hints and a validated unlock graph. |
tilttek/escape-room |
Escape rooms on chained puzzles: a countdown, hints that cost time, a host console, bookable sessions and a leaderboard by consent. |
tilttek/escape-room-bundle |
Escape rooms in Symfony: rooms, bookings, a host console, live hint screens, countdowns that end on time and a leaderboard by consent. |
Every package is at 0.x: its API may still change between minor versions, as its CHANGELOG records.
Require the package you need; a bundle brings its library along:
composer require tilttek/points-bundleEach package's README and doc/ say what it requires, how to configure it and what it leaves to the application.
packages/<name>/: one package per folder, installable on its own, with itscomposer.json, README in English and in French, CHANGELOG, licence, documentation indoc/(French mirror indoc/fr/) and tests.- The root ties them together through a Composer path repository and holds the shared quality tooling, which comes
from
phil/dev-tools.
Issues and pull requests go to this repository, never to the split repositories, which are overwritten at each split. Read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.
MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Tilttek project. See LICENSE. Each package carries its own licence file.