Skip to content

Repository files navigation

Super Blocks

A standalone browser port of the original 8×8 block-fitting puzzle, built with TanStack Start, React, and Cloudflare Workers.

Super Blocks

Live game: https://poly.mksaas.link

Features

  • All 1,010 original puzzles from APK 1.0.11
  • Six chapters and 160 timed Boss challenges
  • Original puzzle definitions and 16 block types
  • Original artwork, chapter maps, music, and sound effects
  • Mouse, touch, pen, and keyboard controls
  • Click placement and drag-to-snap interaction
  • Rotation, hints, reset, and level result scoring
  • Local stars, chapter unlocking, and progress restoration
  • English and Chinese interfaces
  • Music, sound, haptics, and reduced-motion preferences
  • Installable PWA with offline game-asset caching
  • Responsive portrait layout for desktop and mobile

Tech stack

  • TanStack Start
  • TanStack Router
  • React 19
  • TypeScript
  • Cloudflare Workers
  • Vitest
  • Playwright
  • Biome

Development

Requirements:

  • Node.js 22+
  • pnpm 10+
pnpm install
pnpm dev

The local application is available at http://localhost:3000.

Testing

Run the complete local verification:

pnpm check
pnpm test
pnpm test:game-levels
pnpm e2e
pnpm build

pnpm test:game-levels recompiles and validates all 1,010 puzzles against the original APK Lua records and stored checksums.

Deployment

Log in to Cloudflare once:

pnpm exec wrangler login

Deploy the production Worker:

pnpm run deploy

The application does not require runtime environment variables, databases, or Worker secrets. Cloudflare credentials are local CLI credentials and must not be committed or uploaded with wrangler secret put.

The production Worker is configured for:

https://poly.mksaas.link

Routes

Route Purpose
/ Game menu
/chapters Chapter selection
/chapter/1 Level selection for a chapter
/play/1 Puzzle gameplay
/ranking Stars stored on the current device
/settings Language and game preferences
/how-to-play Rules and controls

Related open-source games

This project belongs to the same small collection of standalone browser games:

  • game-blocks — a lightweight block puzzle with classic and daily modes
  • game-sudoku — MimoDoku, a cozy cat-placement Sudoku with handcrafted and daily puzzles

Project structure

Path Purpose
src/game/ Original game engine, UI, settings, and generated data
src/game/generated/ Compiled definitions for 1,010 puzzles
src/routes/ Standalone TanStack Router routes
resources/apk-1.0.11/lua/ Original Lua puzzle and chapter records
scripts/game/ APK data compiler and checksum validation
public/game/assets/apk-1.0.11/ Original game artwork and audio
tests/unit/game/ Engine, compiler, scoring, storage, and data tests
tests/e2e/ Browser-level user journeys

Puzzle data

Generated puzzle files can be rebuilt from the Lua records:

pnpm game:data

The generated catalog records the source checksums, chapter ranges, Boss configuration, unlock requirements, and all known puzzle solutions.

Do not edit files under src/game/generated/ manually.

Local data

The Worker is stateless. Game progress and preferences stay in browser localStorage:

  • completed levels and earned stars
  • best completion results
  • last played level
  • language, music, sound, haptics, and motion settings

No account, authentication service, global leaderboard, analytics, or database is required.

Author

OpenFox is an independent developer building products and developer tools. His products include:

  • TanStarter — Ship Faster with TanStack, Cost Less with Cloudflare.
  • MkSaaS — Make Your AI SaaS Product in a Weekend.
  • MkImage — Make Any Images Possible.
  • MkDirs — Launch AI-powered directory in 30 minutes.
  • MkDollar — The all-in-one platform to help you make first dollar online.

Build more with TanStarter

Super Blocks is intentionally kept small and focused, but it originally grew out of a project built with TanStarter.

If you want to turn a game, tool, or product idea into a complete SaaS, TanStarter provides a production-ready TanStack Start boilerplate with auth, payments, AI, storage, email, newsletters, a blog, dashboard, i18n, SEO, and Cloudflare Workers deployment.

Ship Faster with TanStack, Cost Less with Cloudflare.

Asset notice

The game artwork, audio, puzzle definitions, and other binary assets were extracted from a publicly obtainable Android application and are included only for technical exchange, learning, and research. They remain subject to their respective rights holders; the MIT license does not grant permission to copy, redistribute, modify, or otherwise use them beyond any rights you independently obtain.

If you are a rights holder and believe an asset should be removed, please open an issue or contact the repository maintainer. The material will be reviewed and removed when appropriate. If you fork or distribute this project, you are responsible for removing or replacing third-party assets and data unless you have the necessary authorization.

License

Source code is released under the MIT License. Third-party assets and data remain subject to the rights of their respective owners. See THIRD_PARTY_NOTICES.md.

About

Standalone browser port of the original Super Blocks puzzle game

Resources

Contributing

Stars

7 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages