Skip to content

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?"

Notifications You must be signed in to change notification settings

STIFTMAN/CustomGameLobby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Custom Game Lobby

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?"

Files

  • server.js: This file is the server file for game and webhosting.
  • web: This directory is containing the website.
  • Hosting

    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.

    Game types

  • 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
  • Game modes

  • single: Play alone against others
  • team: Play with your team (same color)
  • oneforall: All player play together
  • Game file

    Note: The whole gamefile has to be a JSON file.

    Settings

    The settings object have to be on top of the file with an id of settings.

    Type-Mode:

  • deathmatch: single,teams and oneforall
  • points: single or teams
  • path: only oneforall
  • Game Name

    gameName: Your Name for this game / story

    Shuffle

    shuffle: Shuffle the answers or not

    Timer

    timer: Time (in seconds) to answer a question.

    Note: Minimum of 5 seconds have to be set to enable the time.

    Section

    Note: Starting ID have to be 1

    One section is made of:

  • id: Id to jump
  • q: Question to ask
  • a: Array (List) of answers
  • A answer is made of:

  • t: Text of answer
  • jmp: Jump to ID section
  • Example:

    [
    	{
    		"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}
    			]
    	}
    ]

    Errors

    If the uploaded gamefile is invalid, the exact error will be shown in chat.

    Playing

    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.

    New

    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.

    Notes

    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.

    About

    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?"

    Topics

    Resources

    Stars

    Watchers

    Forks

    Releases

    No releases published

    Packages

    No packages published