Skip to content

About

Crack Attack! — free Panel de Pon / Tetris Attack / Puzzle League-style versus puzzle game: swap, chain, send garbage. Rust, WebGPU (wgpu), SDL3.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

Crack Attack!

Crack Attack! — Back From The Stack

Swap blocks, chain clears, bury your opponent under garbage.
The classic puzzle game, rewritten in Rust, with music that follows the pressure on your stack.
In the tradition of Nintendo's Panel de Pon, Tetris Attack and Pokémon Puzzle League.

Visit the website: learn to play, see the modes, download

Download Linux, Windows, macOS License: GPL-3.0-or-later

Main menu Solo game Versus the computer, garbage incoming

A fast puzzle game: swap blocks, line up three or more of the same color, chain clears together and bury your opponent under garbage. This is a Rust rewrite of Crack Attack! (Daniel R. Nelson, 2000–2006), with a WebGPU renderer and SDL3. During a game, the music adapts to the pressure on your stack.

  • Three ways to play: solo, versus the computer (three difficulty levels) and versus another player on your local network (automatic discovery or manual address), with a network ranking.
  • Keyboard and gamepad: fully navigable menus, rebindable controls.
  • Eleven languages: English, French, German, Spanish, Italian, Polish, Russian, Turkish, Simplified Chinese, Japanese and Korean (all but English and French are new in this beta: corrections are welcome).

Download

Ready-to-run packages for Windows, macOS and Linux are on the Releases page. A file named -installer guides you through the installation; a file named -portable needs none: unpack it anywhere and run it. Both contain the game and all its data. (Linux has no installer: the AppImage is a single file that runs as is.)

  • Windows — crackattack-<version>-windows-x86_64-installer.exe installs the game for your user (no administrator rights), with a Start menu entry and an uninstaller; or unpack crackattack-<version>-windows-x86_64-portable.zip and run crackattack.exe. Requires a graphics card and driver that support DirectX 12 or Vulkan. Windows SmartScreen may warn the first time, as the program is not signed: click More info, then Run anyway.

  • macOS — crackattack-<version>-macos-arm64-installer.dmg: open it and drag Crack Attack into Applications (or unpack the -portable.zip), or install it with Homebrew: brew install --cask thiosaur/tap/crackattack. Apple Silicon, macOS 11 or later. The application is not signed by Apple, so macOS blocks it the first time:

    • macOS 15 or later: open Crack Attack.app once, then go to System Settings → Privacy & Security and click Open Anyway;
    • macOS 14 or earlier: right-click (or Control-click) Crack Attack.app, choose Open, then confirm;
    • or, from a terminal (adjust the path if the app is elsewhere): xattr -dr com.apple.quarantine "/Applications/Crack Attack.app"

    Afterwards it opens normally.

  • Linux — crackattack-<version>-linux-x86_64.AppImage: make it executable (chmod +x, or in the file properties) and run it; or unpack crackattack-<version>-linux-x86_64-portable.tar.gz and run ./crackattack. Uses the usual desktop libraries (ALSA, X11 or Wayland) already present on most distributions.

To update, just download the new package: your settings, scores and network ranking live in your user folder, not in the package (see Your data).

How to play

  • Move the cursor with the arrow keys (gamepad: D-pad or left stick).
  • Swap the two blocks under the cursor with Space (gamepad: bottom face button, A / Cross).
  • Line up 3 or more blocks of the same color, horizontally or vertically, to clear them.
  • Clears that cascade make chains; several lines at once make combos. Both send garbage to your opponent.
  • Hold Enter (gamepad: left face button, X / Square) to raise the stack faster.
  • If the stack reaches the top, you lose.

P (gamepad: Start) pauses, Escape goes back, F12 saves a screenshot. All gameplay controls can be changed in Options → Keyboard and Options → Gamepad.

Network play

VS Network finds other players on the same local network automatically (mDNS) and lets you invite them; you can also connect to an address directly. The game listens on TCP port 45678 (or the next free one): allow it in your firewall if invitations do not arrive. Both players need compatible versions; the game tells you if they are not.

Update check

Packages downloaded from the Releases page check once a day whether a newer version has been published. The check is a single HTTPS request to the GitHub API (api.github.com/repos/…/releases/latest) sent with the user agent crackattack/<version>; only the version number in the reply is used. Nothing is ever downloaded or installed: when a newer version exists, a line in the menu links to the download page.

  • About → Updates (the ⓘ entry of the main menu) shows the installed version and the result of the last check; Check now checks on demand, and unticking Check for updates turns the daily check off.
  • Builds from source, and packages made by distributions or stores, do not check at all.

Your data

Settings, scores and controls are stored in state.json, the network ranking in ladder.json, and the log of the last two sessions in crackattack.log (send it when you report a problem). They are in:

System Folder
Linux ~/.config/crack-attack/
macOS ~/Library/Application Support/crack-attack/
Windows %APPDATA%\crack-attack\

Building from source

Requirements: Rust through rustup (it installs the compiler version pinned in rust-toolchain.toml; the minimum supported version is 1.85), CMake and a C compiler (SDL3 is built from source and linked statically).

  • macOS — Xcode Command Line Tools (xcode-select --install) and CMake (brew install cmake).
  • Windows — Visual Studio Build Tools (MSVC) and CMake.
  • Linux (Debian/Ubuntu) — sudo apt install cmake build-essential pkg-config libasound2-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libxtst-dev libxkbcommon-dev libwayland-dev wayland-protocols libdecor-0-dev libegl1-mesa-dev libgles2-mesa-dev libdrm-dev libgbm-dev libdbus-1-dev libudev-dev
cargo run --release -p crackattack-webgpu

Run it from the repository root (or next to an assets/ folder) so that the game finds its data. cargo test --workspace runs the test suite. To build without the update check: cargo build --release -p crackattack-webgpu --no-default-features --features native.

Terminal version

The workspace also contains crackattack-terminal, a small text version of the game that runs in any terminal with ANSI colors and UTF-8 symbols. Each release has it as a separate, tiny download (one executable, no game data, no installer): crackattack-terminal-<version>-windows-x86_64.zip, -macos-arm64.zip or -linux-x86_64.tar.gz, on the Releases page. Unpack it and run crackattack-terminal from a terminal. On macOS, the first run is blocked like the application: run xattr -d com.apple.quarantine crackattack-terminal once. It can also be built from source (see above, no graphics libraries needed):

cargo run --release -p crackattack-terminal

The terminal version: a game in progress

It runs the same game engine as the graphical version (same rules, same 50 Hz tick). The board is drawn with 256 colors and Unicode block characters: the stack rises by half a row at a time (--smooth moves it by sixteenths, smoother but the gaps between blocks may flicker), and the danger bars of the final countdown are there too. A menu offers a solo game, a duel against the computer at its three levels (Logic, Sigma, Cortex), or a duel against another player (see below); --solo and --vs [--difficulty easy|medium|hard] skip it. In a duel, the opponent's board is shown beside yours. There is no sound. The screen is drawn in the middle of the terminal, which must support 256 colors and UTF-8 and be at least 80 columns by 24 lines (80x28 or more for the full-size screen).

Key Action
Arrow keys or WASD Move the cursor
Space Swap the two blocks under the cursor
Enter Raise the stack faster
P Pause / resume
Q or Escape Quit

Each game deals a new board; a summary with the seed is printed when the game ends, and --seed N (or -s N) replays the same one. Other options: --max-frames N (or -f N) stops after N frames, --debug shows the state of the cells under the cursor, and --autoplay lets the computer play (--autoplay-ai easy|medium|hard sets its level, and --vs with --difficulty plays against it) (with --headless, --capture and --capture-file it writes text captures of the screen, handy for tests). To serve the game to someone else, for example behind an ssh login, --idle-timeout SECS and --max-time SECS end a session that is idle or too long; a dropped connection ends the game by itself. --lobby DIR (Linux and macOS) gives each game of a server a pseudo and shows how many players are connected in the menu, and who they are and what they are doing beside the board: DIR is a folder shared by all the games of the server. The menu then offers Vs player: you wait there, visible to the other players on the page, and see the ones who wait too (the list scrolls when it is longer than the screen); pick one and the duel starts (the two games talk over 127.0.0.1, with the network code of the graphical game). Without --lobby, the game looks for the players of the local network by itself (mDNS, as the graphical game does) and offers the same Vs player; a game listens only while it waits on that page. --no-lan turns this off. A duel can also be started from the command line, as in the graphical game, which it plays against: --vs network-create [PORT] listens (port 45678 by default) and waits to be invited, --vs network-join IP [PORT] invites the game at that address (a host name works too; --preset net-host and --preset net-join are the graphical game's shorthand for the same two; --vs-computer, --open flow:… and --set ID=VALUE also work for the few screens and settings that exist in a terminal), and --name PSEUDO chooses your pseudo (letters, digits, ., _, -, up to 16). A static Linux build (-linux-x86_64-static.tar.gz) runs on any distribution and in a minimal container, and each release carries a SHA256SUMS file. --help lists the options. The terminal is restored when the game ends or quits.

It can also be served over ssh, for example on a homelab, so that friends play with a plain ssh and nothing to install: see crackattack-terminal-ssh, a Docker image that starts the game at login.

Feedback

Found a bug? Open an issue. Feedback, questions, ideas or memories of the original game are welcome in Discussions.

Credits

  • The original Crack Attack! (2000–2006): created by Daniel R. Nelson (@AluminumAngel); developed and maintained by R. Andrew Sayman (@gnu-lorien), with Kevin Webb. Its C++ source code is at gnu-lorien/crack-attack. The full list of copyright holders is in AUTHORS.
  • This edition — Back From The Stack: Rust / WebGPU rewrite (2.x) by Thiosaur.
  • The strategy of the computer opponent on the grid is ported from the bot of crack-attack-web by Misha Nasledov (@mishan), GPL-2.0-or-later; see AUTHORS.
  • Images, sound effects, music and fonts: origin and license of every file in crackattack-webgpu/assets/CREDITS.md. The music is based on "Les Crapauds" (Victor Meusy, 1897, public domain).
  • Libraries: wgpu, SDL3, egui, rodio and the other crates listed in Cargo.lock. Their licenses are collected in THIRD-PARTY-LICENSES.html, shipped with every release.

License

Crack Attack! is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. See LICENSE.

The original Crack Attack! 1.1.14 is licensed under the GPL version 2 or later, which allows this derivative work to use version 3. The source code of each release is the tagged commit of this repository, with its Cargo.lock.

About

Crack Attack! — free Panel de Pon / Tetris Attack / Puzzle League-style versus puzzle game: swap, chain, send garbage. Rust, WebGPU (wgpu), SDL3.

Topics

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages