Skip to content

Me-Wosh/TerminalGames

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Terminal Games

It was a fun project that helped me learn more about the ANSI/ASCII characters and terminal input/output manipulation. Besides that it was my first Ruby project so this way I could learn about its syntax, thought process behind the language and I could try something new.


NOTE

Windows CMD and PowerShell aren't aware of the concept of getting user input without blocking the program so the games might not work properly. The easiest workaround is to run a second thread responsible only for user input.


Installation

Clone the GitHub repository into the current folder:

git clone https://github.com/Me-Wosh/TerminalGames.git

Navigate to the specific game folder (SpaceInvaders / Snake):


Run program with ruby:

ruby main.rb

To check if you have ruby installed type:

ruby -v

If you don't have ruby installed I recommend installing it while using a manager (rbenv, chruby, etc.), especially if you are on macOS

More installation info: https://www.ruby-lang.org/en/documentation/installation/


Space Invaders

It features (I believe) all mechanics that the original game had, that is:

  • Moving player character
  • Shooting at enemies
  • Enemies moving at intervals and shooting back at the player
  • Special faster enemy that spawns once in a while and rewards bonus points if shot
  • Shields that block both enemies and player bullets
  • 3 lives that can regenerate if certain conditions are met
  • Level ups

Short demo

1080p.mov

Snake

Features:

  • 2 Game modes - classic and speed
  • Collision with body and border
  • Menu
  • Eating food to grow in size
  • Game over screen

Game modes (speed game mode is artificially boosted to illustrate the idea), collision with border

GameModes.mov

Collision with body

Collision.mov

Menu

Menu.mov

About

List of games that run in a terminal

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages