I've just found a strange bug. In my game, on room creation, I'm assigning all layers to global variable, to "cache" them, and I never then add/remove any layers, they remain same.
Also, there's an object, which in draw event changes layer. There's bigger logic in my game, but in simplified example this can be just first layer.
When I put at least two instances of this object, my game crashes (I'm getting black screen, or no game at all). When I added about 20 instances, it hanged my PC for minute...
Code is very simple:
Object 1 - Room Start:
global.layers = layer_get_all();
Object 2 - Draw:
x = (x + 5) % room_width;
draw_text(x,y,"This text should go to right and wrap");
layer = global.layers;
Then just put one Object1 and several Object2 instances in room, and game should crash.
Example is here: https://gmclan.org/up23_18_gms_23_layer_bug.html
Please sign in to leave a comment.