Skip to content

About

开源游戏合集 · A free, bilingual (中文/English) directory of 182 open-source games, 10 playable in the browser. Static site for Cloudflare Pages.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

Repository files navigation

Open Source Games · 开源游戏合集

A bilingual (中文 / English) website for the curated list bobeff/open-source-games: 182 open-source games and open-source remakes of commercial games, with the ones you can play in a browser at the top. Five of them run inside the page; the rest open in their own tab.

Built on the Open Source Games design system: EGA-palette tokens, a text-mode dialog frame, Archivo and IBM Plex Mono.

Layout

Path What
public/ The site. Static files; deploy this folder as is.
wrangler.jsonc Cloudflare deploy settings: the folder to serve and the domain.
public/assets/site.css, boot.js, app.js Hand-written page styles and scripts.
public/assets/fonts/ Self-hosted Archivo and IBM Plex Mono (SIL OFL 1.1, license files included).
public/index.html, privacy/, terms/, credits/, assets/tokens.css, assets/osg.css, _headers Generated by tools/build_site.py. Don't edit by hand.
tools/pages.py Text of the privacy policy, terms of use and credits (Chinese and English).
data/games.json The list as data, generated by tools/build_data.py.
data/play.json Games playable in a browser: URL, embed or new tab, controls, notes. Edit by hand.
data/extra.json Games this site adds beyond the upstream list, each with the genre it joins. Merged by tools/extras.py; their play records go in play.json. Edit by hand.
data/zh.json Chinese descriptions and headings. Edit by hand.
data/link-baseline.json Where each outside link landed when last checked; see tools/check_links.py.
design/ Tokens and component styles from the design system.

Privacy and abuse protection

  • No server code, accounts, forms, cookies, analytics or ads. Fonts are self-hosted, so opening a page contacts no third party; a game's site loads only when someone presses Play.
  • public/_headers sends a strict Content-Security-Policy: scripts and styles from this site only, frame-src limited to the embedded games, and frame-ancestors 'self' so nobody can wrap this site inside theirs.
  • Embedded games run in a sandboxed iframe: they can't navigate this page away or open downloads.
  • .github/workflows/check-links.yml runs tools/check_links.py every Monday. It fails when a link starts landing on a different site than recorded in data/link-baseline.json (an expired domain bought by someone else, for example), or when an embedded game stops allowing embedding.
  • After a legitimate move, check the new site and run python tools/check_links.py --update-baseline.

Update from the upstream list

git clone --depth 1 https://github.com/bobeff/open-source-games.git ../osg-upstream
python tools/build_data.py ../osg-upstream/README.md "$(git -C ../osg-upstream rev-parse --short HEAD)"
python tools/build_site.py

build_data.py prints any play.json id it can't find. New entries without a Chinese description show the English text in both languages until data/zh.json has them.

Deploy (Cloudflare Workers, static assets)

Live at https://games.comanta.com.my. wrangler.jsonc serves public/ as static assets with no Worker code, on the custom domain only (no *.workers.dev copy).

Pushing to main deploys automatically: .github/workflows/deploy.yml runs npx wrangler@4.156.2 deploy when public/, wrangler.jsonc or the workflow changes. It needs the repository secret CLOUDFLARE_API_TOKEN, a token made from the "Edit Cloudflare Workers" template with the comanta.com.my zone. To deploy by hand, run the same command with Wrangler logged in (npx wrangler login).

  • Static asset requests are free and don't count toward the Workers request limit.
  • public/_headers sets the Content-Security-Policy; its frame-src lists exactly the sites the player may embed, generated from play.json. Wrangler applies it and doesn't publish the file.
  • Test locally with the real runtime: npx wrangler@4.156.2 dev.

Rules for adding a playable game

  • Embed only when the game's page allows framing (no X-Frame-Options, no restrictive frame-ancestors) and it actually runs inside an iframe. Otherwise use "mode": "tab".
  • Pages that need cross-origin isolation (COOP/COEP, for threaded WebAssembly) open in a tab.
  • Mark third-party ports "unofficial": true and demos behind a sign-up "account": true.

Credits

List data: bobeff/open-source-games, CC0 1.0. Every game belongs to its authors; this site links to or embeds the browser versions they host.

About

开源游戏合集 · A free, bilingual (中文/English) directory of 182 open-source games, 10 playable in the browser. Static site for Cloudflare Pages.

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages