Giter Site home page Giter Site logo

pong's Introduction

Pong

Screenshot

A simple pong game created in C++ with ncurses.

Status

Build Status

Usage

In the root directory use make or make build to compile the program. This will create a ./pong executable in the root directory of the project.

  • To run the program, use either make run or ./pong on the root directory of the project.
  • To remove the program, use make clean or just rm ./pong.
  • If you feel like doing a manual compile. You can use g++ src/main.cpp src/Player.cpp src/Ball.cpp -lncurses -o pong.

You may need to install ncurses depending on what kind of system you're using.

  • To install ncurses on a Debian based machine use sudo apt-get install libncurses5-dev libncursesw5-dev.
  • To install ncurses on OS X use brew install homebrew/dupes/ncurses. Of course, this will require brew to install.

Controls

Player 1
  • W - Move up
  • S - Move down
  • A - Move left
  • D - Move right
Player 2
  • UP KEY - Move up
  • DOWN KEY - Move down
  • LEFT KEY - Move left
  • RIGHT KEY - Move right

To serve the ball, use the SPACE button. It's the same for both players.

Troubleshooting

I'm saving this section for later, trust me. Something's gonna come up and I just want to be prepared.

If you have an issue with compiling or have found a bug in the game. Take a look in the Issues section to see if the problem has been solved already. If it's not, feel free to add the issue. If it's big, it'll be posted in this troubleshooting section to help out other users.

pong's People

Contributors

zacharyvincze avatar

Watchers

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