Skip to content
dimasmongPublic

About

An original, lightweight browser-based precision stacking arcade game with multiple modes, skyline evolution, achievements, and offline support.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

MoStack

One Tap. Infinite Heights.

License: MIT Version TypeScript Phaser Vite PWA Ready Tests: Vitest E2E: Playwright

An original, lightweight, browser-based precision stacking arcade game. Master rhythmic timing, deploy the Focus Pulse time-dilation skill, navigate predictable wind variations, and watch the futuristic skyline evolve across four atmospheric altitudes.


πŸ“Έ Screenshots

Daylight Mode Cyberpunk Night Mode
MoStack Home Light MoStack Home Dark
Precision Stacking Gameplay Game Modes Selection
MoStack Gameplay MoStack Modes
Mobile Viewport (Responsive) Achievements & Progression
MoStack Mobile MoStack Achievements

Continuous Camera Tracking & Geometry Synchronization Across Milestone Floors (v1.0.2)

Floor 1 (Base Platform) Floor 5 (Dawn City) Floor 8 (Dawn Horizon)
Floor 1 Floor 5 Floor 8
Floor 11 (Aurora Borealis) Floor 18 (Polar Ascent) Floor 25 (Neon Skyline)
Floor 11 Floor 18 Floor 25
Floor 40 (Cosmic Heights) Floor 50 (Cosmic High-Rise) Floor 100 (Centennial Tower)
Floor 40 Floor 50 Floor 100

✨ Features

  • Pure Client-Side Precision Physics: Mathematically exact overlap clipping and detached segment gravity calculations with zero floating-point accumulation defects.
  • Harmonic Alignment Tolerances: Center-point alignment checking (min(6, max(2, width * 0.06))) snaps qualifying blocks perfectly, rewarding players with pentatonic chime harmonics and bonus multipliers.
  • Four Distinct Game Modes:
    • πŸ›οΈ Classic: Infinite ascending tower with progressive movement speed and high score tracking.
    • ⚑ Pulse: Tactical challenge featuring the Focus Pulse ability (slows block speed by 55% for 2s after 5 consecutive Perfects) and telegraphed Wind Phases (Calm, Breeze, Gust, Reverse Pulse).
    • 🌸 Zen: Relaxed stacking experience with gentle movement pacing, no time limits, and infinite retries of missed platforms without game over.
    • 🎯 Daily Tower: Deterministic challenge seeded by the current UTC calendar date. Everyone stacks the same daily tower; records your first attempt officially while allowing practice replays.
  • Skyline Altitude Evolution:
    • Stage 1 (Floors 1–10) β€” Dawn City: Warm morning sunlight, pastel blue sky, and soft cityscape silhouettes.
    • Stage 2 (Floors 11–20) β€” Aurora Borealis: Polar twilight, ice-blue gradients, and shimmering atmospheric particles.
    • Stage 3 (Floors 21–30) β€” Neon Skyline: Cyberpunk violet cityscape with illuminated skyscraper windows and glowing grids.
    • Stage 4 (Floors 31+) β€” Cosmic Heights: Deep space atmosphere, twinkling stars, and cosmic nebulae.
  • Web Audio API Synthesizer: Pure procedural sound engine requiring zero external sound assets. Features punchy wood/crystal drop impacts, rising pentatonic streak chimes, time-warp whooshes, and optional generative ambient chords.
  • Cosmetic Block Skins: Unlock 4 unique themes (Aurora Glass, Sunset Blocks, Neon Circuit, Monochrome Steel) through gameplay milestones and achievements.
  • Versioned Local Storage: Safe schema-versioned state management with active session save & resume, lifetime statistics, and graceful corrupt-data recovery.
  • Progressive Web App (PWA): Full offline support via Service Worker precaching. Installable on mobile and desktop devices.
  • Dual Localization: Complete English and Indonesian language support.

πŸ•ΉοΈ Controls

Action Desktop Mobile / Touch
Drop Block Spacebar or Mouse Click Tap anywhere in play zone
Focus Pulse F key Tap on-screen Focus button
Pause / Resume P or Escape Tap on-screen Pause (⏸) button
Navigate Views Keyboard / Mouse Touch navigation buttons

Minimum touch target sizes conform to 44px accessibility standards with full protection against accidental double-drops and pinch gestures.


πŸ› οΈ Architecture & Tech Stack

  • Game Engine: Phaser 3 (3.88.2) pinned stable release.
  • Language: TypeScript 5.x in strict mode (noImplicitAny, noUnusedLocals, strictNullChecks).
  • Bundler: Vite 8 with tree-shaking and minification.
  • Audio: Web Audio API Procedural Synthesizer.
  • Offline / PWA: vite-plugin-pwa with Workbox caching.
  • Unit Testing: Vitest with Happy-DOM (20/20 test cases passing).
  • Integration / E2E: Playwright browser automation (8/8 test suites passing across Chromium & Mobile).
  • Code Quality: ESLint flat config with @typescript-eslint.
MoStack/
β”œβ”€β”€ public/                 # Static assets, SVG logo, PWA icons, manifest
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ core/               # Pure headless logic (Zero DOM/Phaser dependencies)
β”‚   β”‚   β”œβ”€β”€ camera.ts       # Unified world-to-screen camera coordinator & smoothing
β”‚   β”‚   β”œβ”€β”€ engine.ts       # Coordinate math, overlap trimming, collision physics
β”‚   β”‚   β”œβ”€β”€ pulseManager.ts # Focus skill recharge & predictable wind phases
β”‚   β”‚   β”œβ”€β”€ seededRandom.ts # Mulberry32 PRNG for deterministic daily challenges
β”‚   β”‚   β”œβ”€β”€ audio.ts        # Procedural Web Audio API sound synthesis
β”‚   β”‚   β”œβ”€β”€ storage.ts      # Versioned LocalStorage schema & migration
β”‚   β”‚   β”œβ”€β”€ achievements.ts # 12 lifetime achievements & unlockable skins
β”‚   β”‚   β”œβ”€β”€ i18n.ts         # Dual-language translations (EN, ID)
β”‚   β”‚   └── types.ts        # Comprehensive TypeScript interfaces
β”‚   β”œβ”€β”€ game/               # Phaser 3 Game Scenes
β”‚   β”‚   β”œβ”€β”€ StackingScene.ts# Stacking arena, skyline evolution, camera tracking
β”‚   β”‚   └── phaserConfig.ts # Canvas scaling & engine bootstrap
β”‚   β”œβ”€β”€ ui/                 # Semantic HTML & CSS application shell
β”‚   β”‚   β”œβ”€β”€ router.ts       # 12-view application router & Phaser lifecycle
β”‚   β”‚   β”œβ”€β”€ components.ts   # Modals, toasts, and UI helpers
β”‚   β”‚   └── views/          # Home, Modes, Gameplay, Stats, Skins, etc.
β”‚   β”œβ”€β”€ styles/             # Design system variables, themes, and HUD styles
β”‚   └── main.ts             # Application entrypoint
β”œβ”€β”€ tests/
β”‚   β”œβ”€β”€ unit/               # Vitest engine, pulse, daily, storage test suites
β”‚   └── e2e/                # Playwright cross-browser & viewport tests
└── docs/screenshots/       # High-resolution screenshots captured from live runs

πŸš€ Getting Started

Prerequisites

  • Node.js v18.0.0 or higher
  • npm v9.0.0 or higher

Installation

# Clone the repository
git clone https://github.com/dimasmong/MoStack.git
cd MoStack

# Install dependencies
npm install

Running Locally

# Start Vite development server
npm run dev

# Open http://localhost:3000 in your browser

Building for Production

# Typecheck and build optimized distribution bundle
npm run build

# Preview the production build locally
npm run preview

Running Tests

# Run all Vitest unit tests
npm run test:unit

# Run Playwright E2E browser tests
npm run test:e2e

# Run linter and typechecker
npm run lint
npm run typecheck

πŸ“œ Open Source & Attribution

  • Phaser 3: Licensed under the MIT License. Copyright Β© 2011–2026 Photon Storm Ltd.
  • Vite: Licensed under the MIT License. Copyright Β© 2019–present VoidZero Inc. & Vite Contributors.
  • vite-plugin-pwa: Licensed under the MIT License. Copyright Β© 2020–present Anthony Fu.
  • Vitest: Licensed under the MIT License. Copyright Β© 2021–present Anthony Fu, Matias Capeletto.
  • Playwright: Licensed under the Apache License 2.0. Copyright Β© Microsoft Corporation.

πŸ“„ License

Β© 2026 MoStack. Licensed under the MIT License.

Crafted with ❀️ by Dimas Mong.

Repository: https://github.com/dimasmong/MoStack Production: https://mostack-theta.vercel.app

About

An original, lightweight browser-based precision stacking arcade game with multiple modes, skyline evolution, achievements, and offline support.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages