All Projects → fastrgv → CoTerminalApps

fastrgv / CoTerminalApps

Licence: GPL-3.0 License
Retro ASCII Puzzles plus SpaceInvaders, Pacman & Frogger arcade games that run WITH SOUND in a terminal on any platform !!

Programming Languages

Ada
118 projects

Projects that are alternatives of or similar to CoTerminalApps

Figlet Fonts
my collection of figlet / toilet ascii art fonts
Stars: ✭ 393 (+1771.43%)
Mutual labels:  collection, ascii
asciiarena
Terminal multiplayer deathmatch game
Stars: ✭ 34 (+61.9%)
Mutual labels:  ascii, terminal-app
arcade-pcb-case
Plans to build Arcade PCB cases
Stars: ✭ 29 (+38.1%)
Mutual labels:  collection, arcade
Meme-Maker-Mac
Meme Maker open source macOS app made in Swift.
Stars: ✭ 59 (+180.95%)
Mutual labels:  osx
rygar-fpga
A FPGA core for the arcade game, Rygar (1986).
Stars: ✭ 17 (-19.05%)
Mutual labels:  arcade
dictionary-osx
Access the Mac OSX Dictionary app via the command line
Stars: ✭ 20 (-4.76%)
Mutual labels:  osx
mobx-collection-store
Data collection store for MobX
Stars: ✭ 36 (+71.43%)
Mutual labels:  collection
gifterm
View animated .GIF files in a text console. Linux/Mac/Windows
Stars: ✭ 14 (-33.33%)
Mutual labels:  ascii
magnum-integration
Integration libraries for the Magnum C++11/C++14 graphics engine
Stars: ✭ 75 (+257.14%)
Mutual labels:  osx
mkosxinstallusb
Linux shell script that creates USB flash drive booting OS X installer
Stars: ✭ 34 (+61.9%)
Mutual labels:  osx
figlet4s
ASCII-art banners in Scala
Stars: ✭ 29 (+38.1%)
Mutual labels:  ascii
NonEmptyCollections
A type-safe implementation for collections that cannot be empty. Life is too short for emptiness-checks!
Stars: ✭ 45 (+114.29%)
Mutual labels:  collection
barbar
DEPRECATED — OSX crypto-currency price ticker
Stars: ✭ 55 (+161.9%)
Mutual labels:  osx
laravel-any
🏓 Laravel collection macro that determine if `any` item from the collection passes the given truth test.
Stars: ✭ 38 (+80.95%)
Mutual labels:  collection
MBPageControl
A highly customizable page control for OS X.
Stars: ✭ 38 (+80.95%)
Mutual labels:  osx
node-jxa
Use your favorite node.js modules (and JS editor) for your Javascript OSX automation scripts
Stars: ✭ 52 (+147.62%)
Mutual labels:  osx
blog
Source code for the posts of my blog https://theroadtodelphi.com/
Stars: ✭ 96 (+357.14%)
Mutual labels:  osx
ModMove
Move/Resize windows using modifiers and the mouse
Stars: ✭ 86 (+309.52%)
Mutual labels:  osx
VGChips
Video Game custom chips reverse-engineered from silicon
Stars: ✭ 86 (+309.52%)
Mutual labels:  arcade
reactors
View components and APIs that work web, mobile and native!
Stars: ✭ 14 (-33.33%)
Mutual labels:  osx

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.4.0/co23dec21.7z

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

Note to github downloaders: Please ignore the "Source code" zip & tar.gz files. (They are auto-generated by GitHub). Click on the large 7z file under releases to download all source & binaries (Windows,Mac & Linux). Then, type "7z x filename" to extract the archive.

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

CoTerminalApps with OpenAL Sound

What is new:

ver 2.4.0 -- 23dec21

  • Updated gnatcoll libraries on OSX & w32; removed unused libgpr.a.
  • All "assets", including datafiles & soundfiles, now have licenses compatible with the GPLv3 license.

ver 2.3.9 -- 05nov21

  • Added example script to build using Gnu/Gnat.
  • Refined libraries and build scripts.
  • Replaced libgnatcoll.a with one downloaded from GitHub.

ver 2.3.7 -- 18oct21

  • Besides Win64, I now provide a Win32 build, to support older platforms.

  • Elliminated anomalous clutter in nexus selection app;

  • Arcade-games now pause to show stats before returning to nexus.

ver 2.3.6 -- 07oct21

  • SpaceInvaders:
    • New red aliens shape.

ver 2.3.5 -- 06oct21

  • SpaceInvaders:
    • New UFO shape; new alien shapes; aliens harder to hit.

ver 2.3.4 -- 29sep21

  • SpaceInvaders:
    • New UFO sound (less annoying);
    • More aliens (11 across, like original).

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

Introduction

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

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

Windows version has runtime-priority control of console terminal.

Rebuildable using the free AdaCore GNAT Ada compiler.

Includes rpn(calculator), cinv(SpaceInvaders), cpac(Pacman), cfrog(Frogger) and 10 puzzle games that use ascii characters only: crush(rush-hour), cslid(klotski), c7(flat7), caz(flatAZ), csok(sokoban), chio(hole-in-one), chio4(hole-in-one+4), c9(nine), cdd(dirty-dozen), cpan(panama);

See a visual of the 10 puzzles in the image "./puzzles.png".

Usable keys for all:

  • arrow-keys or WASD or IJKL for movement;
  • (q)=quit
  • (?)=help toggle

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

  • bin\win\cpac.exe

but it is more convenient to use the selector app.

All puzzles & games can now be launched from the selector apps:

  • winterm.bat (Win64)
  • w32term.bat (Win32)
  • macterm.sh (Mac/OSX)
  • gnuterm.sh (linux)

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

Windows users note: Using linux executables under WSL [Windows Subsystem for Linux] is not supported. Instead, you should use the windows versions [initiated by winterm.bat] because extraordinary measures have been taken to achieve arcade-level response under Windows.

Similarly, linux users cannot use wine to run the Windows executables.

For Maximal Enjoyment...

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

Screen setup is important, too. Terminal sizes required:

  • pacman: 60x40
  • frogger: 56x21
  • Invaders: 80x30
  • others: 60x25

It is recommended to resize your terminal window; 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 that has 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.

Note that this app is still under active development & improvement. So be sure to check back for the latest update. Nevertheless, it is playable and fun.

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.

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\win", 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.

@@@@ is a raft of lillypads, QQQQ is a team of turtles, ==== is a log, TTT is a truck, ccc is a car.

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.

CoTerminal-BlockSlide (cslid.adb), CoTerminal-DirtyDozen (cdd.adb)

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. The objective is to move the red block to a specified goal position.

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

Gameplay: crush, cslid

"?" 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 not always necessary, as there is an auto-select mechanism for those times when only one selection may move in a given direction.

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

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

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

caz is a flat representation of a 3x3x3 cube with one cubelet missing that allows sliding permutations. The elements are labelled with the english alphabet.

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

  • note the original order, and blank location;
  • mix;
  • then restore.

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:

  • (1)..(5): mix; higher values are more difficult.

  • (up),(i),(w): north

  • (dn),(k),(s): south

  • (rt),(l),(d): east

  • (lt),(j),(a): west

  • (home),(),(u),(.),(-): layer-up

  • (end),(/),(o),(+): layer-dn

  • (?): help

  • (q): quit

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

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.

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

Setup & Running:

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.

Ensure your keyboard has a short key-delay and fast repeat.

Minimize the size of your terminal window. Your terminal must be 80 chars wide by 30 lines for SpaceInvaders, 60 by 40 lines for pacman, and smaller for others. So 80 by 40 should work for all.

Enlarge the Font so that the window fills your monitor.

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

winterm.bat (win64) or w32term.bat (win32)

or macterm.sh

or gnuterm.sh

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\win and then type "cfrog" to run Frogger.

The prebuilt linux executables require glibc v2.14 or newer. That means if your distribution is older, it might not run, and you would need to rebuild (see below).

[deleted wine comments]

OSX caveat

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

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

Compiler Scripts

There are four scripts, w[32]buildall.bat for Windows, lbuildall.sh for Linux, and obuildall.sh for OS-X. They differ in where the executables are put. Now with so many different precompiled binaries for each OS, there would be too much clutter if they were all put into the same place.

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

Build Instructions:

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

Manually install GNAT GPL from libre.adacore.com/download/ along with "gnatcoll", its companion library. If you don't like my key-mappings, edit the code as you like.

Next, edit the scripts wcmp.bat or 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. And make sure it is executable.

Then type "[wlo]buildall" to create new command-line executables for your system. ( w for Windows, l for Linux, o for OSX). Note that on OSX, you must have the Apple-Xcode g++ compiler present in order to rebuild.

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

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

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

  • uses the [freely-available] Ada programming language & GNAT GPL;
  • runs on Macs running OSX, or PCs running Windows or Linux;
  • uses only free open source software [F.O.S.S] tools & libraries;
  • portable, transparent code, easy to modify, rebuild;
  • uses a cross-platform implementation of OpenAL-Audio, adaptable by any Ada application that needs sounds & music-loops with a simple interface.
  • pure minimalism: no graphics, just colored ASCII characters, keyboard, & sound;

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

License:

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

Copyright (C) 2021 [email protected]

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 [[email protected]] for his C-version of Pacman for the console, after which this Ada version was modelled (gnu gpl).

Sebastian Gutsfeld [[email protected]] & Alexander Hollinger [[email protected]] for the C-version of nInvaders (v0.1.1), after which this Ada version was modelled (gnu gpl).


SoundFiles [x.wav]

Fanfare/Applause and UFO sounds are from freesound.org and are covered by the Creative Commons CC0 license. Others from

  • classicgaming.cc/classics/pac-man/sounds
  • classicgaming.cc/classics/frogger/sounds (also CreativeCommons).

Best Download Site for all my games:

https://github.com/fastrgv?tab=repositories or https://sourceforge.net/u/fastrgv/profile/

Video BlockSlider Autosolve:

https://youtu.be/dD3VGbXv3ng


Some Earlier Revision History:

ver 2.3.3 -- 28sep21

  • SpaceInvaders:
    • Improved logic to eliminate color errors;
    • Added high-valued, bidirectional UFO.
    • Made first level easier; higher levels harder.

ver 2.3.2 -- 26sep21

  • SpaceInvaders Improvements:
    • refined screen drawing indexes to eliminate anomalies.
    • added gameover sound.
    • added checks to assure screen-draws are synched with motions.
    • added final screen-clear to play nicely with selection app.

ver 2.3.1 -- 24sep21

  • SpaceInvaders Improvements:
    • refined timing params for improved & reliable action.
    • added sound when player loses life;
    • added output of number of lives remaining;
    • made first level easier;
    • each susequent level has increasing alien speed & number of missiles.

ver 2.3.0 -- 22sep21

  • Added SpaceInvaders arcade game [cinv].
  • Fixed critically bad indexing in "nexus" selection app.

ver 2.2.4 -- 16may21

  • csok: added more puzzle files.
  • csok: fixed u-key [undo] problem.
  • csok: added o-key to restart puzzle.
  • added c9r, reverse-mode c9.
  • improved help messages.

ver 2.2.3 -- 10mar21

  • c7,c9,caz now have solvers & improved screens.
  • c7,caz now allow restart using (r)-key.
  • nexus/puzzles.txt now limited to 60 columns.

ver 2.2.2 -- 06mar21

  • Csok now has alternate character set toggled with (c)-key.
  • Csok now has 3 embedded autosolvers.

ver 2.2.1 -- 23feb21

  • Updated sokoban autosolvers & csok.
  • Added more capable hbox4 sokoban solver.
  • Improved build scripts.

ver 2.2.0 -- 8nov20

  • Completely revised & enhanced sound system;
  • Using cross-platform OpenAL binding;
  • Simplified build process & coding;
  • Pacman background music now restored.

ver 2.1.0 -- 26oct20

  • Improved UI for RPN-calc.

ver 2.0.4 -- 22sep20

  • Game-launcher now allows (return)-key to select, uses improved colors.

ver 2.0.3 -- 23jun20

  • All apps are now launched using a single command.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].