Skip to content

spinau/pong

Folders and files

NameName
Last commit message
Last commit date

Latest commit

6c7273f · Aug 3, 2021

History

8 Commits
Jul 25, 2021
Jul 26, 2021
Jul 26, 2021
Aug 3, 2021

Repository files navigation

pong

Reproduction of the Atari Inc. pong game from the 1970s.

Based on code from the Go tutorial at https://sdl2.veandco/tutorials/go. Rewritten in C and using SDL2 rendering (as opposed to the older SDL1 surface blitting).

Not tested on anything other than GNU Linux. Make will make two versions: pong requires the assets/ directory, epong has the assets embedded.

Usage:

pong [ options ] [ width height ]

Options:

-bfloat   ball speed (0.3 is nice, 1.0 is too fast)
-pfloat   paddle speed (1.0 or thereabouts is ok)
-fint   frames per second (see how far it can be pushed)

Keyboard when running:

f   toggle fullscreen/window
space   pause/unpause
m   mute/unmute
s/w   player 1 paddle
/   player 2 paddle
esc   quit

Requires

https://www.libsdl.org/download-2.0.php
https://www.libsdl.org/projects/SDL_ttf
https://www.libsdl.org/projects/SDL_mixer
https://www.libsdl.org/projects/SDL_image

About

atari-like pong game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published