A space-themed obstacle dodger game with procedurally generated levels, power-ups, and increasing difficulty built with Python and Kivy.
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
- Left/Right Arrow Keys or A/D: Move the ship left/right
- Space: Dash forward (when available)
- Escape: Return to menu
- 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
- 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
To run the game:
python main.py
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
If you see this error when running the game:
sdl2 - RuntimeError: b'x11 not available'
Try these solutions:
-
Use the config.ini file:
- The game now includes a
config.inifile that configures Kivy to work on different platforms - On Windows, this file should automatically use the proper backend
- The game now includes a
-
Try different GL backends:
- Edit the
config.inifile and modify the[win]section - Try changing
gl_backend = angle_sdl2to other options likegl_backend = glew
- Edit the
-
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
- Python 3.6+
- Kivy 2.1.0+
main.py- Entry point for the gamegame/- Core game componentsplayer.py- Player ship logicobstacles.py- Obstacle systempowerups.py- Power-up handlinglevel_generator.py- Procedural level generationparticles.py- Visual effects system
screens/- Game screensmenu_screen.py- Main menugame_screen.py- Gameplay screenoptions_screen.py- Settings/optionsgame_over_screen.py- Game over screen
utils/- Helper modulesscore_manager.py- High score handlingsettings.py- Game settings
assets/- Game assets (SVG graphics)space_dodger.kv- Kivy UI definitions