GMGL is a Game Maker: Studio project that will help you set up a launcher for your game that will check for updates and download them.
This resource will provide all you need in order to set a simple launcher / updater up without having to write a single line of code, but you are encouraged to take a look at the (commented) code and build on top of it.
There are a couple of constraints you need to be aware of before using this resource:
- This is a windows only resource.
- Your game should be saved as a standalone, installers will not work.
You can however ship the launcher itself with an installer.
- Updates will be unzipped in the game folder, overwriting every existing file with the same name.
- Your remote files need to be accessible as direct downloads, default dropbox or onedrive links will NOT work, however there may be ways to get a direct link from those services.
How to use
1. Import the package into a new project
- Create a new GM:S project (do not import GMGL into your exisiting game project) and log into the Marketplace.
- Navigate to the Library tab and import all the recources from the GMGL package.
A this point, you can already run the launcher and see how it works with the sample configuration (it points to a demo of one of my other projects).
2. Edit the manifest file
The manifest file contains information about the latest version of
your game and where to download it.
Open the "included files" folder in the GM:S resource tree
and edit the contents of "manifest.json" file according to these guidelines:
3. Upload the manifest and the game to the host
At this point you need to upload the above manifest file and your game zip folder to your host, at the paths specified, and
ensure that they are accessible by using a browser.
In order to get the manifest file from the game maker interface, right click manifest.json and select "Open in explorer".
Whenever you want to push a new update, all you need to do is change the version number in the remote manifest file, upload the new game data (as a new file or by overwriting the old zip file) and, if required, update the other manifest information.
Running the launcher at this point, if everything has been done correctly, should download and launch your game.
4. Configure and export the launcher
It's now up to you to adapt the launcher to your needs, but there are at least a couple of
things you probably want to change before exporting it as an executable or installer:
1. Replace the default background and button assets
2. Edit the contents of the "gmgl_init" script and change the default messages as well as the launcher options:
auto_start: if set to true, the launcher will automatically launch the game in case of no updates,
or right after updating.
auto_update: if set to true, updates will be downloaded automatically, without asking the user
local_game_data: when opening the launcher for the first time, the user will be asked to download the game. You
can however ship the game with the launcher as an included file (as a zip folder, representing the version number
of the included manifest file) that will be installed automatically the first
time the launcher is run. If you do that, you need to provide in this variable the path and name of the included zip file.
This can be useful when installing the game without internet connection, or if you don't want to replace the whole game on every update, but just some other files.
3. Change the default icon and splash image.
Contact me on the GMC forums
or by email at simoneguerra<at>ekalia.com