I don’t have that “Download” button on https://yellowafterlife.itch.io/gamemaker-live/devlog/692926/20242-minifix…
Edit: OK, I see it, it’s on main page ( https://yellowafterlife.itch.io/gamemaker-live ), not in linked Development Log.
I don’t have that “Download” button on https://yellowafterlife.itch.io/gamemaker-live/devlog/692926/20242-minifix…
Edit: OK, I see it, it’s on main page ( https://yellowafterlife.itch.io/gamemaker-live ), not in linked Development Log.
GM 2023.1 introduced singletons:
function foo() constructor {
static bar = 1;
}
foo(); // initialised at least once so static is set
/// now you can do this anywhere:
foo.bar; // returns 1
However, GMLive (yet) doesn’t support this syntax. There’s however very easy way to bypass this issue.
Instead of foo.bar
you need to write static_get(foo).bar
- as in fact while compiling, GM translates former to latter, which means only latter is used in compiled games.
Have fun playing with new syntax!
As GMS Feather is still in it’s early stage and reports lot of false-positive errors with GMLive, I would like to propose adding // Feather disable all
comment on top of every GMLive GML script, so we won’t get any notices (as for now there’s 1000+ errors/warnings/notices detected by Feather in GMLive).
Since we cannot re-distribute GMLive source code, but fixing for 2022.2 only requires to remove list of outdated GML functions (so that part can be shared), I’ve prepared a .patch file (which can be applied using git, or by copy-pasting without +/- characters in first column) which fixes GMLive for 2022.2 release.
You can get it here:
https://gist.github.com/gnysek/23e3b3c1d082fe7ffe0c6b734617599f
Russell wrote on forums that Tuesday (1st Feb) beta version will have tons of fixes for Feather, so I will wait with reports. Generally IMO best solution would be to mark most of GMLive scripts and variables as ignored, as they don’t need to be exposed (except those that are documented, like live_call() etc.), so that requires YYG to make those features stable enough to start thinking about it (as some things are bugs yet, but are not completed at all).
Seems that projects with GMLive aren’t running in GMS 2 2022.1.464 because of Feather feature. Of course since Feather is in alpha stage and have bugs even on smallest possible projects, this seems to be Feather issue rather than GMLive and for now there’s no sense in fixing anything on GMLive side, I’m rather writing this post to inform, that if you want to test Feather, and project loading hangs - this might be the cause (probably too many code, or it crashes on some specific syntax). Further betas will for sure solve it.
Edit: as for now, leaving GMS beta version for 10-20 minutes seems to finally load project.
In fact, nullish operator is little broken:
// nullable operator test + ds_map accessor
show_debug_message(list[| 1] ?? "not found"); // crashes
show_debug_message(map[? "test"] ?? "not found"); // crashes
I’ve reported it during 2.3.7 beta ASAP after this feature was added, but seems that they don’t want to fix it yet…
So yes, it’s a bug in latest beta runner, that using “vars” as arguments in functions when creating a struct causes errors.
Also, seems that actually 2.3 causes a random order for scripts (especially on import) no matter what is their order in resource tree, so there’s a high probability that divided version of GMLIVE need to be put in some functions, so only one script will define order in which they are created. But that’s to check after they fix first bug, cause there’s no way to check GMLIVE latest version at all now in latest beta.
You’ve got info about it in docs, but you need to remember, that it in fact will open a security breach in your game, as basically everything can be changed by users if you leave GMLIVE in final game. Also, generally it will cause a lot of FPS drop quickly.
So, while it could be used that way, it’s not optimal and safe in any way.
I also have problem with GMLiveAPI::live_preinit_funcs()
, line 17, var l_m={name:l_name,func:method(undefined, l_scr),used:false}
.
Error message is: Variable struct.l_scr(100633, -2147483648) not set before reading it.
.
Changing it to
var m = method(undefined, l_scr);
var l_m={name:l_name,func:m,used:false}
seems to fix the issue (it might be a bug that method()+var can’t be used when creating struct).
For problem with wrong order of script execution, as for now I’ve manually deleted all entries in YYP which were starting on "GMLive
and were about scripts, and I’ve manually copied the same order that was in your package.
Edit: seems that these are caused by using runner other than from public beta channel, so it’s worth to wait for next official beta.
I’m getting error when trying to run latest version:
at gml_GlobalScript_GMLive_program (line 263) - if(live_enabled)mt_gml_program.h_constructor=gml_program;
############################################################################################
gml_GlobalScript_GMLive_program (line 263)
Seems that issue happens cause GMLIVE scripts aren’t executed by order in which they are in resource tree, but by the order they are in Project.yyp, which is… random. So, in fact error messages will also be random, depending on how GM will put those files among YYP. Deleting extension and importing it agan caused totally different order in my case.
My advice:
I’ve got one object which have around 10 nested for-loops inside, and I’m getting 2FPS cause of it, so above solutions helped me a lot.
Here it is: https://gmclan.org/up23_18_gms_23_GMLIVE_crash.html (with GMLIVE cut, need to be re-added).
To crash, I just need to run it and wait about 60-120 seconds (you can watch memory usage in Task Manager, for me it crashes around 1.5 GB used).
This is how memory usage looks on my side, the moment of crash is easily visible: https://i.imgur.com/PP5RVF6.png
Edit: here is a chart from GM debugger for above example:
I’m not sure that it’s possible at all, but I’m often using “named instances” in room editor (giving them custom name instead of inst_XXXXXX with random 8-digit HEX).
However when using them with GMLive, I’m getting:
Runtime error: [error]
instance#100083(obj_xxx)
(obj_xxx) does not have a variableinst_my_custom_name
Is it possible to add this feature ?
From my experience, as this happens often to me - it seems to happen when there are for-loops with temp variables in code, and you update it several times (but it crashes randomly - sometimes after half minute, sometimes after 10 minutes). As I'm unable to find one easy way to reproduce it, I didn't reported it yet, as I know what to report in fact... this error message doesn't help.
I've found some issue in console logs, but I don't know when it exactly happens:
Runtime error: [error] Variable <unknown_object>.i_id(101072, -2147483648) not set before reading it. called from vm:field_on_field_set (line 13064) called from game:anon_gml_thread_gml_GlobalScript_GMLive_396240_gml_thread_gml_GlobalScript_GMLive (line 11248) - var l_ar1 = vm_v2_gml_thread_v2_handlers[l_act.__enumIndex__](l__gthis, l_act); called from game:anon_gml_program_gml_GlobalScript_GMLive_120080_gml_program_gml_GlobalScript_GMLive (line 2825) - l_th.i_exec(); called from game:live_call (line 10204) - var l_th = l_pg.i_call_v(l_scriptName, l_vals, false); called from game:obj_event_questionplate_Step_0 (line 3) - if live_call() return live_result; called from obj_event_questionplate:Step_0[L40,c22]
On line 40 in obj_event_questionplate there is:
creator.wait_for = _cutscene;
where "creator" and "_cutscene" are variables with ID of existing objects (_cutscene is just created few lines before).