Skip to content

A project where a 2D game was developed using the Pygame library. Pygame is a Python game library that provides access to video and sound hardware, as well as resources for creating 2D games.

Notifications You must be signed in to change notification settings

Robso-creator/infinity_jump

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Infinity Jump

This is a simple game developed using Pycharm, which is a mix of functional and object-oriented programming paradigms. In this game, the user has to dodge obstacles indefinitely and accumulate points.

Game Overview

The game involves a player who is moving along a horizontal axis, and the obstacles appear randomly from the right of the screen. The player must avoid the obstacles by pressing space or up and the player earns one point while the clock is running. If the player collides with an obstacle, the game is over. game_main_picture.png

Functional Programming

The game's logic is implemented using functional programming concepts, such as pure functions and higher-order functions. Pure functions are used to calculate the position of the player and obstacles, while higher-order functions are used to create and manage the game's state.

Object-Oriented Programming

The game's graphics and user interface are implemented using object-oriented programming concepts. The game's elements, such as the player and obstacles, are represented as objects that interact with each other. The user interface is created using Pygame, which is a popular Python library for game development.

Installation

To run the game, you need to install Pycharm and Pygame library. Follow these steps to install Pycharm:

  • Download the Pycharm Community Edition from the official website.
  • Install Pycharm on your system.
  • Clone this repository or download the zip file.
  • Open the project in Pycharm.
  • Install Pygame library by running the command pip install pygame in the Pycharm terminal.

Running the Game

To run the game, follow these steps:

  • Open the project in Pycharm.
  • Navigate to the main.py file and run it.
  • The game will start, and you can use up arrow or space to jump.
  • Dodge the obstacles to earn points and try to beat your high score.

Conclusion

This game is a simple example of how functional and object-oriented programming can be used together to create a fun and engaging game. You can modify the game's logic and graphics to make it your own and even add more features to enhance the gameplay. The code is well-commented and documented, which helps with understanding and learning for those interested in studying the project. The project was developed following the step-by-step instructions of the video from the ClearCode channel.

Summary

In summary, the repository is a complete and well-organized project of a 2D game in Python, using the Pygame library, which can be used as a basis for other games or as a reference for programming students interested in games in Python.

About

A project where a 2D game was developed using the Pygame library. Pygame is a Python game library that provides access to video and sound hardware, as well as resources for creating 2D games.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages