Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

One reload for the whole project

A topic by chroda created 11 days ago Views: 80 Replies: 4
Viewing posts 1 to 4

So the question is simple, do I need to if (live_call()) return live_result; in every object I want live? has a way to the live server be looking for any changes inside the project folder, then update the game window? I assume what I wish would be similar to js live reload server almost, that look for the whole project. maybe could be another way to bind so is a tradeof for performance I assume.. but for really small project maybe performance is not an issue. Thanks a lot for your time.

Developer (2 edits) (+1)

This isn’t about the server, but rather that live_call is what runs the live-reloaded version of the event/function once we have one - you can’t just do obj_some.create = new_function or scr_some = new_function in GML.

JS live reload is different because typically (like with nodemon or live.js) it simply restarts the app / reloads the page on JS changes. On GM terms this is an equivalent of compiling-running the game again and saving-restoring the window position or using window_embed_into to insert the game window into a container window.

I am still new to the GM world and trying to learn an optimal workflow. So for the GMLive, the answer is really to care about what I set live, correct? I just noticed yesterday that on GMEdit, it shows a little dot on the files where I put a live call. What’s the optimal event to do it? I have been doing on #event step_begin. And sorry if all these are noob questions, in the early process of switching to GM.

Developer(+1)

You add live calls to events/functions that you want to live-reload! The cost of having a live call in a place that’s not been live-reloaded this run is minor, but still GMEdit shows the badges as a reminder that you can eventually remove these when you’re done with that code.

Thank you for the reply!