A block-placing puzzle game on an 8×8 grid, with a twist: every piece contains at least one ghost block that can overlap cells that are already filled.
This repo is a single-file clone of the Block Blast puzzle genre, written in Python with Pygame. You drag pieces from a tray onto an 8×8 board and fill complete rows or columns to clear them and score points. You get three pieces at a time, and the game ends when none of them fit.
The twist is the ghost block. Every piece has at least one, shown in green with a hatch pattern. Normal cells need empty space, but ghost cells may land on top of filled cells, so you can squeeze pieces into spots that would otherwise be impossible.
An example piece: two normal cells and one ghost cell in the middle.
Singles, dominoes, triominoes, tetrominoes and pentominoes, each with a ghost cell.
Click a piece to pick it up, move over the grid, click again to place it.
A translucent preview shows where the piece will land, and only appears when the spot is valid.
Clearing several lines at once earns a bonus on top of the base points.
Your best score is stored locally in a small JSON file.
Cleared lines flash white before disappearing.
| Input | Action |
|---|---|
| Left click on a tray piece | Pick it up |
| Left click on the grid | Place the held piece (if the preview is shown) |
| Right click | Cancel and put the piece back |
| Any key (start screen) | Start the game |
R / Q or Esc (game over) | Restart / quit |
You need Python 3 and Pygame.
pip install pygame
python block_blast_ghost.py
Replace the filename with the name of the Python file in this repo. A block_blast_highscore.json file is created next to the game the first time you score.
Everything lives in the repo root.
| File | Purpose |
|---|---|
block_blast_ghost.py | The whole game: shapes, rules, drawing and main loop |
block_blast_highscore.json | Local high score, generated at runtime |
index.html | This page |
Inside the code: the SHAPES list defines pieces, Piece holds a shape and color, can_place and place_piece implement the ghost rules, and main() runs the game loop.