A downloadable game

Download NowName your own price

Bevy Platformer Game

A feature-rich 2D platformer game built with Bevy Engine in Rust. Generated by AI with only prompt interaction. So I should say I've "Devrompt" this myself! :)

๐ŸŽฎ Latest Features (v2.0)

  • ๐Ÿ”Š Real Audio System: Jump, collect, and death sound effects with WAV files
  • ๐ŸŽ Fruit Collection: Collect orange fruits to advance levels
  • โค๏ธ Lives System: 3 lives with visual counter
  • ๐Ÿ“Š Level Progression: Level counter increases when collecting fruit
  • ๐ŸŽฒ Smart Random Generation: Platforms generate with intelligent spacing rules
  • ๐ŸŽฏ Platform-Based Fruit Placement: Fruits always spawn on top of platforms
  • ๐Ÿš€ Enhanced Movement: Air control and higher jumping capabilities

Prerequisites

You need to have Rust installed on your system. If you don't have Rust installed:

  1. Install Rust: Go to https://rustup.rs/ and follow the installation instructions for Windows
    • Download and run rustup-init.exe
    • Follow the on-screen instructions
    • Restart your terminal/PowerShell after installation
  2. Verify Installation: After installation, verify Rust is working:
    rustc --version
    cargo --version

How to Run

  1. Clone or navigate to the project directory:
    cd c:\Git\RustBevy
  2. Build and run the game:
    cargo run

    The first build may take several minutes as it downloads and compiles dependencies.

๐ŸŽฎ Game Controls

  • Move Left: โ† Arrow Key or A
  • Move Right: โ†’ Arrow Key or D
  • Jump: Space, โ†‘ Arrow Key, or W

๐ŸŽฏ Game Objective

  • Collect Fruits: Find and collect the orange fruit on each level
  • Survive: Avoid falling off the screen (you have 3 lives)
  • Progress: Each fruit collected advances you to the next level with new random platforms

โœจ Game Features

Visual Elements

  • Player Character: Blue square (50x50) with smooth movement
  • Dynamic Platforms: Gray platforms with intelligent random generation
  • Collectible Fruits: Orange fruits that spawn on platforms
  • UI Display: Lives and level counters in bright colors
  • Game Title: "BEVY PLATFORMER" displayed at the top

Audio System ๐Ÿ”Š

  • Jump Sound: 440Hz beep (0.2 seconds) when jumping
  • Collect Sound: 880Hz beep (0.3 seconds) when collecting fruit
  • Death Sound: 220Hz beep (0.5 seconds) when losing a life
  • Real WAV Files: Generated procedurally and played through Bevy's audio system

Game Mechanics

  • Lives System: Start with 3 lives, lose one when falling off screen
  • Level Progression: Collect fruit to advance levels (infinite progression)
  • Smart Platform Generation: Platforms placed with minimum distance rules
  • Physics: Realistic gravity, collision detection, and air control
  • Boundary System: Player stays within window bounds

๐Ÿ› ๏ธ Technical Details

Core Technology

  • Engine: Bevy 0.14 (ECS architecture)
  • Language: Rust 2021 Edition
  • Platform: Cross-platform (Windows, macOS, Linux)
  • Graphics: 2D sprites with SpriteBundle rendering
  • Audio: WAV file support with Bevy's audio system

Project Structure

  • Components: Player, Platform, Fruit, Velocity, Grounded, GameState
  • Systems: Movement, physics, collision detection, UI updates, audio playback
  • Resources: GameState (lives/level), GameAudio (sound handles)
  • Events: PlaySoundEvent for audio triggering

Audio Assets

  • Generated Sounds: 3 WAV files created with Python script
  • File Locations: assets/jump.wav, assets/collect.wav, assets/death.wav
  • Audio Format: 16-bit mono WAV at 44.1kHz sample rate

โš™๏ธ Customization

You can easily modify the game by changing constants in src/main.rs:

Movement & Physics

  • PLAYER_SPEED: Horizontal movement speed (default: 300.0)
  • JUMP_SPEED: Jump height/velocity (default: 700.0)
  • GRAVITY: Downward acceleration (default: 2000.0)
  • AIR_CONTROL: Air movement control factor (default: 1.0)

Display & Layout

  • WINDOW_WIDTH / WINDOW_HEIGHT: Game window dimensions (1200x800)

Platform Generation

  • MIN_PLATFORM_DISTANCE: Minimum space between platforms (80.0)
  • MIN_GAP_FOR_PLAYER: Minimum gap for player movement (80.0)
  • MIN_VERTICAL_GAP: Minimum vertical space for jumping (60.0)

Audio Settings

  • Modify sound frequencies and durations in generate_simple_sounds.py
  • Adjust volume levels in the play_sounds system

๐Ÿš€ Future Enhancement Ideas

This robust foundation can be extended with:

Graphics & Animation

  • Sprite Sheets: Replace rectangles with animated character sprites
  • Particle Effects: Add visual effects for jumps, collections, deaths
  • Background Graphics: Parallax scrolling backgrounds
  • Platform Variety: Different platform types with unique properties

Audio Enhancements

  • Background Music: Looping soundtrack with different themes per level
  • Enhanced Sound Effects: More realistic audio with reverb and effects
  • Audio Settings: Volume controls and sound on/off options

Gameplay Features

  • Enemies: Moving obstacles and hazards to avoid
  • Power-ups: Temporary abilities like double jump or invincibility
  • Timer Challenges: Speed run modes with best time tracking
  • Checkpoint System: Save progress within longer levels

Game States & UI

  • Main Menu: Start screen with options and high scores
  • Pause System: Pause/resume functionality
  • Game Over Screen: Retry options and statistics
  • Settings Menu: Graphics and audio configuration

Advanced Features

  • Multiplayer: Local co-op or competitive modes
  • Level Editor: Create and share custom levels
  • Achievement System: Unlock rewards for various accomplishments
  • Mobile Support: Touch controls for mobile platforms

๐Ÿ“ Development Journey

Implemented Features Timeline

  1. Basic Platformer: Player movement, platforms, physics
  2. Enhanced Movement: Air control, higher jumps, boundary constraints
  3. Fruit Collection: Random fruit placement and collection mechanics
  4. Lives & Levels: Game state management with UI display
  5. Smart Generation: Intelligent platform spacing algorithms
  6. Platform-Based Fruits: Fruits spawn only on platforms, not in air
  7. Real Audio System: WAV file generation and AudioBundle integration

Development Philosophy

  • AI-Assisted Development: All features implemented through prompt-driven AI assistance ("Devrompt")
  • ECS Architecture: Leverages Bevy's Entity Component System for clean, modular code
  • Iterative Enhancement: Each feature built upon previous foundations
  • Real-World Polish: Includes audio, UI, and quality-of-life improvements

Technical Achievements

  • Procedural Audio: Python script generates WAV files with sine waves
  • Smart Algorithms: Platform spacing ensures playable level generation
  • Event-Driven Audio: Decoupled sound system using Bevy events
  • Git Integration: Full version control with meaningful commit history

Download

Download NowName your own price

Click download now to get access to the following files:

bevy_platformer_v2.1_release.zip 9.9 MB

Leave a comment

Log in with itch.io to leave a comment.