Skip to content

jamiely/tetris-attack-clojure

Repository files navigation

Tetris Attack Clone

A modern Tetris Attack/Panel de Pon clone implemented in Clojure/ClojureScript with dynamic canvas scaling and responsive design.

Build Status

Usage

brew install mise
mise install

# Install dependencies based on deps.edn
clojure -P

# Start development server with hot reloading
npx shadow-cljs watch app
# Navigate to: http://localhost:8080/
# Debug mode: http://localhost:8080/?debug (shows FPS and clock)

Tests

# Run all tests (180 tests, 588 assertions)
clojure -M:test

# Alternative test runners
clojure -M:runner     # Same as :test
clojure -M:kaocha     # Advanced kaocha features

Note: Tests follow standard Clojure naming convention with -test suffix for automatic discovery.

Features

  • Dynamic Canvas Scaling: Game automatically adapts to any screen size while maintaining aspect ratio
  • Responsive Design: All game elements scale proportionally with viewport
  • Modern UI: Clean, borderless interface with seamless page integration
  • Screen System: Title screen, instructions, and game over screens
  • Debug Mode: Optional FPS and clock display with ?debug query parameter
  • Comprehensive Testing: 176+ tests with 576+ assertions covering game mechanics

Game Controls

  • ENTER/SPACE: Swap blocks
  • Arrow keys: Move cursor
  • N: Restart the game
  • R: Force another row to be added

Browser Repl

# Connect to the shadow-cljs browser REPL
npx shadow-cljs browser-repl

# Or use the shadow-cljs UI
npx shadow-cljs cljs-repl app

Screenshots

Title Screen

Title Screen

Gameplay

Gameplay

Debug Mode (with FPS and Clock)

Debug Mode

Instructions Screen

Instructions

Game Over Screen

Game Over

Historical Videos

About

A clone of the game Tetris Attack in Clojurescript.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •