The original pong game made with Go.
- Play with up and down arrows.
- To start new round press
Space
. - whoever gets the first 5 pints wins.
- A perfect AI (It never loses 😂).
Below is some commands that can be used to install the required packages in some Linux distributions. Some older versions of the distributions such as Ubuntu 13.10 may also be used but it may miss an optional package such as libsdl2-ttf-dev on Ubuntu 13.10's case which is available in Ubuntu 14.04.
On Ubuntu 14.04 and above, type:
apt install libsdl2{,-image,-mixer,-ttf,-gfx}-dev
On Fedora 25 and above, type:
yum install SDL2{,_image,_mixer,_ttf,_gfx}-devel
On Arch Linux, type:
pacman -S sdl2{,_image,_mixer,_ttf,_gfx}
On Gentoo, type:
emerge -av libsdl2 sdl2-{image,mixer,ttf,gfx}
On macOS, install SDL2 via Homebrew like so:
brew install sdl2{,_image,_mixer,_ttf,_gfx} pkg-config
On Windows,
- Install mingw-w64 from Mingw-builds
- Destination Folder: Select a folder that your Windows user owns
- Install SDL2 http://libsdl.org/download-2.0.php
- Extract the SDL2 folder from the archive using a tool like 7zip
- Inside the folder, copy the
i686-w64-mingw32
and/orx86_64-w64-mingw32
depending on the architecture you chose into your mingw-w64 folder e.g.C:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64
- Setup Path environment variable
- Put your mingw-w64 binaries location into your system Path environment variable. e.g.
C:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64\bin
andC:\Program Files\mingw-w64\x86_64-6.3.0-win32-seh-rt_v5-rev1\mingw64\x86_64-w64-mingw32\bin
- Put your mingw-w64 binaries location into your system Path environment variable. e.g.
git clone https://github.com/mdfaizan7/go-pong.git
cd go-pong
go run main.go