Skip to content

Mini Game Collection in C – A set of simple terminal-based games including Snake, Tic-Tac-Toe, and SkyWars, featuring ASCII graphics, real-time input handling, and a main-screen launcher for easy access.

Notifications You must be signed in to change notification settings

LifelongWay/Linux-terminal-games

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mini Game Collection

This repository contains a collection of simple terminal-based games written in C:

  • SkyWars (skywars.c)
  • Snake (snake.c)
  • Tic-Tac-Toe (tictactoe.c)
  • Main Screen Launcher (main-screen.c)

Directory Structure

.
├── Makefile
├── README.md
└── src
    ├── skywars.c
    ├── snake.c
    ├── tictactoe.c
    └── main-screen.c

Requirements

  • GCC (GNU Compiler Collection)
  • Linux/macOS terminal (POSIX compatible)
  • No additional libraries required

Installation & Compilation

The project uses a Makefile for compilation. By default, the source files are in ./src/.

To compile all games:

make

This will generate:

  • ./src/game_skywars
  • ./src/game_snake
  • ./src/game_tictactoe
  • main-screen (executable launcher)

Note: make runs the default installation target.

To clean compiled binaries:

make clean

This removes the ./src folder, so only the source files remain.


Running the Games

  1. From source folder:
./src/game_skywars
./src/game_snake
./src/game_tictactoe
  1. Or using the main screen launcher:
./main-screen

This launcher allows you to choose and play any of the available games.


Controls

Snake

  • W / w → Up
  • S / s → Down
  • A / a → Left
  • D / d → Right

Tic-Tac-Toe

  • Q W E → Top row
  • A S D → Middle row
  • Z X C → Bottom row
  • Space → Change value of a selected cell
  • Enter → Submit the chosen cell value

Notes

  • Terminal must support ANSI escape codes for colors and cursor control.
  • Ctrl+C will safely exit any game and restore the terminal state.
  • Games are designed for single-player experience; Tic-Tac-Toe includes a basic opponent AI.

About

Mini Game Collection in C – A set of simple terminal-based games including Snake, Tic-Tac-Toe, and SkyWars, featuring ASCII graphics, real-time input handling, and a main-screen launcher for easy access.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published