Skip to content

Anastasiy26/proekt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyGame Breakout

This is a simple implementation with Python 3 and PyGame of the classic Breakout game. The purpose is to serve as a demo game for a series of articles on building games with Python 3 and PyGame:

Features

  • Simple generic GameObject and TextObject
  • Simple generic Game object
  • Simple generic button
  • Config file
  • Handling keyboard and mouse events
  • Bricks, paddle and ball
  • Managing paddle movement
  • Handling collisions of the ball with everything
  • Background image
  • Sound effects
  • Extensible special effects system

Installation and usage

The prerequisites are:

Then clone the repository and type:

pipenv install

You should see something like:

$ pipenv install
Creating a virtualenv for this project…
Pipfile: /Users/gigi.sayfan/git/pygame-breakout/Pipfile
Using /Users/gigi.sayfan/.pyenv/versions/3.8.0/bin/python3 (3.8.0) to create virtualenv…
⠙ Creating virtual environment...Using base prefix '/Users/gigi.sayfan/.pyenv/versions/3.8.0'
New python executable in /Users/gigi.sayfan/.local/share/virtualenvs/pygame-breakout-mgkKDQCD/bin/python3
Also creating executable in /Users/gigi.sayfan/.local/share/virtualenvs/pygame-breakout-mgkKDQCD/bin/python
Installing setuptools, pip, wheel...
done.
Running virtualenv with interpreter /Users/gigi.sayfan/.pyenv/versions/3.8.0/bin/python3

✔ Successfully created virtual environment!
Virtualenv location: /Users/gigi.sayfan/.local/share/virtualenvs/pygame-breakout-mgkKDQCD
Installing dependencies from Pipfile.lock (b269cc)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:08
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

To run the game type:

pipenv run python breakout.py

Credits

I used some color constants I found in this nice article: https://www.webucator.com/blog/2015/03/python-color-constants-module/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages