Build Game from a Template
Learn how to build a game from a template, using custom settings and a simple script.
Setting up the configuration file
The difference with this version is that you can create a configuration file that can alter the game’s visuals. You will inject the values into the game. This example will be based on two configurable values: a primaryColor and a secondaryColor. The game only has two colors and they should complement each other. You will have a game.json configuration file, which can be seen here:
{"primaryColor": "#fff","secondaryColor": "#000"}
The primaryColor will be used to determine the color of the game’s objects, and the secondaryColor will be used to paint the background. Hence, you are empowering the game.json file to configure the game’s skin.
The directory structure for the example
The root of the /usr/src/app/examples/020 directory contains three directories and the new-reskin.js script that you will run to build a new release. The first directory, core, will contain the ...