Giter Site home page Giter Site logo

lioil987 / cube_game Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 6.14 MB

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

License: MIT License

Python 100.00%
cube-runner game games pygame pygame-games pygame-library python-game python-games

cube_game's Introduction

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

cube_game's People

Contributors

lioil987 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.