Skip to content

About

mrhakan.github.io

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Repository files navigation

mrhakan.github.io

A Windows 98 desktop that happens to be a personal site. Plain HTML, CSS and JavaScript, served straight off GitHub Pages. There is no build step — what is in the repo is what the browser gets, and that is the whole point.

Explore the site

Launch mrhakan 98 — the live desktop. This is a personal website, an interactive portfolio and a growing collection of small games and useful tools, all dressed up as a late-1990s PC.

  • Desktop experience: draggable windows, taskbar, Start menu, search, themes, desktop toys, a faux browser/address bar and deep-linkable apps. Mouse, keyboard and touch are supported.
  • Playground: standalone browser games and local-first utilities under games/ and apps/. The catalog drives the site's game/app listings; new entries are added regularly.
  • Bigger games: Wizardz 98 (draw sigils in a PS1-style arena), Dungeonz 98 (co-op dungeon runs), Age of Troll (lane warfare), Sir, We Have a Troll Problem (desktop-themed tower defense), Trailz 98 (light cycles, up to eight seats) and Waveshaper 98 (timed rhythm/reflex play).
  • Multiplayer: invite codes, public lobbies and quick match for supported games, with direct connections and relay fallback. The optional relay server can be self-hosted.
  • Music and nostalgia: a Winamp-style player with audio-reactive concert scenes, classic arcade windows, a trophy room, game records and save export.
  • Personal corner: project listings, /now, /uses, a colophon, links, RSS/JSON feeds, plus Guestbook and Shoutbox. Both boards currently use the original GitHub Gist comment flow; Giscus is configured but disabled.
  • Installable and offline-aware: a web manifest, root service worker, lazy-loaded features and reduced-motion support.

Recent additions (November 2026)

The playground now includes, among others, Mancala Pocket 98, Connect Four 98, Slide Fifteen 98, Filter Desk 98, Unit Price Desk 98 and the maritime-focused Voyage ETA 98 and GM Explorer 98.

For ongoing changes, see the desktop's what's new panel, data/news.json, the RSS feed and the commit history. The catalog, not a hardcoded README count, is the source of truth for the current playground entries.

Layout

index.html            the desktop
guestbook.html        the guestbook
links.html            the links page
404.html
sw.js                 the service worker — has to stay at the root, its
                      scope is its own directory
site.webmanifest      what makes the site installable: name, icons,
                      standalone, and shortcuts into four of the games
js/                   everything the pages load
  lazy.js               stand-ins for the windows that load when they are
                        opened. Loads first, so nothing can ask before it is here
  scale.js              the auto scaler: a big screen gets the same desktop, bigger.
                        The fit itself is inline in each page's head
  index.js              the desktop: windows, taskbar, start menu, repo grid
  extras.js             the lazy loaders and find: files
  apps.js  fun.js       the accessories and the toys
  pages.js  charts.js   /now, /uses, /colophon, and the graphs on them
  fx.js                 the motion layer, and the reduced-motion promise
  music-stage.js        per-track concert scenes, live audio lighting and
                        the immersive music room
  music-scenes.js       21 original canvas sets, each with its own choreography;
                        follows the first paint rather than holding it up
  vendor/motion.js      Motion 14.1.0 (MIT), locally served reveal timelines,
                        loaded the first time concert mode opens
  touch.js              the site on a phone: device detection, the
                        on-screen pad, long press for the right click
  defrag.js             disk defragmenter, on a real disk (on demand)
  documents.js          my documents: every game's save, exportable (on demand)
  trophies.js           the trophy room: every achievement, each game's records
                        and time played, and a picture of it to share (on demand,
                        with css/trophies.css)
  guestbook.js          composing and reading a board entry, with Gist
                        boards active and optional Giscus config retained
  themes.js  theme-maker.js  theme-scan.js
  arcade.js             eight small games — tetris, breakout, 2048, simon,
                        hangman, whack, and two with an opponent that does
                        not cheat (minimax, and a pattern reader) (on demand)
  toys.js               the old web's furniture, most of which the field
                        guides file under extinct: a pet, oneko, blinkies,
                        stamps, a hand-sorted directory, awards — plus the
                        joke programs and the small correct tools (on demand)
  web.js                the reading layer: deep links, the address bar,
                        favorites, anchors, contents, reading time, plain
                        text, quoting, sidenotes, printing. Loads last —
                        it patches the globals the others declare rather
                        than editing them in place
  vendor/               third-party scripts, vendored
css/
  style.css             all of it, with 95 marked sections, ending in the
                        reading layer and the print stylesheet
  tailwind.css          the utility classes the site uses. Generated by
                        npm run css and committed, like feed.json
  giscus-win98.css      the theme the giscus iframe loads, since style.css
                        cannot reach into another origin
apps/                 standalone tools (editors, calculators, visualizers,
                      maritime utilities and small experiments)
games/                standalone games, larger desktop games and the shared netplay layer
  echoes/  jokerz/  wizardz/  dungeonz/  age-of-troll/  become-user/  troll-problem/  trailz/
  ps1/                the PlayStation renderer and the height map world that
                      wizardz and dungeonz both stand on
  netplay.js
  lobbies.js          the open lobby list and quick match, on the same relays
data/                 site and board config, projects, GitHub snapshot,
                      news.json (what's new) and playground.json (the
                      standalone games/apps catalog)
src/                  assets only: images, fonts, music, and icons/, the app
                      icons, drawn by .github/scripts/make-icons.py
server/               the optional self-hosted netplay relay
feed.xml              the rss, written by hand
feed.json             the json feed, generated from feed.xml
.github/scripts/      the test suite — no dependencies, same as the site.
                      build-feed-json.mjs and build-tailwind.mjs are the two
                      generators. Neither runs on deploy

Running it

Brawlz 98 is a 2D platform fighter inside the desktop, with online 1v1/2v2, 12 custom cursed emoji fighters, consistent skeletal animations, three desktop arenas, bots and keyboard/touch/gamepad controls. Open ?app=brawlz; the legacy /games/rift-rumble/ path redirects into the same desktop app window. Rules, controls and connection details are in its guide.

npm run serve        # local HTTP server on http://localhost:8099
npm test             # Node checks, simulations and relay smoke test
npm run test:browser  # Playwright browser suite (requires Chromium)
npm run css          # regenerate css/tailwind.css when utility classes change
npm run feed         # regenerate feed.json from feed.xml
npm run relays       # probe the public multiplayer relays

The static site has no runtime npm dependencies and does not need a bundler. Use a local HTTP server rather than opening index.html as a file:// URL: service workers, URL routing and some browser features need an origin.

Winamp's enter concert mode button opens the music room. Tracks have distinct sets and choreography: a rainy cathedral, bunny dancers, a robot factory, a walking line character, Persona's cut-paper poster, Portal's test chamber, Metin2's pagoda, a vintage television and a lane war at dusk, among others. Bass drives the set's lights and props through the existing audio analyser. Local Motion timelines reveal the titles with staggered spring transitions. Pause holds the stage, and Esc or back to desktop restores the desktop. The player remains available in concert mode on phones too. The compact player has an expandable setlist; choosing a song closes it to keep the artwork visible. Reduced motion keeps a still scene, and hidden tabs stop drawing. Slower devices show the scene in concert mode at 20 fps with a smaller backing canvas; the background renderer rests while the desktop is open.

For the browser suite, install Playwright and its Chromium browser if they are not already available (npm install --no-save playwright and npx playwright install chromium). Some individual browser scripts expect a local server on port 8099; several integration scripts start their own.

python3 -m http.server 8099 &
node .github/scripts/browser-check.mjs
node .github/scripts/browser-echoes.mjs
node .github/scripts/browser-mobile.mjs

The tests

Publishing a Playground drop

Finish the page, its data/playground.json entry and sitemap URL before publishing them together. Missing social metadata blocks Pages just like a broken game does. The preflight never changes the page:

npm run playground:preflight

If a new page is missing og:title or og:description, derive just those fields from its own title and description, inspect the diff, and check again:

npm run playground:metadata -- --write
npm run playground:preflight

The repair preserves existing social copy and game code, and validates all input paths before writing. It is not a generator for the game itself or a replacement for browser checks. The external daily publisher should run the preflight before committing; its implementation is not part of this repo.

CI scheduling

Verification uses one Node job and three sequential browser lanes (arena, worlds, desktop): at most four test runners per workflow, not one per game. PRs run this workflow directly; main pushes run it only through Pages' reusable verify job. The build still waits for every lane to pass. Obsolete PR runs are cancelled when a new commit arrives; Pages verification is not cancelled by that policy. Each lane keeps its own screenshot artifact.

All verification jobs have 30-minute limits. Wizardz's browser step remains limited to 15 minutes so a hung game cannot hold the Pages queue for hours. The workflow contract check guards coverage, grouping, triggers and deploy prerequisites. See the timing baseline for measurements, projections and how to review them before a PR. Wizardz/AoT phase profiles, bounded failure screenshots and test-loader benchmarks are described in the test performance notes.

There is no framework. Each script loads the real files, asserts, and exits non-zero if anything drifted.

script what it holds to
check-startup.mjs what the first visit costs: no remote or parser-blocking scripts, a tailwind.css with every class the markup asks for, windows that load when opened, and a size budget
check-playground.mjs catalog entries, paths, metadata and standalone playground integration
check-waveshaper.mjs Waveshaper's note timing, input handling and scoring rules
check-music-stage.mjs uploaded music catalog, audio-reactive lighting, scene lifecycle, pause, reduced motion, hidden tabs and concert controls
check-wizardz.mjs wizardz: the rules, the teams, the four maps, what goes over the wire, loadout ids, and a thousand bot matches against the balance targets, then more on every map at every team size and for all ten ready made loadouts
check-dungeonz.mjs dungeonz: the rules, every dungeon a seed can build being walkable, what goes over the wire, and a hundred runs of four bots against the balance targets: the difficulty curve, run and boss length, the level at the boss, and no skill or passive dominant or useless
check-troll-problem.mjs the troll problem: the art and the animations it needs, the rules (placement, the two paths and the lock, selling, targeting, fliers and armour, four seats with their own towers and an even split of the money, a seat changing hands), what goes over the wire, saves and the old save moving over, and about three hundred bot games: each map harder than the last, no wave a wall, no tower or path dominant or dead weight, four players about as far as one
check-trailz.mjs trailz 98: the light cycle rules (walls, the border, head on, two cycles at one crossing in one step, your own wall, the turn gap, the grind, the brake, walls going, points), a guest's late turn put back where it was pressed and its limits, three hundred crashes coming out the same with the seats reversed, the same seed giving the same match in two copies of the sim, the bots against each other at every level, and what goes over the wire
check-sigils.mjs wizardz: every symbol drawn badly a few hundred times, and the confusion matrix held to its targets
check-offline.mjs offline fallbacks, stalled requests, cache scope, media streaming, responses that do not wait for their cache write, and files fetched only when asked
check-games.mjs every script parses, the fifty spells and their sigils, desktop wiring, my documents' backup envelope, the GitHub snapshot
check-guestbook.mjs composing and reading entries, the default Gist flow and the optional Giscus configuration
check-motion.mjs reduced motion means no motion, the charts, the stylesheet's own links
check-netplay.mjs the ways online against fake relays and a fake broker that misbehave the way real ones do: refusing, throttling, dropping, reordering, no route, a direct link dying mid-duel
check-lobbies.mjs the open lobby list against strangers: listings checked field by field and by signature, stale ones dropped, forged, broken and oversized ones changing nothing, one line per key, a flood held to a ceiling, and a relay that says no left alone
check-defrag.mjs the defragmenter's plan never loses a cluster
check-echoes.mjs a few thousand fights against the RPG's balance targets, and its maps
check-age-of-troll.mjs the lane game's rules, what it sends over the wire, and a few hundred bot games: no unit or plan dominates, the difficulties are really difficulties, and a game lasts about as long as intended; and replays: recorded matches played back to the same last bit on several seeds, scrubbing, link lengths measured, and broken, cut, oversized and old-version links turned away without a crash
check-trophies.mjs every achievement a game hands out exists and lands on its game's shelf, the room against an empty browser and ten kinds of broken save without rewriting any of them, the playground's records found under each game's own key, and site.webmanifest against what Chrome asks before it offers an install: sizes read out of the PNGs, maskable icons with nothing see-through, shortcuts that open something real
check-web.mjs the reading layer against a fake window, the route names in js/web.js, 404.html and sitemap.xml agreeing, and feed.json matching feed.xml
browser-check.mjs the site opens, two tabs duel, the guestbook works both ways
browser-arcade.mjs the thirty new windows played rather than opened: eight games of tic-tac-toe it expects to lose, tiles merged in 2048, the pet's clock wound back nine hours
browser-playground.mjs standalone playground pages and their browser behaviour (separate from the standard test:browser script)
browser-waveshaper.mjs Waveshaper played in a browser with its input and timing flow (separate from the standard test:browser script)
browser-web.mjs deep links open the right document, the address bar in every form a person writes one, back and forward, favorites surviving a reload, quoting, find-in-document, the layout and tap targets on a 412px phone, the fullscreen that works without the API, and /now and /uses resolving — it brings its own server for that last part
browser-echoes.mjs a character is rolled, a voyage is walked, a fight is won
browser-netplay.mjs two strangers into a duel with nothing picked: an invite link through the boot screen, direct when there is a route, the relays when there is not, a blocked cdn, a wrong code, and a direct link dying mid-duel. Runs on no outside server
browser-lobbies.mjs strangers in separate browsers on the open lobby list: listed, seen, joined with one click, gone when the match starts, the host leaves or its tab dies; quick match one after the other and both at once; html and forgeries on the relay. Brings its own server and relay
browser-age-of-troll.mjs a match against the bot through to a win with real clicks, on a desktop and a phone; a save surviving a reload; and two browsers through a match over a direct link and the relays, with the link dying partway and a player vanishing; and a replay link from a finished match opened in a new browser, watched at 8x, scrubbed to the end and compared bit for bit, from a solo match and an online one
browser-wizardz.mjs wizardz played with a real mouse through to the end of a match, old saves, the auto scaler, a phone with real touches, every map, a 4 v 4 with bots to the end, a 2 v 2 with two browsers and bots, loadout ids typed in and refused, a guest casting what it does not carry, and two browsers direct and over the relays, with the link dying, a player leaving and the bytes counted
browser-dungeonz.mjs dungeonz from the address bar to a cleared dungeon with the clock turned up: a card picked by key, a fireball drawn with the mouse, the boss through three phases, the frame rate with four wizards and a crowd, a phone with real touches, and two browsers direct and over the relays, with the line going quiet, the link dying and a guest walking out, and the bytes counted
browser-troll-problem.mjs the troll problem played: an old save moved over, towers put down on and beside the road with the mouse, both paths until one locks the other, selling, a map to the troll king with the clock turned up, a phone with real taps, two browsers direct and four over the relays with the bytes counted, a link dying, a guest walking out and a newcomer taking the empty seat. Brings its own server and relay
browser-ps1-feel.mjs the PS1-style renderer and presentation of the larger 3D games
browser-scale.mjs desktop scaling across viewport sizes
browser-trailz.mjs trailz 98 ridden: none of it in the first load, the start menu and the address bar, a match against a bot from the menu with real keys turning and braking, a crash, the clock turned up to the end; the picture checked for a perspective floor under a dark sky from every camera and the frame rate written down; a phone with real taps and sideways fullscreen; two browsers direct with a guest's turn landing where it was pressed even with 250ms of lag each way, the line going quiet, the link dying and a guest walking out; three over the relays with the bytes counted and a newcomer taking a seat; a full match of eight browsers over the relays with the bytes counted and a ninth turned away; a public lobby on a stranger's list. Brings its own server and relay
browser-mobile.mjs every app on a Pixel 7: nothing widens the page, a finger drags and closes a window, the troll problem asks before it builds, and the music is never handed to a sleeping audio graph
browser-trophies.mjs the trophy room opened from the desktop icon and the start menu, dungeonz handing out an achievement and the room showing it, a playground record in another tab, the share picture, an empty and a fully broken browser, a phone; the install button with a stand-in for Chrome's prompt, an iPhone, and the installed copy; Chrome's own installability verdict over CDP; and the cable out: a returning visitor offline, every on-demand game opened, the lobby refusing to wait. Brings its own server on localhost, since a service worker needs one
browser-giscus.mjs original boards by default, both posting methods and preserved drafts on desktop and mobile, isolated discussion terms and theme URLs, blocked scripts, service errors and stalled frames; proves CORS and application errors are still detected

Things that will bite you

  • A phone zooms the whole page out if anything sticks out sideways. One element past the right edge and the browser widens the layout viewport to cover it, so every window renders at half size in the middle of the screen. The news ticker does exactly that for half of every loop and is only clipped by a class in a second stylesheet, so #marquee-rail and html { overflow-x: clip } are the floor under it. browser-mobile.mjs samples the page width right through the marquee loop.

  • A finger drag emits pointer events and nothing else. No browser synthesises mousemove for one — only a click at the end of a tap — so a titlebar wired to mousedown/mousemove is immovable on a phone. Window dragging is on pointer events with capture.

  • createMediaElementSource is a one-way door. It takes the <audio> element off the speakers and hands its output to the web audio graph. Call it while the AudioContext is suspended — which is how a phone creates one — and the track plays with the clock ticking, the progress bar filling and no sound at all. The graph is only ever built once the context is genuinely running.

  • Multiplayer tested from one machine proves nothing about the network. Two browsers on the same computer never need TURN or a relay, so a dead server looks exactly like a working one. That hid the free TURN servers vanishing and a relay list that was down to one working relay. The relays are other people's servers and they change: npm run relays checks them at game rate, for long enough to get past the limits a quick check never sees, and npm run relays -- --lobbies checks that they pass on the open lobby list's listings, questions and goodbyes.

  • The open lobby list is strangers' writing. Anyone can post to a public relay, so games/lobbies.js checks every listing against the game catalogue, cuts it to length, checks its signature and escapes it before it is drawn. A flood of new keys can fill the list for as long as it keeps posting; it cannot break it. A tab that is killed outright cannot say goodbye, so its listing lasts until the 40 second time limit.

  • sw.js stays at the root. A service worker's scope is its own directory; moving it into js/ would silently stop it controlling the site.

  • Every url() in css/style.css is absolute. They resolve against the stylesheet, not the page, so a relative one broke the icon font the moment the file moved into css/. check-motion.mjs fails the build on a relative one now.

  • The service worker precaches by URL. Move a file and its entry in PRECACHE or PRECACHE_LATER has to move too — check-games.mjs fails if a precached URL does not exist. PRECACHE is what it takes to boot the desktop, and the install waits for it. PRECACHE_LATER is everything that loads on demand: js/lazy.js asks for it once somebody has stayed fifteen seconds, unless their connection asked to save data.

  • css/tailwind.css is generated, by npm run css, from the classes in the three pages, js/ and the games the desktop can open. Reach for a utility nothing has used yet and re-run it, or check-startup.mjs fails. A class built up at runtime from pieces ('text-' + colour) cannot be seen by either of them, so spell it out. The file comes after style.css on purpose: it was injected last when it came off a cdn, and plenty of style.css has been losing to it at equal specificity ever since.

  • A function in js/lazy.js answers late. Its window appears after the caller has moved on, so only functions that are called and not read can go in the table. A DOMContentLoaded listener in one of those files never fires, since the page finished loading before the file arrived. A new function that another file calls goes in the table, and check-startup.mjs fails if the table names something the file does not declare.

  • The hidden sections build themselves when opened. The repo grid and the playground catalog do not exist until showSection first asks for them. Nothing else can assume they are there.

  • check-startup.mjs has a budget. Over it means finding out what grew. A new window belongs in js/lazy.js, not in a bigger number.

  • data/github.json is generated, once a day by .github/workflows/github-data.yml. Do not hand-edit it.

  • window.innerWidth is not the viewport on a phone. If anything overflows horizontally the browser widens the layout viewport to fit it and innerWidth widens too — measured at 1648 on a 412px screen. Use TOUCH.viewportWidth(), which reads documentElement.clientWidth and agrees with the media queries.

  • Route names live in three files that cannot import from each other. js/web.js resolves them, 404.html redirects to them (it is a separate page, so it carries its own copy), and sitemap.xml lists them. The keys in appActions() are the source of truth, and a few have a nicer public name — usespage is ?app=uses. check-web.mjs holds all three lists to the real routes; it is what caught /uses pointing at nothing.

  • feed.json is generated from feed.xml by npm run feed. Add an <item> and re-run it, or check-web.mjs fails.

  • js/web.js loads last, on purpose. It wraps createAppWindow, closeAppWindow, startMenuAction and showSection, which have to exist before it runs. Move its <script> tag up and the deep links stop working silently.

  • .doc- belongs to the slash pages; my documents is .docs-. Both features grew a "document window" and both reached for the same prefix. js/documents.js loads second, so it won, and every /now, /uses and colophon window rendered in MS Sans Serif rather than the Courier its own rule asks for — silently, for weeks. check-web.mjs fails the build if the two namespaces overlap again.

  • The document font size is var(--doc-font-size). The A-/A+ buttons set it on the root element. A second rule hard-coding font-size on .doc-body would win and kill the buttons without an error, so check-web.mjs looks for one.

  • .doc-body's font size, and everything else instant() touches. With motion off, FX.animate applies the keyframe's end state directly. It used to apply three properties and drop the rest, so a keyframe that moved something by left never happened for anyone with reduced motion on — and nothing said so. check-motion.mjs holds it to the whole keyframe now.

  • Fullscreen is two implementations. The Fullscreen API where it exists; a .fs-faux class pinning the window over the viewport where it does not, which is Safari on iPhone and any iframe without allow="fullscreen". Everything downstream — .fs-active, the canvas fitting, Escape — is driven off the same class either way, so a change to one needs checking against the other.

  • Touch rules key off pointer: coarse, never a width. A narrow desktop window is not a phone and a tablet with a stylus is not a fingertip. The bigger tap targets and the 16px inputs must not appear under a mouse — that is what keeps this looking like 1998.

  • A new window has four places to be registered, and check-web.mjs fails if any of them is missed: appActions() in js/index.js, the start menu in index.html, the search index in js/extras.js, and PRECACHE_LATER in sw.js. It also checks that every unlockAchievement() names an achievement that exists, and that every class the new files invent has a style.

  • An achievement is one line and one call. A line in ACHIEVEMENTS in js/fun.js, and unlockAchievement('id') where it happens. The trophy room shelves it by its prefix (dungeonz_, aot-, echoes-, troll_...), so a new one for an existing game needs nothing else. An id that does not exist does nothing at all, silently: that is how wizardz handed out two achievements for weeks that nobody could ever get. check-trophies.mjs fails the build on one now. A hint on the line is what a locked one shows instead of its description.

  • The playground's pages do not load the desktop's scripts. So they cannot call unlockAchievement. Their achievements are counted from the records they leave in localStorage, which the trophy room finds by the game's folder name (lights-out-98-best is games/lights-out/). A game that saves under some other name goes in ALIAS in js/trophies.js.

  • The install button only exists when there is something to install. Chrome and Edge fire beforeinstallprompt once, early, when the site qualifies; js/fun.js keeps it for the start menu and the tray. Safari never fires it, so an iPhone gets the share, add to home screen instructions instead. Inside the installed copy (display-mode: standalone) neither shows. A change to site.webmanifest or the icons goes through browser-trophies.mjs, which asks Chrome itself.

  • node_modules/ is disposable. The site has no dependencies and neither does the test suite; the only thing that lands there is Playwright, installed with --no-save for the browser runs.

About

mrhakan.github.io

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages