Skip to content

mpburg/roguelike

 
 

Repository files navigation

Caverns & Kubernetes

A Roguelike microservices ecosystem

This is the prototype for a distributed multiplayer dungeon crawl game, with a dual purpose:

  • Illustrate architecture and design patterns for building microservice-based solutions hosted in kubernetes
  • Be a fun and challenging game!

Setup

npm install to get all the code dependencies.

Running the server

The main server is started with npm start and this will fire up a server that you can then point a browser to and start playing.

(You may have to let "node" accept incoming network connections)

However, all monsters in the game are run as separate microservices. You need to set the ENV variable export ROLE="MONSTERS" before running npm start in another shell.

Connect to the server from a browser

If running the server locally, point your browser here: http://127.0.0.1:3000

Keys anad what they do

  • Cursor left, right, up and down : obvious movement around the current map level.
  • i : show Inventory
  • d : drop an item
  • e : eat something from your inventory
  • x : examine an item from your inventory
  • w : wield or wear an item from your inventory
  • , : pick up an item
  • > : move down stairs
  • < : move up stairs
  • ? : help
  • ; : look around (using cursor keys)

Coding

The architecture aims to enable easy extensibility of the game with new features.

src/
├── client/           # client used in web frontend and bots
├── common/           # common abstractions used in front and backend
├── frontend/         # Web frontend for players
├── monsters/         # Bot code for each type of monster
├── routes/           # REST API code
├── server/           # Code for the backend server
│   ├── config/       # home for configuration of server
│   │   └── maps/     # home for map configuration files
│   ├── entities/     # Code for each type of player or monster entity
│   ├── generators/   # Code for different types of cave generation
│   └── items/        # Code for each type of item - weapons, armour, food, etc.
└── start.sh          # Entry point for microservice

Server API resources

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 98.1%
  • HTML 1.1%
  • Other 0.8%