Setting up is as following:
- Make sure that you are running an up-to-date version of GameMaker: Studio.
You can find links to all versions at official website.
- Import the GMLive extension to the project.
With GMEZ file, either right-click on "Extensions" category in project tree and pick "import extension", or just drag-and-drop the file onto IDE from Explorer.
- Import the assets (included files and obj_gmlive) from the package.
To do so, right-click on the extension, pick "Properties", and use the "Import" tab.
Depending on factors, it can take GMS1 a bit of time to show the dialog.
If it's stuck for good, use 7-zip (or equivalent) to unpack the GMEZ file, and import the assets (contents of "datafiles" directory and obj_gmlive.object.gmx) via dragging and dropping them onto IDE.
- Place obj_gmlive in the first room of the project.
- Open menu "Resources - Define Macros" (Ctrl+Shift+N) and add a macro called live_enabled with value 1.
Now, as you might know, GMS1 does not let you save project while the game is running on most targets. This can be solved in multiple ways:
A. Use netlog and GMLiveHelper extensions (when on Windows):
- Right-click on netlog.gmez in Included Files and pick "Open in Explorer".
- Import netlog.gmez and GMLiveHelper.gmez to the project (much like above).
- When starting up gmlive-server, also run netlog.exe in Included Files.
- Use netlog script for debug logging instead of show_debug_message.
(which will display text in netlog's window when connected or IDE when not)
B. Compile and run the game instead of running it from IDE directly.
C. Use an external editor for changing the "live" files mid-game:
- There's a free and open-source GM code editor I made
that works well for this (among other things).
There's also a decent number of plugins for GML support in existing editors (Notepad++, Sublime Text, Visual Studio Code, etc.).
- This can be faster than other options because an external editor will only re-save the file in question while saving the project in GMS1 always also re-saves the .project.gmx (and makes a backup if you didn't disable "backup on save" in File - Preferences).
- The file(s) in question should not be open in GM:S while you are editing them externally, or GMS1 might overwrite them with additional version next time you save the project. If accidents happen, copy the updated code from external editor back to GM:S. Enabling built-in version control for the project reduces the chances of this happening.
Once you are done setting things up, you can remove netlog.gmez and GMLiveHelper.gmez from Included Files.
If you have Neko VM installed, you can also remove all DLL and NDLL files.
If you are not using option A, you can also remove netlog.exe and remove the live_restart_if_necessary line from obj_gmlive's Create event.
(you can always re-import the included files later on)
- Double-click gmlive-server.exe in Included Files to run it.
You can leave it running when recompiling the game - it will re-scan the project directory whenever a new game instance connects to it.
- If you've installed GMLiveHelper, also double-click netlog.exe.
Similarly, can be left running between game sessions.
- Add live function calls to scripts and events of interest.
Note that for events the live-call must be in the first block of the event (since GMS simply combines them during compilation), and there may not be non-"Execute code" DnD blocks in the event.
- Run the game.
- Change the "live" scripts/events as you see fit and see the changes in-game (if everything was done correctly). gmlive-server's window will report status updates.