refracta / NetHack-Webtiles

Webtiles Server for NetHack
https://webtiles.nethack.live
36 stars 7 forks source link

NetHack-Webtiles

Build Status

Webtiles Server for NetHack

This is NetHack's webtiles server based on NetHack tty port.

It's a HTTP server that allows users to play NetHack remotely through a web browser.

Supports both desktop and mobile play.

Desktop Mobile

Project Structure

archive:dumplog, ttyrec, and rcfile

dev:Scripts used for project development and build

games:The built game binary and save files

sources:Original NetHack source path

web:All web related files

webtiles:NetHack webtiles port code

Prerequisites

Build Guide (Debian)

git clone https://github.com/refracta/NetHack-Webtiles -b develop
cd NetHack-Webtiles
# It automatically configures the environment. (prerequisites, other require files)
sh dev/env-debian.sh
PORT=8080 npm start

Tested on WSL Ubuntu 18.04, 20.04.

Deploy Guide (Docker)

git clone https://github.com/refracta/NetHack-Webtiles -b develop
cd NetHack-Webtiles

sh dev/build-docker.sh
# <↓ in the Docker tty ↓> 
sh dev/install-node-dependency.sh
sh dev/init-nginx.sh
service nginx start

cd sources/nh366/
sh build.sh

cd ../../
npm start

Build Webtiles Port (Only NetHack Binary)

cd games/sources/nh366
sh build.sh

You can speed up the build by modifying the j flag in build.sh.

How to Contribute

  1. Clone repository from develop branch and create a new branch
    git checkout https://github.com/refracta/NetHack-Webtiles -b name_for_new_branch
  2. Make changes and test
  3. Submit Pull Request with comprehensive description of changes

You can talk and discuss development on the #dev channel of the NetHack Live Discord server.

Project Goal