Skip to content

Ascii Patrol is an ASCII game project. It was mainly inspired by "Moon Patrol", my favourite arcade game at the times I was a child.

License

Notifications You must be signed in to change notification settings

fortran-gaming/ascii-patrol

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

92 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ascii-patrol

Ascii Patrol is an ASCII game project. It was mainly inspired by "Moon Patrol", my favourite arcade game at the times I was a child.

ascii-patrol

Currently game can be built using C++ compilers such as Clang, GCC, or Intel oneAPI including operating systems:

  • Windows (Visual Studio, Cygwin, MinGW, MSYS2, Windows Subsystem for Linux)
  • Linux, MacOS
  • DOS (Watcom)
  • HTML5 browsers (Emscripten)

Version 1.7

  • Added $ASCII_PATROL_CONFIG_DIR and $ASCII_PATROL_RECORD_DIR environment variables (Linux only)

Version 1.6

Version 1.5

To use / modify / add graphics asserts located in 'asset' directory you need to use REXPaint Copy 'assets' directory to REXPaint's 'images' subdirectory. To apply modifications to the game, in next step you should use temp_xp program which converts all .xp files located in some directory to assets.cpp and assets.h files being compiled with game.

Ascii Patrol Home Page (ascii-patrol.com)

Accordingly to raspberrypi.org AP can be easily built and runs great on Raspberry PI!

Find me on Twitter: @MrGumix

Give it a try on any HTML5 browser

https://ascii-patrol.com/area53/ascii-patrol-html5.html

Quick install on Linux with snap

Get it from the Snap Store
snapped by @popey

  • sudo snap install ascii-patrol

Packages

Arch Linux:

Build instructions

These instructions assume the system has Git and a C++ compiler.

# clone sources repo
git clone https://github.com/msokalski/ascii-patrol.git

# enter sources directory
cd ascii-patrol

Linux

The needed libraries are installed like:

# install required packages, (no apt-get -> use pacman)
sudo apt-get install libx11-dev libpulse-dev
# OR
sudo dnf install libX11-devel pulseaudio-libs-devel

# to fix problems with no keyboard input in few gnome terminals we require XI2
sudo apt-get install libxi-dev
# OR
sudo dnf install libXi-devel

Build with CMake:

cmake -Bbuild
cmake --build build

If the system doesn't have CMake:

# enable execution of build.sh and run.sh scripts
chmod +x *.sh
# invoke compilation
./build.sh

MacOS

Homebrew install libraries (works with Clang or GCC):

brew install libx11 libxi pulseaudio

Build:

cmake -Bbuild
cmake --build build

Windows

No extra libraries are needed on Windows. Works with Visual Studio, MinGW / MSYS2, Cygwin, or WSL.

cmake -Bbuild
cmake --build build

HTML5

On a system with emscripten installed, build for HTML5 web browsers, producing "build/asciipat.[js,wasm]"

emcmake cmake -B build -Dweb=on
cmake --build build

Running

Ascii Patrol uses curl to communicate with hi-score server (ascii-patrol.com) So optionally let's install it if needed. sudo apt-get install curl

Finally let's piu-piu ! ./asciipat or ./run.sh

More on asciipat arguments can be found here: http://ascii-patrol.com/forum/index.php?topic=63

Filepaths

Ascii Patrol creates two files: asciipat.cfg and asciipat.rec.

asciipat.cfg is created when you change your player name, avatar, or key bindings. asciipat.rec is created when you start playing the game, and get a score.

On Linux, by default, the game saves these files in $HOME. If $HOME is not set, then the game saves the files in the current directory.

However, if $ASCII_PATROL_CONFIG_DIR or $ASCII_PATROL_RECORD_DIR are set, then the game will save the files in those directories respectively. The directories should already exist; Ascii Patrol will not create them.

Problems?

  • no sound? -> install / start pulseaudio ( ie: pulseaudio -v -C )
  • weird colors? -> try another terminal emulator or run from raw console (ctrl-alt-F1 or so)
  • poor font look? -> try changing font in your terminal or in case of raw console use setfont
  • keyboard doesn't work? -> try another terminal emulator or run from raw console
  • no hi-scores table? -> install curl

About

Ascii Patrol is an ASCII game project. It was mainly inspired by "Moon Patrol", my favourite arcade game at the times I was a child.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 96.7%
  • C 1.6%
  • HTML 1.4%
  • Shell 0.1%
  • CMake 0.1%
  • JavaScript 0.1%