Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

GMLive.gml

Livecoding for GameMaker: Studio / GameMaker Studio 2 · By YellowAfterlife

Live room editing is not working for me

A topic by konjecture created Jan 15, 2023 Views: 431 Replies: 14
Viewing posts 1 to 7

So, I followed the video by Shaun Spalding on live room editing and also followed the "cheat sheet" here and have double checked that I have followed all the steps correctly, but live room editing for me does not seem to work. I put a colored rectangle on the asset layer of a room and then tried to drag and make it bigger/smaller, but the change is not reflected in real time in GM.

On the other hand, live update of draw events have been working as intended for me.

Developer (1 edit)
  1. Are you pressing Save/Ctrl+S?
  2. Do you see any messages in the Output or the server window?
  3. Does it work when editing something else in the room and saving, such as instances?
    (I know that pressing Save after editing tiles no longer actually updates the room file, which might be a GM bug)

1. Yes, I have been pressing Ctrl+S every time I changed the size of the sprite. I'm used to it since I have been using the regular update of draw code event for a while now, which works fine.

2. No message is displayed in the Output window.

3. I've tried putting an instance in there which has its own sprite, but the instance does not show up either after saving.

Here are the steps that I'm doing - 

1. Created a blank object - oBlank_GMLive and a blank room - rBlank_GMLive

2. Put live_room_start() in the creation code of the rBlank_GMLive

3. Put the following two lines in the Create event of obj_gmlive - 

live_blank_object = oBlank_GMLive

live_blank_room = rBlank_GMLive

4. Put room_set_live(room, true) in the creation code of the room that I want to see updated live.

5. Started gmlive-server.exe and then run the game. It says 1 client running. So everything seems to be as it's supposed to be.

Am I missing something here?


Developer
  1. If the room is being watched and was updated on disk, you’ll see “updated <room name> (Xms)” in GMLive-server’s window
  2. Just in case, the blank object/room lines should be after everything else in Create (read: live_init resets them)
  3. That would only have the server watch the room after you’ve first visited it.
  4. Does the time next to the client keep ticking?
(1 edit)

So, I reinstalled Windows 10 again (not for this issue, but because I bought a new 2 TB NVME SSD and wanted to install Windows on that), and the issue still persists. However, when I make a new blank project with just couple of rooms and a blank object and follow the steps for live room editing, then everything seems to work fine. Any sprite updated in the room gets reflected in real time. Therefore, it seems like the issue is with my current project itself? I can't see what the issue could be with my game. It's pretty huge and has lots of rooms and code at the moment, but what could create an issue that is preventing the live reloading of rooms?

Developer

You could make a copy of your project and start removing things from it until you’re left with just what triggers the issue. I don’t believe there’s anything else that is known to prevent reloading from work apart of what I already listed

(2 edits)

Bringing up this old topic again. I thought may be the new update to GMLive might fix the room reloading with my project, but the issue still persists with a room inside my game. It works on the very first menu room, where I can shift assets and it reloads real-time. However, with the scoreboard room (in my sports game), it does not update it in real time. Here is the output in the GM console window. 

[live][9/8/2023 11:56:12 PM] Calling live_call from gml_Object_oScoreboard_Draw_0:4, but live_update was last called 426 seconds ago. Did you deactivate/delete GMLive's object?

This is showing up every 5 seconds. I have not done anything different than what I did with the first room. I put room_set_live(room, true) in the room creation code and followed everything else that was in Shaun Spalding's video.

On the GMlive console I don't see any message about the Scoreboard room being updated, even though there was a message "updated rMainMenu" when the very first menu room was updated.

Okay, so when I run the game again nothing is updated on the GMLive console and the GMS console., even though the GMLive console says that 1 client is running.

Developer

[live][9/8/2023 11:56:12 PM] Calling live_call from gml_Object_oScoreboard_Draw_0:4, but live_update was last called 426 seconds ago. Did you deactivate/delete GMLive’s object?

Well, it says what it says - if you have re-imported GMLive, note that GameMaker might delete the GMLive object from your room(s).

As I mentioned after that (and I don't know why it output that even though I checked 5 times and everything was setup correctly), I quit the game and ran it again, and then there was no output in either the GMLive console or on the game console. So, I have no freaking clue what the heck is up with rooms in my game. I mean to my knowledge, they are no different than regular rooms. It works on the very first menu room of the game, so I know everything has been set up correctly, but does not work on any other "interior" rooms.

Developer

You can pause the game in the debugger and inspect instance list to see if obj_gmlive is still there, then check how you could be possibly getting rid of it if it isn’t there.

Hi, so it seems like I have found the "issue". It was my fault. I forgot that when I go the Scoreboard room from the Game room, I deactivate all the instances, and then reactivate them when I come back to the Game room. So, the obj_live was getting deactivated and it was not present in the Scoreboard room. Once I changed that such that obj_live does not get deactivated, then it started working as normal in the Scoreboard room. However, I have couple of questions. 

1. So, it seems like the position of a sprite that is being changed with GMLive in a room does not get "saved" when I leave the room and come back? I guess that makes sense, which is fine with me. At least, I can now see where the sprite needs to be and then compile the game again when I am satisfied with the position. 

2. So, I get an error when I try to use room reloading in the Game room, i.e. when I try to change the position of a dummy sprite which I put in the asset layer of the game room and then save the game. It's an error where it says that a game object does not exist in the room. I then look at the list of Instances in the debugger and it seems like most objects have not even been created in this room yet. Note, I dynamically create all the objects in this room. Is this happening because GMlive is trying to create these objects again while reloading? Because of course, none of this error happens when there is no room reloading.

Also, hopefully no one else hijacks this thread with their own issues like the last poster. I don't know how to delete that post. 

Developer
  1. If you mean through room persistence, that doesn’t exist for “live” rooms since everything gets created in Room Creation Code.
  2. I would need a sample project that triggers the error - obviously room reloading is made based on how GameMaker seems to handle rooms, so there can be inaccuracies in edge cases.
(1 edit)

not work anymore


############################################################################################

ERROR in

action number 1

of Async Event: HTTP

for object obj_gmlive:

Outdated GMLive server detected! Please update the included files from the extension.

 at gml_Script_gml_std_haxe_Exception_thrown (line 4524) -        try { show_error(l_message, true); } catch(_e) { l_natEx = _e; };

############################################################################################

gml_Script_gml_std_haxe_Exception_thrown (line 4524)

gml_Script_live_async_http_0 (line 12) -        if(ds_map_find_value(l_map,"version")==undefined||ds_map_find_value(l_map,"version")<106)throw gml_std_haxe_Exception_thrown("Outdated GMLive server detected! Please update the included files from the extension.");

gml_Script_live_async_http (line 296) -               if(live_request_guid==undefined)live_async_http_0(l_map);

gml_Object_obj_gmlive_Other_62 (line 1) - live_async_http();

Developer

Outdated GMLive server detected! Please update the included files from the extension.

Have you tried doing what the error message suggests?

it back work today , idk the reason , gml update today maybe idk lol thx xD