Skip to content

This Python script (cube_game.py) uses the Pygame library to create a simple cube runner game

License

Notifications You must be signed in to change notification settings

lioil987/cube_game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pygame Cube Runner Game

This Python script (cube_game.py) uses the Pygame library to create a simple cube runner game. The player controls a cube character that must navigate through obstacles while collecting points.

Game Preview

Features

  • Infinite Runner: The game has an endless scrolling environment with randomly generated obstacles.
  • Player Controls: Use the arrow keys to control the cube character (up, down, left, right).
  • Obstacle Generation: Obstacles are randomly generated with varying sizes, colors, and speeds.
  • Scoring System: The player scores points for successfully navigating through obstacles. The game keeps track of the player's score.

Getting Started

  1. Install Dependencies:

    • Make sure you have Python installed on your machine.
    • Install the Pygame library and colour using the following commands:
      pip install pygame
      pip install colour
  2. Run the Game:

    • Execute the script using the following command:
      python cube_game.py
  3. Game Controls:

    • Use the arrow keys to control the cube character:
      • UP: Move Up
      • DOWN: Move Down
      • LEFT: Move Left
      • RIGHT: Move Right

Game Over and Restart

  • The game ends when the cube collides with an obstacle.
  • After a game over, you can restart the game by following the on-screen instructions.

Customize the Game

  • You can customize various aspects of the game, such as the number of obstacles, obstacle properties (size, speed, color), and more by modifying the cube_game.py script.

Contributing

If you have suggestions or find issues with the game, feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License

About

This Python script (cube_game.py) uses the Pygame library to create a simple cube runner game

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages