Pong is a built-in ASCII remake of the classic Atari Pong game. This is relatively complete game of pong, visually close to its original version. Entire game is less 500 lines of code showcasing basic mechanics of the CosPlay games as well as power of programmable shaders. This game comes pre-packaged with CosPlay.
To play this game run the following commands:
# One-time Git clone & build: $ git clone https://github.com/nivanov/cosplay.git $ cd cosplay # To run the game: $ sbt "project cosplay; package; runMain org.cosplay.games.pong.CPPongGame"
# One-time Git clone & build: $ git clone https://github.com/nivanov/cosplay.git $ cd cosplay # To run the game: $ mvn -f modules/cosplay exec:java -P pong
From IDE just execute this class:
The game looks like that:
SBT & Maven
CosPlay comes with support for both SBT and Maven builds. Running examples and built-in games via SBT will automatically use terminal emulator since both SBT and CosPlay use JLine library and SBT therefor uses Java process fork to launch the examples and games. If you want to run directly in the terminal console using pure text-mode - use Maven method instead.