Hi. I have bunch of game maker games that I need to run in HTML5 runtime. All of them works perfectly in native runtimes, but no one works in HTML5. I start dig into it, and found following differences between runtime.
1.
var a = 1;
a[1] = 0;
show_message("expected [0,0] actual " + string(a)); // html5: [ undefined, 0 ]
Note: in my case game uses assignment to initialize array of specific length. In native runtime array is created and filled with zero. In html5 - array is created but all elements except last it is undefined, that breaks logic of game.
2.
var b = 1;
show_message("expected 0 actual " + string(array_length(b))); // html5: undefined
Note: Passing non-array element in array_length is not valid(?) but works. On native it return zero, but on html5 it return undefined. Which break logic all over the game.
Description
Hi. I have bunch of game maker games that I need to run in HTML5 runtime. All of them works perfectly in native runtimes, but no one works in HTML5. I start dig into it, and found following differences between runtime.
1.
Note: in my case game uses assignment to initialize array of specific length. In native runtime array is created and filled with zero. In html5 - array is created but all elements except last it is undefined, that breaks logic of game.
2.
Note: Passing non-array element in array_length is not valid(?) but works. On native it return zero, but on html5 it return undefined. Which break logic all over the game.
-- Project link
Expected Change
The behaviour of HTML5 VM and Native VM should be same.
Steps To Reproduce
How reliably can you recreate this issue using your steps above?
Always
Which version of GameMaker are you reporting this issue for?
2024.1100 (Betas)
Which platform(s) are you seeing the problem on?
HTML5
Sample Package Attached?
Sample Project Added?