Skip to content

Terminal games played over a network with netcat and a browser based scoreboard. Currently Snake, Hangman, and Subnet Racer

License

Notifications You must be signed in to change notification settings

jhackshaw/termninja

Repository files navigation

GitHub last commit GitHub

About

Termninja is a game server with a collection of games played over a network using netcat in a terminal. Currently includes:

Snake

snake demo

Celebrity Hangman

Hangman Demo

Subnet Racer

Subnet Racer Demo

The play history and leaderboard is connected and can be seen in the browser:

Browser Demo

How to play

  1. Clone the Repo
    • git clone https://github.com/jhackshaw/termninja
    • cd termninja
  2. Start the environment
    • docker-compose up --build
  3. Navigate to localhost in a browser to view the scoreboard
  4. Install the termninja client in your terminal
    • curl -X GET http://localhost/client -o ./termninja
    • chmod +x ./termninja
  5. Use the client to play games
    • ./termninja --help
    • ./termninja -a (anonymous)
  6. View scores in the browser
  7. Give others access to the same server to compete together

Development

Project Structure

.
├── README.md
├── docker-compose.yml
├── termninja
|
├── games/      # individual game servers (asyncio)
├── frontend/   # NextJS frontend
├── api/        # Sanic app for api access to backend
└── base/       # database access shared by api and games

Development environment

Starting the environment using the docker-compose.dev.yml file adds support for hot reloading all of the source code and enables more verbose output.

docker-compose up -f docker-compose.yml -f docker-compose.dev.yml --build

Built with

  • Python
  • Asyncio
  • Sanic
  • NextJS/React
  • Docker

About

Terminal games played over a network with netcat and a browser based scoreboard. Currently Snake, Hangman, and Subnet Racer

Topics

Resources

License

Stars

Watchers

Forks