1.0.65 - 2022.11 compatibility and HTML5 tweaks


2022.11

  • API definitions are now updated for 2022.11.
  • Underscores in numbers (1_0001000) are now supported.
  • Binary literals (0b1015) are now supported.
  • Still backwards-compatible with 2.3.7 though!

HTML5

  • I completely rewrote the way the extension acquires functions on HTML5 target to better account for the fact that these are often missing.
  • I added workarounds for a few HTML5 runtime issues (e.g. real(0) and int64(0) are considered to be different values when used as ds_map keys, and method_get_index returns who-knows-what sometimes..?)

But also

I recently updated shader_replace_simple to support x64 Windows runtime, so you can live-reload your shaders again.

Files

[archive] GMLive (for GMS2.3).yymps 895 kB
Version 1.0.65 Dec 01, 2022

Get GMLive.gml

Buy Now$29.95 USD or more

Comments

Log in with itch.io to leave a comment.

Minor bug - array_sort doesn’t seem to support true/false for the sortTypeOrFunction argument on live reloads

Apparently true and false are now the actual bool type, and array_sort wants that very specifically. bool(true) works for a workaround.

(1 edit)

I'm consistently getting an issue in the latest release where enums are being read as variables? It happens any time I make a change to an event that contains an enum reference.

[live][12/6/2022 3:21:34 PM] Runtime error: [error] `instance#ref 105090(obj_drone_silo)` (instance of obj_drone_silo) does not have a variable `drone`.

And checking the code, it's just a simple switch statement where I do this...

switch (state) {
    // IDLE
    case drone.idle:
    break;
}

Any idea why that's happening? Can I bypass it somehow?

What does the declaration of your enum look like? (assuming that’s an enum)

enum drone {
idle,
collect,
deposit
}

Try moving that to a separate script and restarting gmlive-server. If that solves it, send me a copy of the original script that had the enum in it

(1 edit)

Yeah that worked! I delare all my enums in the Room Creation Code for my first room r_Initialize. This is what's in there currently:

// Set anti aliasing to 0 for pixel art and turn on vertical sync so we don't get render lag
display_reset(0, true);
// Setup player states...
enum playerLoadout {
laser,
printer,
guns,
plows,
watering_cans,
seed_spreaders,
harvester,
logger,
miner,
construction_tools,
length
}
enum mods {
laser_beam,
force_field,
seed_spreader,
hammer,
length
}
enum droneTask {
unassigned,
ore,
organics,
crops,
defense,
length
}
enum menus {
pack = 0,
catalog = 1,
//equipment = 2,
length = 2
}
enum effect_type {
fire,
asteroid,
rain,
electro,
wormhole,
portal
}
enum key_indicator {
up,
right,
down,
left,
bumper,
trigger_l,
trigger_r,
stick,
key,
button
}
room_goto(r_Menu);

Oh, the server doesn’t currently check rooms for enums/macros - that’s kind of expensive (I mean, a little less expensive now that tile arrays in rooms are compressed, but still!). I guess I could check room creation code very specifically since it’s named predictably.

show_debug_message is giving an error on live reloads about requiring at least 3 arguments.

Ah, of course - the signatures in fnames are all wrong. You can use live_function_add to override it to be show_debug_message(str, ...)

Just updated and have the same issue but I'm not sure how to implement this as a solution.  

From the documentation -> "Note that changing the API only affects newly compiled live code / snippets - you should perform such operations on game start."

Can you please tell me the exact code to use and where to place it?

(1 edit)

Add

live_function_add("show_debug_message(str, ...)", show_debug_message)

to the end of obj_gmlive’s Create event.

Bingo! Thank you very much.