GithubHelp home page GithubHelp logo

1-pong-23's Introduction

Name: pong.py

Description: My simple implementation of classic Pong.

Author:

Usage:

  1. Clone repository: git clone https://github.com/jerryrelmore/1-pong-23.git
  2. cd 1-pong-23/src
  3. Either setup a virtual env or install requirements as a system package, e.g.: pip3 install -r ../requirements.txt
  4. Execute: python3 pong.py
  5. Player 1 uses w and s to move up or down, respectively.
  6. Player 2 uses UP and DOWN arrows for the same.
  7. Press r to restart the game at any time.
  8. Press q or ESC to quit.
  9. First player to 11 points wins. Enjoy!

#TODO:

  1. Implement Game Over screen.
  2. Implement ability to restart during the game.
  3. End game when first player scores 11 points.
  4. Add jingle for winner.
  5. Add slight pause before ball moves after restart (maybe leverage self._first_run bool?).
  6. Add ability to pass in preferred screen size as CLI arg.
  7. ???
  8. Code clean-up

#BUGFIX:

  1. If upper-left pixel of ball has a lower value than upper left pixel of the paddle, a collision isn't detected.
  2. Ball can get "stuck" on paddle and bounce quickly back and forth then end up going behind the capturing paddle. NOTE: May actually consider this a feature, not a bug.

Gameplay screenshot: Gameplay Screenshot

1-pong-23's People

Contributors

jerryrelmore avatar

Watchers

James Cloos avatar  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.