Skip to content

machinetech/pongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

95 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pongo Build Status

A Pong game written in the Rust programming language. The project uses the MIT license.

Pongo

Pongo

There is also a short video clip of the game on YouTube.

Requirements

RUST

The game compiles against the master branch of Rust. See the Rust documentation for installation of the Rust binaries, including the Rust package manager Cargo.

SDL2

The game uses the cross platform media library SDL2 for access to audio, keyboard and graphics hardware. Windows and Mac OSX binaries are available for download from the SDL website.

Ubuntu:

sudo apt-get install libsdl2-dev
sudo apt-get install libsdl2-gfx-dev
sudo apt-get install libsdl2-image-dev
sudo apt-get install libsdl2-mixer-dev
sudo apt-get install libsdl2-ttf-dev
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/lib"

HomeBrew:

brew install sdl2
brew install sdl2-gfx
brew install sdl2-image
brew install sdl2-mixer
brew install sdl2-ttf
export LIBRARY_PATH="${LIBRARY_PATH}:/opt/homebrew/lib"

How to play

cargo run

Launch the game with the above command. The title screen will show with instructions on how to play the game. The human player controls the paddle on the left while the computer controls the paddle on the right. Hit any key or click the mouse to start the game. The music will stop and the ball will immediately launch at a random angle. The goal of the game is to force the ball to hit the opposite wall. If your opponent is unable to return the ball before it hits the wall, you will gain a point. The first player to score five points wins.

The mechanics will speed up as the game progresses. Both the ball and the computer player will start to move faster. If things get difficult, consider using one of your 'slow motion' turns. The human player is allowed three such turns, initiated by left clicking the mouse. The little green turtles at the bottom of the screen will show how many slow motion turns you have left.

Press escape during the game to return to the title screen. Pressing escape while the title screen is showing will exit the game. Alternatively, exit the game by closing the window.

I hope you enjoy this little game. It was fun to write!

Credits

The following fonts were obtained from fontspace.com:

The color scheme used in the game was also inspired by the DJB Pokey Dots font.

The song used during display of the title screen is called 'More Monkey Island Band' and is courtesy of Eric Matyas.

Reporting problems

If anything should go wrong, please report the issue here and I will look into it. Thanks!

About

A Pong game written in the Rust programming language.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages