This tool provides a multiplayer game lobby and game hosting with your input in your webbrowser. The lobby leader, who created a lobby uploads a game file. If the file is valid to be played, it can be started. There are multiple game modes and types to play. You can only play multiple choice games, like "Who wants to be a millionaire?"
server.js
: This file is the server file for game and webhosting.web
: This directory is containing the website.Make sure that Node.js
is installed.
Write node server.js
in windows console to run the server. You get a message in console, if its running.
Return Error on failure.
Your ip adress will be used to connect to the server. The standard port for connection is 5000
. To get access, you have to
type localhost:5000
, if its running on the same device or your ipv4:5000
, if you reach it from somewhere.
deathmatch
: A knockout Battle (only 1 right answer)points
: Win with most points (only 1 right answer)path
: Knockout, but possible to jump back to earlier questions and do them again (multiple right answers). Its possible to create stories like Black Mirror: Bandersnatch
single
: Play alone against othersteam
: Play with your team (same color)oneforall
: All player play togetherNote: The whole gamefile has to be a JSON
file.
The settings object have to be on top of the file with an id of settings
.
deathmatch
: single
,teams
and oneforall
points
: single
or teams
path
: only oneforall
gameName
: Your Name for this game / story
shuffle
: Shuffle the answers or not
timer
: Time (in seconds) to answer a question.
Note: Minimum of 5
seconds have to be set to enable the time.
Note: Starting ID have to be 1
One section is made of:
id
: Id to jumpq
: Question to aska
: Array (List) of answers
A answer is made of:
t
: Text of answerjmp
: Jump to ID section[ { "id": "settings", "gameName": "2 Question Game", "type": "deathmatch", "mode": "single", "shuffle": true, "timer": 90 }, { "id": 1, "q": "1+1?'", "a": [ {"t": "4", "jmp": -1}, {"t": "3", "jmp": -1}, {"t": "5", "jmp": -1}, {"t": "2", "jmp": 2} ] }, { "id": 2, "q": "Do you want to win?", "a": [ {"t": "No", "jmp": -1}, {"t": "Maybe","jmp": -1}, {"t": "42", "jmp": -1}, {"t": "Yes", "jmp": 0} ] } ]
If the uploaded gamefile is invalid, the exact error will be shown in chat.
Multiple choise. When the game is finished, it tells you if you won or lost. Max. 8 Players. There is no timelimit. If you play deathmatch
and you are out, you can spectate the game.
Private and Public lobbys.
You can only join a Private lobby by its ID
If Public is set, everyone can join you game, because it is shown in a public list.
One Section have to be there to play. There have to be only correct answer, exept you play path. If you want to play alone, choose 'oneforall', else it needs 2 players to start.
IMPORTANT: -1
at jmp means lose
and 0
means win
. -1
will be ignored, if points
is set.