Skip to content
Its-Arjun-innitPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

Polybius

A space-themed obstacle dodger game with procedurally generated levels, power-ups, and increasing difficulty built with Python and Kivy.

Description

Polybius is an action-packed arcade game where you control a spaceship and try to dodge obstacles while collecting power-ups. The game features:

  • Procedurally generated endless levels
  • Various types of obstacles (basic, moving, shooting)
  • Multiple power-ups (shield, invincibility, score multiplier, dash)
  • Increasing difficulty over time
  • Particle effects and visual feedback
  • High score tracking

Controls

  • Left/Right Arrow Keys or A/D: Move the ship left/right
  • Space: Dash forward (when available)
  • Escape: Return to menu

Power-ups

  • Shield (Blue): Absorbs one hit from obstacles
  • Invincibility (Yellow): Makes you temporarily invulnerable
  • Score Multiplier (Orange): Doubles your score for a limited time
  • Dash: Allows you to quickly dash forward

Technical Details

  • Built with Python and Kivy framework
  • Object-oriented design with separate components for:
    • Player mechanics
    • Obstacle generation and management
    • Power-up system
    • Level generation
    • Particle effects
    • Score tracking
  • Custom graphics and animations

Running the Game

To run the game:

python main.py

Note about Replit VNC

The game is fully implemented using Kivy and works well on local machines. However, running the Kivy GUI in Replit's VNC environment may cause rendering issues due to OpenGL compatibility constraints. If you encounter such issues, try running the game locally on your machine where Kivy's GUI capabilities can be fully utilized.

Current configuration:

  • Python 3.11.10
  • Kivy 2.3.1
  • 6 SVG asset files

Troubleshooting X11 Errors on Windows

If you see this error when running the game:

sdl2 - RuntimeError: b'x11 not available'

Try these solutions:

  1. Use the config.ini file:

    • The game now includes a config.ini file that configures Kivy to work on different platforms
    • On Windows, this file should automatically use the proper backend
  2. Try different GL backends:

    • Edit the config.ini file and modify the [win] section
    • Try changing gl_backend = angle_sdl2 to other options like gl_backend = glew
  3. Automatic fallback:

    • The game now includes an automatic fallback mechanism that will attempt to run with different configurations if the first attempt fails
    • Check the terminal output for diagnostics

Dependencies

  • Python 3.6+
  • Kivy 2.1.0+

File Structure

  • main.py - Entry point for the game
  • game/ - Core game components
    • player.py - Player ship logic
    • obstacles.py - Obstacle system
    • powerups.py - Power-up handling
    • level_generator.py - Procedural level generation
    • particles.py - Visual effects system
  • screens/ - Game screens
    • menu_screen.py - Main menu
    • game_screen.py - Gameplay screen
    • options_screen.py - Settings/options
    • game_over_screen.py - Game over screen
  • utils/ - Helper modules
    • score_manager.py - High score handling
    • settings.py - Game settings
  • assets/ - Game assets (SVG graphics)
  • space_dodger.kv - Kivy UI definitions

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages