How to use the FPP file to help smooth the creation of standalone games
(added to Game Guru GitHub Oct 7th 2018 - November 2018 Public Preview).
At some point you will want to create a standalone game after spending hundreds of creation hours in the map editor. You want your 'baby' released to allow others to play.
So you click on "File > Save Standalone" and after several minutes a message will pop up confirming that the standalone has been built and saved in "Documents\Game Guru Files\My Games\" folder.
So far, so good.
However, if you have added custom scripts, assets, audio etc or have anything other than stock/simple maps there is a potential that when you launch your standalone game for the first time you will encounter an error during the 'loading game' process with the title screen displayed (sometimes errors occur before this title screen is even displayed).
These errors are always caused by files that have not been copied over from the Game Guru editor folder structure to the Standalone folder structure.
This is often incredibly frustrating as the error messages do not give much help in pinning down the missing files. Typical errors are caused by images being used in scripts that have not been copied over.
Lee is making changes to try and automagically find as many of these file copy issues as possible to ensure that these errors don't occur so much (or at all eventually, hopefully). But until that micro utopia is achieved, tracking the missing media down manually is required.
Once found, copying the missing files over manually (preserving the folder structure) and then retesting the standalone until it loads correctly is required. As said, this can be frustrating, but don't give up - the standalone will load once all missing files are found and copied over.
Once the standalone loads, you're starting to get in good shape, however the missing files you have copied over will not be encrypted (media files) or compiled (if lua scripts). And once you start testing your standalone you may find there are actually other files that have not copied over correctly - these don't prevent the level loading but do affect the game (such as missing music files).
Also the next time you create a standalone of this map/level, you will have to go through the same process again.
However, this is where the ".FPP" file comes in - at last, to the point of the post
Adding the paths of missing files and folders to an FPP file (named the same as the .FPM file, e.g. if your map file is called MyAwesomeGame.FPM, name the FPP file as MyAwesomeGame.FPP in the GG mapbank folder) will make GG include these files (and crucially encrypt them) when you next make a standalone for this map.
This prevents repeat work to hunt down the missing files when another build is required and also ensures that all your media files are encrypted before releasing your game to a wider audience as a standalone.
The FPP file is just a text file, so use Notepad or whatever to create and update the file, but when saving make sure the extension is .FPP, not .TXT.
The FPP text file structure is simple (example below):
If you want or need to add a whole folder of media, include the folder name (end the folder path with \ as above) as an entry under the [standalone add files] line.
If just a single item/file is missing or a number of single different items , include the path with the name of the file at the end, again add these under the [standalone add files] line.
If you want to really streamline your standalone build, you can also remove unnecessary files and folders (when you find them) from the game by adding items under the [standalone delete files] line of the FPP file. Only do this if you are sure they are not needed by the game obviously
I hope this helps ease the build process for you, it certainly does for me. It stops much of the teeth grinding once into the "repeat build and test standalone" stage of Game Guru game making