Home

Awesome

screenshot

screenshot

screenshot

screenshot

CoTerminalApps

Retro Ascii Character Games that run in a color-capable terminal on Windows, OSX, & Linux.

Grab the large file under "release...latest" for all source and data, or try this link:

https://github.com/fastrgv/CoTerminalApps/releases/download/v2.5.3/co5nov22.7z

then type "7z x filename.7z" to extract the archive.

Revision Notice: CoterminalApps has been deprecated as of 14nov2022.


SpaceInvadersVideo: https://www.youtube.com/watch?v=dMA4xA4mqII

CoTerminalApps with Sound, including SpaceInvaders, Frogger, Pacman

What's new:

ver 2.5.3 -- 05nov2022

ver 2.5.2 -- 22oct2022

===============================================================

Introduction

CoTerminalApps is a highly portable collection of non-graphical, ascii-character puzzles & games with sound that run in a commandline terminal on Windows, OS-X and Gnu/Linux. Includes SpaceInvaders, Pacman & Frogger.


Featuring

* no installation
* no dependencies (Ncurses not needed)
* simply unzip in your Downloads directory, or any other writeable directory, and run;
* or unzip onto a USB flash drive [w/same file format] and run.

The 7zip command to extract the archive and maintain the directory structure is "7z x filename".

Rebuildable using the free GNU Ada compiler, even on OSX.

Includes 3 retro arcade games: SpaceInvaders, Pacman, Frogger as well as 10 puzzle games that use ascii characters only: rush-hour, klotski, flat7, flatAZ, sokoban, hole-in-one, hole-in-one+4, nine, dirty-dozen, panama, annoying-sliders, rpn-calculator.

See the image "./puzzles.png" for a visual of the 10 available puzzzles.

Usable keys for all:

All puzzles & games can be called directly from the command line; e.g.

but it is more convenient to use the selector app, thusly:

Use the keyboard arrow keys to highlight the desired game, then press the (enter)-key.

For Maximal Enjoyment...

Keyboard setup can be very important for playability. You should have a very short key-delay and fast repeat rate setting when running the arcade games. The normal settings are fine for puzzles.

Screen setup is important, too. Terminal sizes required:

It is recommended to resize your terminal window, per the above table; then enlarge the font until the window just barely fits your computer screen.

===========================================================================

CoTerminal-Space-Invaders (cinv.adb)

This is my translation of nInvaders.c into Ada, but with SOUND !!!

You need only the (space)-key to fire your laser gun and the left/right arrow keys [or a-key/d-key] to move out of the way of the alien missiles. The terminal window must be at least 80-chars wide x 30-lines. There are no command-line options, but difficulty increases with level.

Pacman (cpac)

Pacman, is a kid friendly ascii character version of Pacman that plays in a commandline terminal. Pure minimalism with classic sounds and 9 predefined levels.

Now with runtime-priority control to prevent terminal freezes on Windows, plus commandline control of gamespeed & ghostspeed.

Runs on Windows, OSX & Linux.

Keyboard setup is important. You should have a short key-delay and fast repeat setting.

The arrow keys, or wasd-keys, or ijkl-keys control movement. The (x),(q) keys quit; (p) pauses game.

Includes executables and source code. Note that this game does NOT require an ncurses library in your environment.

When run directly, cpac can be given 2 optional command line parameters:

* game speed 0..9; 0=slow, 5=default=medium, 9=fast;
* ghost speed 0..9; 0=stopped, 2=default=easy, 9=fast.

If you want to try non-default values for these params, you need to run directly from the directory of the executable. To do this: "cd bin/gnu" or "cd bin/osx" or "cd bin\w64", first.

Before running cpac, it is recommended to resize your terminal to 60 chars. wide by 40 lines tall; then, perhaps, enlarge the font.

Frogger (cfrog)

Terminal frogger is a kid friendly ascii character version of Frogger that plays in a commandline terminal. Pure minimalism with classic sounds and three levels.

Runs on Windows, OSX & Linux.

Keyboard setup is important. You should have a short key-delay and fast repeat setting.

The arrow keys, or wasd-keys, or ijkl-keys control movement. The (x),(q) keys quit.

Before running cfrog, it is recommended to resize your terminal to 56 chars. wide by 21 lines tall; then, perhaps, enlarge the font.

CoTerminal-Rush (crush.adb)

Colored, non-graphical Traffic-Rush puzzle game designed to run in a terminal window.

Horizontal and vertical strings of letters represent cars and trucks in a crowded parking garage. The objective is to move them around lengthwise in order to be able to get red car "a" to the exit, which is either at the right or top of the garage. Note that the last digits in each puzzle name represents the minimum number of moves to win.

A stand alone autosolver, bfsr, is provided, but now, an autosolver is embedded into this game. At any time you may press the (=)-key to begin stepping toward a solution.

I created about 20% of these rush-puzzles (filenames that end "my.rush"), including the most difficult one "zzzz_89my.rush".

BlockSliders, DirtyDozen, AnnoyingSliders

Colored, non-graphical Block Slider puzzle games designed to run in a terminal window.

Colored blocks of letters can be moved horizontally or vertically wherever there is space. Often, the objective is to move the red block to a specified goal position. Sometimes the goal is to swap the positions of two blocks.

A stand alone autosolver, bfsa, is provided, but now, a "live" autosolver is embedded into these games. At any time you may press the (=)-key to begin stepping toward a solution.

In cann you must type "0" to restart it, since "r" is reserved to mean "red".

For those times when a solution seems impossible, the more difficult puzzle families have an AutoSolver function using the (=)-key to step closer towards the solution: crush, cslid, cdd, and cann.

Advice to improve puzzle-solving skills:

Remember that you can stop using the autosolvers at any time and try to manually solve the puzzle from a configuration that is a few steps closer to the solution. And because these solvers are "live", you can resume using the autosolvers at any time if you get stuck again. Each time you resume, you might need to wait a few seconds for the solver to complete its search.

Gameplay: crush, cslid, cann (annoying-sliders)

"?" toggles the help screen. The "+" and "-" keys (next, previous) are used to cycle through the large number of predefined puzzles. You can reset a puzzle by typing "r". You can autosolve by typing "=".

First, one selects a vehicle or block by typing its identifier letter. Then use the arrow keys to move it. Note that manual selection is, often times, not necessary, as there is an auto-select mechanism for those times when only one selection may move in a given direction. For example, cpana never needs a selection (and, btw, it can be solved in 26 moves!).

Be aware that move counts for a given puzzle may differ according to how they are counted. Many puzzzlers count a compound move with a single piece as one move. Here, it is not.

===============================================================

Seven, A2Z (c7.adb, caz.adb)

c7 (flat7) is a flat representation of a 3D 2x2x2 cube with one cubelet missing that allows sliding permutations. There are two 2x2 layers. Here, the elements are labelled 1..7.

caz (flatAZ) is a flat representation of a 3x3x3 cube with one cubelet missing that allows sliding permutations. Here, there are three 3x3 layers. The elements are labelled with the english alphabet.

Flat7 & FlatAZ, are my own creations. They are 2-dimensional versions of my 3D, OpenGL "Rufas Cube" puzzles, available at: https://sourceforge.net/projects/rufascube/

Both the "caz" and "c7" puzzles work the same:

A character in an adjacent row, column, or layer may be moved to the empty space using the keyboard.

Pressing the (home) key on a typical keyboard produces the character 'H'. So assuming that (home)=>'H', (end)=>'F', (up)=>'A', etc... the KEY MAPPING follows:

===============================================================

CoTerminal-sokoban (csok.adb)

There are now two character sets possible that are toggled with the (c)-key.

Move the pusher ( <> or @ ) with the arrow keys in order to push all the boxes ( [] or $ ) onto the goals ( :: or . ) in which case they look like ( {} or asterisk ). Various other functions available on the help screen. Includes a very large family of puzzle files.

Three [external] sokoban solvers named iplr3r, ibox3r, & hbox4 are available. The command line is "solver-name puzzle-file-name level-number-to-solve". The solvers print solution-strings to the terminal screen.

There are many cases the first two solvers cannot handle, but they are pretty good at solving smaller puzzles, particularly the more dense ones. Hbox4 is the most capable.

Three time-limited-to-10-second solvers are embedded into csok. At any time you may press the (=)-key to see if the solver #1 can help you. If so, you will be prompted to keep pressing that same key to proceed toward a solution. No prompt means either the present state is unsolvable, or merely that the embedded algorithm failed. Similarly, the (.)-key initiates solver #2; and the (,)-key initiates solver #3. These can give you a headstart toward a correct solution by limited use of this feature. Once you think you can solve it yourself, stop using the solver and proceed manually. This really helps when you cannot see what your next move should be.

CoTerminal-HoleInOne (chio.adb, chio4.adb)

Move the red 2x2 'a' block into the center of the four L-shaped corner pieces.

CoTerminal-Nine (c9.adb)

Reverse the order of the numbered blocks with assorted shapes. First version begins with blocks in order. Second begins with blocks in reverse order. Has solver.

RPN (reverse polish notation) command line calculator

A cult classic. Recalls the HP rpn functionality. As a bonus, this version uses differentials to calculate an error estimate. No longer accesible through the selector app, one must call it directly, eg.

* bin\w64\rpn.exe
* bin/gnu/rpn
* bin/osx/rpn

===============================================================

Setup & Running:

CoterminalApps is a stand-alone application. Ncurses is NOT needed; there are no prerequisites.

Mac users see "osx-setup.txt". Windows users see "windows-setup.txt".

Unzip the archive. On Windows, 7z [www.7-zip.org] works well for this. The proper command to extract the archive and maintain the directory structure is "7z x filename".

Open a commandline terminal, and cd to the game directory.

Arcade games require your keyboard to have a short key-delay and fast repeat rate.

Minimize the size of your terminal window:

Then enlarge the Font so that the window fills your monitor.

To launch the game selector App, depending on your system, type:

Note that any individual app may still be executed from the directory appropriate to your O.S. For example, on Windows you can CD to bin\w64 and then type "cfrog" to run Frogger.

OSX caveat

The prebuilt OSX executables require version 10.13 (sep2017) or newer.

===========================================================================

Compiler Scripts

There are 3 scripts, w64buildall.bat for Windows, lbuildall.sh for Linux, and obuildall.sh for OS-X. They differ in where the executables are put. With so many different precompiled binaries for each OS, there would be too much clutter if they were all put into the same place, particularly since windows needs colocated DLLs.

These build scripts work for GNU Ada [with its own g++]. See ./alternateBuildScripts/ for more examples.

The latest scripts have elliminated the need to use the "gnatcoll" library simply by compiling from source 3 additional tiny files, a small subset of gnatcoll, that are actually used by CoterminalApps.

Final note: the latest OSX script does not use Xcode, only GNU Ada & GNU g++.

==========================================================================

Build Instructions:

Remember that prebuilt executables are already included. But, if you want or need to rebuild...

To get a recent Ada compiler; eg. GNU-Ada...try this source:

https://github.com/alire-project/GNAT-FSF-builds/releases

Manually install GNU Ada. If you don't like my key-mappings, edit the code as you like.

Next, edit the scripts w64cmp.bat, lcmp.sh or ocmp.sh so that the path to gnatmake is correct. These scripts streamline the build process by allowing auxilliary files to be neatly hidden in subdirectories.

Windows users please read gnuAdaOnWindows.txt.

Then type "[w64/l/o]buildall" to create new command-line executables for your system. ( w64 for Windows, l for Linux, o for OSX).

There are NO other 3rd party libraries or tools required to build.


What is special about this project?...freedom...portability

Open source Ada developers are welcome to help improve or extend this app. Developer or not, send comments, suggestions or questions to: fastrgv@gmail.com


License:

CoTerminalApps is covered by the GNU GPL v3 as indicated in the sources:

Copyright (C) 2022 fastrgv@gmail.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You may read the full text of the GNU General Public License at http://www.gnu.org/licenses/.


Other Credits and Thanks:

Serhiy Grabarchuk and Peter Grabarchuk for their "Hole in One", "Hole in One plus 4", and "Nine" puzzles.

Mike Billars [michael@gmail.com] for his C-version of Pacman for the console, after which this Ada version was modelled (gnu gpl).

Sebastian Gutsfeld [segoh@gmx.net] & Alexander Hollinger [alexander.hollinger@gmx.net] for the C-version of nInvaders (v0.1.1), after which this Ada version was modelled (gnu gpl).

Nick Baxter, J.H.Conway, Jim Lewis, Bob Henderson, Gil Dogon, Ed Pegg Jr., J.I. Wiley, J.H. Fleming, C. L. Diamond, Sam Loyd, H. E. Dudeney, E. B. Escott, Nob Yoshigahara, James W. Stephens for the classic sliders.


SoundFiles (wav)

Fanfare/Applause and UFO sounds are from freesound.org and are covered by the Creative Commons CC0 Public License documented in the accompanying file ./docs/creativeCommonsCC0.txt. A few have a CC-by-3.0 license and are accompanied by a text file with the attribution.

Others from

It is my intention to use media with copyrights or licenses that are compatible with GPLv3. Please notify me if you believe there is an incompatibility, and it will be removed; eg a CC-by-NC license is NOT GPL compatible.


Download Sites for all my games:

Video BlockSlider Autosolve:


Some Earlier Revision History:

ver 2.5.1 -- 26sep2022

ver 2.5.0 -- 20sep2022

ver 2.4.1 -- 16sep22

ver 2.4.0 -- 23dec21

ver 2.3.9 -- 05nov21

ver 2.3.8 -- 21oct21

ver 2.3.7 -- 18oct21

ver 2.3.6 -- 07oct21

ver 2.3.5 -- 06oct21

ver 2.3.4 -- 29sep21

ver 2.3.3 -- 28sep21

ver 2.3.2 -- 26sep21

ver 2.3.1 -- 24sep21

ver 2.3.0 -- 22sep21

ver 2.2.4 -- 16may21

ver 2.2.3 -- 10mar21

ver 2.2.2 -- 06mar21

ver 2.2.1 -- 23feb21

ver 2.2.0 -- 8nov20

ver 2.1.0 -- 26oct20

ver 2.0.4 -- 22sep20

ver 2.0.3 -- 23jun20