Skip to content

codeforgood-org/godot-falling-blocks

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

5 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Falling Blocks

Falling Blocks Icon

A simple yet addictive falling blocks arcade game built with Godot 4

Dodge the falling blocks, survive as long as you can, and beat your high score!

Godot Engine License: MIT

๐ŸŽฎ About

Falling Blocks is a classic arcade-style game where you control a blue square trying to avoid an endless stream of red falling blocks. The game progressively gets harder as you survive longer, with blocks falling faster and spawning more frequently.

Features

Core Gameplay

  • โœจ Simple but engaging gameplay - Easy to learn, hard to master
  • ๐Ÿ“ˆ Progressive difficulty - Game gets harder the longer you survive (4 difficulty presets)
  • ๐Ÿ† Advanced scoring system - Score multipliers and combo bonuses
  • โฑ๏ธ Survival timer - Track how long you've lasted
  • ๐ŸŽจ Clean, minimalist design - Focus on pure gameplay
  • ๐Ÿ’พ Persistent data - High scores, achievements, and statistics saved automatically
  • โธ๏ธ Pause functionality - Take a break when needed
  • ๐Ÿ”„ Quick restart - Jump back in instantly after game over

Power-Up System

  • ๐Ÿ›ก๏ธ Shield - Temporary invincibility (Cyan)
  • โฐ Slow Motion - Slows falling blocks (Yellow)
  • ๐Ÿ’ฐ 2x Score Multiplier - Double your points (Gold)
  • ๐Ÿ“ Shrink - Reduces player size for easier dodging (Magenta)

Combo & Progression

  • ๐Ÿ”ฅ Combo system - Build combos for massive score multipliers
  • ๐Ÿ“Š Dynamic multipliers - Up to 10x multiplier at 100+ combo
  • ๐ŸŽฏ Skill-based scoring - Rewards consistent dodging

Achievements & Statistics

  • ๐Ÿ… 17 Achievements - Unlock milestones as you play
  • ๐Ÿ“ˆ Lifetime statistics - Track total games, time played, best scores
  • ๐Ÿ“Š Per-game stats - See your performance after each run

Customization & Settings

  • โš™๏ธ Settings menu - Adjust music/SFX volume, fullscreen, difficulty
  • ๐ŸŽต Audio system - Sound effects and music support
  • ๐Ÿ–ฅ๏ธ Debug mode - Press F3 for performance overlay

Polish & Feel

  • ๐Ÿ’ฅ Screen shake - Impact feedback on collisions
  • โœจ Visual effects - Particle systems and animations
  • ๐ŸŽฎ Game feel - Polished with smooth animations and responsive controls

๐ŸŽฏ How to Play

Controls

Action Keys
Move Left โ† Arrow or A
Move Right โ†’ Arrow or D
Pause P or ESC
Restart R (after game over)
Start Game Space or Enter
Debug Overlay F3
Help Screen H (from menu)
Achievements A (from menu)
Statistics S (from menu)
Settings O (from menu)

Objective

  • Dodge falling red blocks by moving left and right
  • Survive as long as possible to increase your score
  • Each block that passes you safely awards points
  • Build combos by dodging consecutive blocks for score multipliers
  • Collect power-ups (colored squares) for temporary abilities
  • Avoid collisions - hitting a block ends the game (unless you have a shield!)
  • The game gets progressively harder with:
    • Faster falling blocks
    • More frequent spawns
    • Higher difficulty levels every 10 seconds
    • Adjustable difficulty presets (Easy, Normal, Hard, Extreme)

๐Ÿš€ Getting Started

Prerequisites

Installation

  1. Clone the repository

    git clone https://github.com/codeforgood-org/godot-falling-blocks.git
    cd godot-falling-blocks
  2. Open in Godot

    • Launch Godot Engine
    • Click "Import"
    • Navigate to the cloned directory
    • Select the project.godot file
    • Click "Import & Edit"
  3. Run the game

    • Press F5 or click the "Run Project" button in Godot
    • Alternatively, run from command line:
      godot --path . scenes/main/main.tscn

Building for Distribution

Desktop (Windows, Linux, macOS)

  1. Open the project in Godot
  2. Go to Project โ†’ Export
  3. Add export presets for your target platforms
  4. Click "Export All" or export individually

Web (HTML5)

  1. Go to Project โ†’ Export
  2. Add an HTML5 export preset
  3. Export to a directory
  4. Host the exported files on a web server

๐Ÿ“ Project Structure

godot-falling-blocks/
โ”œโ”€โ”€ assets/              # Game assets
โ”‚   โ”œโ”€โ”€ fonts/          # Font files
โ”‚   โ”œโ”€โ”€ sounds/         # Audio files (SFX, music)
โ”‚   โ”œโ”€โ”€ sprites/        # Image and sprite files
โ”‚   โ””โ”€โ”€ themes/         # UI themes
โ”œโ”€โ”€ scenes/             # Godot scene files
โ”‚   โ”œโ”€โ”€ block/         # Falling block scene
โ”‚   โ”œโ”€โ”€ effects/       # Visual effects (particles)
โ”‚   โ”œโ”€โ”€ main/          # Main game scene
โ”‚   โ”œโ”€โ”€ player/        # Player character scene
โ”‚   โ””โ”€โ”€ ui/            # UI scenes (menus, HUD)
โ”œโ”€โ”€ scripts/           # GDScript files
โ”‚   โ”œโ”€โ”€ block.gd
โ”‚   โ”œโ”€โ”€ collision_particles.gd
โ”‚   โ”œโ”€โ”€ game_manager.gd
โ”‚   โ”œโ”€โ”€ game_over_screen.gd
โ”‚   โ”œโ”€โ”€ hud.gd
โ”‚   โ”œโ”€โ”€ main.gd
โ”‚   โ”œโ”€โ”€ pause_menu.gd
โ”‚   โ”œโ”€โ”€ player.gd
โ”‚   โ””โ”€โ”€ start_menu.gd
โ”œโ”€โ”€ .editorconfig      # Code style configuration
โ”œโ”€โ”€ .gitignore         # Git ignore rules
โ”œโ”€โ”€ CHANGELOG.md       # Version history
โ”œโ”€โ”€ CONTRIBUTING.md    # Contribution guidelines
โ”œโ”€โ”€ icon.svg           # Project icon
โ”œโ”€โ”€ LICENSE            # MIT License
โ”œโ”€โ”€ project.godot      # Godot project configuration
โ””โ”€โ”€ README.md          # This file

๐ŸŽจ Game Architecture

Core Systems

  1. Main Game Controller (main.gd)

    • Manages game state (menu, playing, game over, paused)
    • Handles spawning and difficulty scaling
    • Coordinates between all systems
  2. Player System (player.gd)

    • Input handling
    • Movement and boundary constraints
    • Collision detection
  3. Block System (block.gd)

    • Falling behavior
    • Difficulty scaling
    • Auto-cleanup when off-screen
  4. UI System

    • Start menu with instructions
    • HUD showing score, time, level
    • Game over screen with stats
    • Pause overlay
  5. Score & Difficulty

    • Points awarded for dodging blocks
    • Difficulty increases every 10 seconds
    • Progressive speed and spawn rate scaling
    • Persistent high score tracking

๐Ÿ› ๏ธ Development

Coding Standards

This project follows the Godot GDScript style guide.

Key conventions:

  • Use snake_case for functions and variables
  • Use PascalCase for class names
  • Document functions with docstrings
  • Keep functions small and focused
  • Use type hints where possible

Adding New Features

  1. Create a new branch for your feature
  2. Implement your changes following the coding standards
  3. Test thoroughly in the Godot editor
  4. Submit a pull request with a clear description

See CONTRIBUTING.md for detailed guidelines.

๐Ÿ› Known Issues & Future Improvements

Planned Features

  • Sound effects and background music
  • Power-ups (slow motion, shield, etc.)
  • Different block types and patterns
  • Visual effects and screen shake
  • Leaderboard system
  • Multiple difficulty modes
  • Custom skins and themes
  • Mobile touch controls
  • Gamepad support

Known Issues

  • None currently reported

Found a bug? Please open an issue!

๐Ÿ“Š Performance

  • Target FPS: 60
  • Minimum System Requirements:
    • OS: Windows 7+, macOS 10.12+, Linux (any modern distro)
    • RAM: 1 GB
    • Graphics: OpenGL 3.3 compatible

๐Ÿค Contributing

Contributions are welcome! Whether it's:

  • ๐Ÿ› Bug fixes
  • โœจ New features
  • ๐Ÿ“ Documentation improvements
  • ๐ŸŽจ Art and audio assets
  • ๐ŸŒ Translations

Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.

๐Ÿ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ‘ Acknowledgments

๐Ÿ“ง Contact


Made with โค๏ธ using Godot Engine

Play Now โ€ข Report Bug โ€ข Request Feature

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •