Alle Projekte

hello-eme-play

Game engine that turns any website into a game, configured by a single JSON. With a plugin for Payload CMS.

AI-generated
  • Tools

What it's about

On hello-eme.ch a small pixel figure walks across the page, punches paragraphs until they break and gets into a car. That bit of fun grew into an engine of its own: the website itself is the playing field, and everything that happens in the game lives in a single JSON. That way the game fits on any page, with plain HTML, any framework or any CMS.

Try it

On hello-eme.ch, press the game button next to the light/dark switch. For your own page one line is enough: download play.js from the releases page, put it next to your page and include it.

<script src="/play.js" data-config="{}" defer></script>
Codebeispiel (html)

{} is already a complete game with all defaults. Everything else is merged over those defaults.

What the engine can do

  • Two views: top-down and side-scroller, where the page's elements become platforms. Switch at any time through items, triggers or levels
  • Figure, monsters, vehicles with stats like health, attack and speed, moves (punch, kick, bite) and behaviors (chase, wander, flee)
  • Levels and goals: score, kills, survive for a while or defeat a boss
  • Items, upgrades, a shop and triggers following the pattern “when X happens and Y holds, do Z”, plus sounds and a high score
  • Your own pictures: pixel art is built in, your own PNG or SVG sprites with animations replace it
  • Touch controls with a d-pad, round action buttons and a steering wheel and pedals for the car
  • Safe: the JSON is always validated, wrong values are corrected and never crash the page

Screenshots

Top-down view: the pixel figure fights monsters on a web page
Side-scroller view: elements of the web page become platforms
Touch controls on a phone with a d-pad and round action buttons

Edit it in the CMS

For Payload CMS there is a plugin. It turns the JSON schema into a form in the admin, in German or English, with presets, a picture picker and a tab for the raw JSON. That's how I adjust the game on hello-eme.ch without touching code.

Balance without a browser

Bots play a JSON headless and report win and death rates, scores and hints such as “nobody survives” or “too easy”.

Tech

TypeScript in an Nx monorepo with five packages: play (browser runtime), play-core (game logic without a DOM), play-schema (defaults, validation, migrations, JSON Schema), play-payload (the plugin) and play-sim (the bots). Installed straight from the GitHub releases, no npm account or token needed. Open source under the MIT license.

Like hello-eme-play? Buy me a coffee.

Alle Projekte
  • Moat

    A small PHP gate on the hosting you already have that keeps API keys out of the browser and forwards only approved requests. Still in development.

    AI-generated
    • Tools
  • bexio-dotnet

    .NET library for the bexio API (2.0 and 3.0): invoices, contacts, accounting and more, with personal access token or OAuth2 sign-in.

    AI-assisted
    • Tools
  • Mirrorbase

    Desktop app that copies a database from a saved source to a target. Every database type is a plugin.

    AI-generated
    • Tools

© 2026 Eme. See you space cowboy 2e78c88