adding games - Paaspop/Paaspop-Server GitHub Wiki

Adding games

In this document you'll read about how to add a game to the system.

Adding the game to the admin panel

Adding the game to the admin panel is quite easy and consists of two steps:

  • Adding a picture
  • Adding the game data

Adding a picture

Take a screenshot of your game and add this image to

/adminpanel/src/front-end/public/games

Add your image as a .jpg

Adding the game data

To add the game data, go to the following file:

/adminpanel/src/server/db/seeders/gameSeeder.js

In here you'll see an variable named games which holds a array of objects. You can add a new object with the following variables:

Variable Description Type Example
name The name of your game String "test_game"
joinMidGame Are players allowed to join mid game Boolean true / false
responseAnswer What does the websocket server send back after a users input hold to let the user wait and again if the button can be repeatidly pressed String "wait" / "again"
image The name of the image of the game String "default.jpg"

Adding the game to the game runner

Add your game in a folder in the /games folder in the game runner i.e. /games/test_game/. Make sure your game's folder correlates to the game's name, or it won't start!

You can test if your game is working by typing the following in the console:

loadGame('test_game')