How Playgrid is made
Playgrid is a browser game site I build and run on my own: original games that load in a second, play on a phone or a laptop, and don't need a download or an account. This page covers how it works under the hood.
The problem
Most free game sites feel cheap: pop-ups, copied games, slow loads and layouts that break on a phone. I wanted the opposite. The site should feel like a store from a console maker, and every game should feel finished. It also had to cost almost nothing to run as a student project.
How it's built
- Site: Astro, built as plain static pages (no server), hosted on Cloudflare Pages. Every push to GitHub deploys automatically. Hosting costs nothing.
- Games: 6 games written from scratch, each one a single HTML file with no game engine. The 3D ones use three.js with low-poly art.
- One game SDK: every game talks to the site through a small script I wrote,
pg-sdk.js. The game only reports events ("run started", "game over, score 340"). The site handles the menus, game-over screen, sound, pause and fullscreen, so every game behaves the same way. - Daily challenges: four games have a daily challenge, the same puzzle or run for everyone that day.
- No accounts: favourites, best scores and history live in your own browser (local storage). Nothing personal is sent to a server.
The hard parts
Stopping people from stealing the games
Free browser games get copied and re-hosted all the time. A build step locks every game to this site's domain: the domain list is stored scrambled, and a copy running anywhere else shows a "play it on the real site" card instead of the game. The game code is also minified and its names scrambled, which makes copies hard to edit and the files about a third smaller.
Making it fast on cheap hardware
Before the first paint, the site guesses how strong the device is (CPU cores, memory, data-saver and reduced-motion settings) and picks an effects level, so a school Chromebook gets a lighter page than a gaming laptop. Gameplay preview clips only download when they're about to play. Every game is under 1 MB.
Making it feel premium
I wrote a design brief before any styling, based on how Apple Arcade, Poki and the Nintendo store present games. It sets rules like "the game art is the colour, the interface stays quiet" and "buttons press down like toys", and bans the glowing neon-on-black look that AI tools default to. On supported browsers, clicking a game makes its cover grow smoothly into the game window, and Back shrinks it back into place.
Making the covers
Instead of stock art, I built a small "cover studio" that loads each game's own sprites and level data and lays them out into the cover, wide banner and link-preview images, plus short gameplay clips.
How I built it
I built Playgrid with AI coding tools (Claude) doing much of the code writing, while I directed it: I picked the games and the features, set the design rules, tested builds on real devices with real players, and decided what to keep, change or scrap. Several games were rebuilt or cut entirely after testing. I think that's an honest picture of how a lot of software gets made now. The judgement calls and the testing were mine.
What I learned
- Playtesting beats guessing. My testers' favourite game was not the one I expected, and "too easy" was the most common complaint.
- Phones come first. Most players open a game link on a phone, so every layout starts there.
- Small details decide whether something feels cheap: load time, how buttons react, text size, and whether the first ten seconds are fun.
Want to see it in action? Play a game, or get in touch.