Skip to main content

A terminal-based block stacking game

Project description

Falliant

A terminal-based block stacking game inspired by classic block stacking games, written in Python using the curses library.

Falliant Screenshot

Features

  • Classic block-stacking gameplay
  • Multiple starting levels with increasing difficulty
  • Hold piece functionality
  • Next piece preview
  • Level progression system
  • High score tracking with player initials
  • Clean terminal UI with color support

Requirements

  • Python 3.6+
  • A terminal that supports curses and colors (most modern terminals do)

Installation

Option 1: Install from PyPI

pip install falliant

Option 2: Install from source

  1. Clone or download this repository
  2. Install directly:
# Install globally
pip install .

# Or install in user directory (no admin rights needed)
pip install --user .

Option 3: Development setup with virtual environment

  1. Clone or download this repository
  2. Set up a virtual environment and install:
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install in development mode
pip install -e .

How to Play

After installation, simply run:

falliant

If installed in development mode with a virtual environment, make sure the environment is activated before running the command.

Controls

  • ←, ↓, → or A, S, D: Move block left, down, or right
  • or W: Rotate block
  • Space: Drop block to bottom
  • C: Hold current block
  • P: Pause/resume game
  • Q: Quit to menu

Game Rules

  • Arrange falling blocks to create complete horizontal lines
  • Completed lines will disappear and award points
  • The game speeds up as you level up
  • Level increases every 10 lines cleared
  • The game ends when blocks stack up to the top of the board
  • If you achieve a high score, you can enter your three-letter initials

Scoring System

  • 1 line: 40 × level
  • 2 lines: 100 × level
  • 3 lines: 300 × level
  • 4 lines: 1200 × level (Falliant!)
  • Top 10 high scores are tracked and saved locally

Known Issues

  • Terminal resizing during gameplay may cause display issues
  • Some terminals might not display colors correctly

Troubleshooting

If you encounter display issues:

  1. Try running in a different terminal
  2. Make sure your terminal supports curses and colors
  3. Ensure your terminal is sized appropriately (at least 80×24)

Development

Contributing

To contribute to Falliant:

  1. Fork the repository
  2. Set up a virtual environment as described in the installation section
  3. Make your changes
  4. Submit a pull request

Publishing to PyPI

Falliant uses GitHub Actions for automated publishing to PyPI. When a new release is created on GitHub, the package is automatically built and published.

To create a new release manually:

  1. Update the version in pyproject.toml

  2. Build the package:

    python -m build
    
  3. Upload to PyPI:

    python -m twine upload dist/falliant-x.y.z*
    

Alternatively, use the GitHub Actions workflow:

  1. Create a new release on GitHub
  2. The GitHub Action will automatically build and publish the package

Automated Version Bumping

A GitHub workflow is available to bump versions automatically:

  1. Go to the Actions tab in the repository
  2. Select the "Bump Version" workflow
  3. Click "Run workflow"
  4. Choose the version type to bump (major, minor, patch)
  5. A pull request will be created with the version change

Project Structure

falliant/               # Project root
├── pyproject.toml      # Package configuration
├── README.md           # Documentation
├── LICENSE             # MIT License
├── MANIFEST.in         # Package manifest
├── .github/            # GitHub Actions workflows
├── falliant/           # Python package   ├── __init__.py     # Package initialization   ├── __main__.py     # Entry point   ├── block.py        # Block class   ├── constants.py    # Game constants   ├── game.py         # Game logic   ├── renderer.py     # Display functions   ├── ui.py           # User interface   └── images/         # Image assets

License

This game is provided under the MIT License. See the LICENSE file for details.


Created by: Henry Sowell

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

falliant-1.0.0.tar.gz (175.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

falliant-1.0.0-py3-none-any.whl (173.2 kB view details)

Uploaded Python 3

File details

Details for the file falliant-1.0.0.tar.gz.

File metadata

  • Download URL: falliant-1.0.0.tar.gz
  • Upload date:
  • Size: 175.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for falliant-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ddc1c232945bc4362e9197565b61fca6fd47cbca53d28722d33a7b0b167c02ca
MD5 7b47db7abe8187bca63c32b69172c4b4
BLAKE2b-256 42d497be0ff12fec77ee1b25e0d9687cf03325fa59cde7af1ce557f339d7adf3

See more details on using hashes here.

File details

Details for the file falliant-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: falliant-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 173.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for falliant-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 599fde148adc22382268ffd077321f23eb3a7e566e238059e59e6dea0e8961c1
MD5 1517eb5ee67dea72339e8a775b33ccc5
BLAKE2b-256 04c9bc7b09c16e6fa94eaf61284f7bf8d540a8e67e5c77bce2d3ff456c2818e4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page