Sample Html Mulitplayer Game using Nuggeta GameServer
1.2K
#HowTo :
First of all you need to run a gameserver. see nuggeta/gameserver docker container
create a file named config.js to set public ip/port of the gameserver so add this two variables :
on centos host you may need to run this to allow access to config.js within the container.
run the nginx webserver hosting the game
docker run -d --name sample-game -p 80:80 -v $(pwd)/config.js:/usr/share/nginx/html/js/config.js:ro nuggeta/sample-game-html
open you browser to http://gsIp you should see Wainting Player...
open a second tab to http://gsIp and the game start between the two players you can click or use keyboard to move the player
Content type
Image
Digest
sha256:51f0513f5…
Size
39.3 MB
Last updated
almost 11 years ago
docker pull nuggeta/sample-game-html