Sign inSign up

eddmanoo/quakejs

By eddmanoo

Updated about 1 year ago

Image
0

3.1K

eddmanoo/quakejs repository overview

QuakeJS - Docker

QuakeJS is a port of ioquake3 to JavaScript with the help of Emscripten. To see a live demo, check out http://www.quakejs.com.

Installation
First of all install docker and docker-compose:
sudo apt install docker
sudo apt install docker-compose
After that, in the folder where is this readme, execute the command:
sudo docker-compose up
The server will start with a default deathmatch
Connecting to server
First, to connect to the default server created (you may replace 127.0.0.1 for the IP of your server):
http://127.0.0.1:8080/play?connect%20127.0.0.1:27960&password%20valid_password&name%20your_name
Available maps (this maps can be set in the files server.cfg. server_dm.cfg and server_ctf.cfg are good examples):
Deathmatch: q3dm1 q3dm7 q3dm9 q3dm17 q3tourney2
Pro: q3tourney4 q3dm6 q3dm13
Capture the flag: q3wctf1 q3wctf2 q3wctf3
Game types:

g_gametype: 1 = DM 2 = Tourney (1on1) 3 = Team DM 4 = CTF


compose.yaml
services:
  quakejs-server:
    image: eddmanoo/quakejs:1.0
    hostname: quakejs-server
    container_name: quakejs-server
    ports:
      - "27960:27960"
    volumes:
      - ./server_dm.cfg:/quakejs/base/baseq3/server.cfg
      # - ./server_ctf.cfg:/quakejs/base/baseq3/server.cfg
    security_opt:
      - apparmor=unconfined
    command: ["sh", "-c", "echo \"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\ny\n\" | node build/ioq3ded.js +set fs_game baseq3 +set dedicated 2 +exec server.cfg"]

  quakejs-client:
    image: eddmanoo/quakejs:1.0
    hostname: quakejs-client
    container_name: quakejs-client
    ports:
      - "8080:8080"
    security_opt:
      - apparmor=unconfined
    depends_on:
      - "quakejs-server"
    command: ["sh", "-c", "node bin/web.js --config ./web.json"]

server_dm.cfg
seta sv_hostname "QuakeJS Server"
seta g_password "valid_password"
seta sv_maxclients 12
seta g_motd "Welcome to EDD`s QuakeJS Server"
seta g_quadfactor 3
seta g_gametype 0
seta timelimit 10
seta fraglimit 25
seta g_weaponrespawn 3
seta g_inactivity 3000
seta g_forcerespawn 1
seta rconpassword "Your Password"
set d1 "map q3tourney2 ; set nextmap vstr d2"
set d2 "map q3dm1 ; set nextmap vstr d3"
set d3 "map q3dm7 ; set nextmap vstr d4"
set d4 "map q3dm9 ; set nextmap vstr d5"
set d5 "map q3dm7 ; set nextmap vstr d6"
set d6 "map q3dm17 ; set nextmap vstr d1"
vstr d1

server_ctf.cfg
seta sv_hostname "QuakeJS Server"
seta g_password "valid_password"
seta sv_maxclients 12
seta g_motd "Welcome to EDD`s QuakeJS Server"
seta g_quadfactor 3
seta g_gametype 4
seta timelimit 10
seta fraglimit 25
seta g_weaponrespawn 3
seta g_inactivity 3000
seta g_forcerespawn 1
seta rconpassword "jlpicard"
set d1 "map q3wctf3 ; set nextmap vstr d2"
set d2 "map q3wctf2 ; set nextmap vstr d3"
set d3 "map q3wctf1 ; set nextmap vstr d1"
vstr d1

Tag summary

Content type

Image

Digest

sha256:025ccf541

Size

420.6 MB

Last updated

about 1 year ago

docker pull eddmanoo/quakejs:1.0