Hmm... perhaps assuming that the game would work fine after 3 months worth of software updates wasn't a wise plan. What did you do prior to the error appearing?
Edit: Okay, seems like the error occurs only in non-debug versions of the game on players joining. This will be fun.
The error happened when we tried to connect to each other. The ports were fine and such but in many occasions the above error popped up, or the game ends up crashing.
It turns out that `[@]` array read operator (`myvar = array[@index]`) is completely broken in GameMaker, just returning 0 both if reading out of bounds and if applied to something that isn't an array at all. Previously I was lucky (or careful enough) to not have made any missteps with this (thus not even knowing of this behaviour), but somewhere in the recent changes a bug was introduced, so GM' runner gets a 0 instead of showing an error, then it passes 0 as the index to one or other data structure management functions, and then everything spectacularly explodes before you could even blink.
I've re-enabled an older (working) version of the game for now while I'm looking over the game code to change everything to use `[]` operator for reading so that I can locate the actual source of problem.
Do you have the source available? I was on and off working on a two player Super Crate Box since the source became available and just found this. I want to see how you've done it. Thanks!
This is based on Humble Bundle version of the game source code. The source for my edited version currently is not available (quite rushed, and, as it turns out, largely working by series of coincidences), and it doesn't seem to be legal to redistribute the edited sources for anything from the bundle but Spelunky (which was already open-source).
But basically, for local multiplayer, you just need to have each projectile store the ID of the player that fired it, and change things like "Player.x" to get that from the correct player (nearest for AI, owner for bullets, all for conditions). Then it's just lots of small edits like making laser guns not fly out of all players when firing.
I ended up changing a substantial amount of code in the game, but that was largely related to online multiplayer, and unneeded if that is not your goal.
← Return to game
Comments
Log in with itch.io to leave a comment.
ERROR in
action number 1
of Async Event: Networking
for object obj_dp:
Wrong gml type for buffer type
Hmm... perhaps assuming that the game would work fine after 3 months worth of software updates wasn't a wise plan. What did you do prior to the error appearing?
Edit: Okay, seems like the error occurs only in non-debug versions of the game on players joining. This will be fun.
The error happened when we tried to connect to each other. The ports were fine and such but in many occasions the above error popped up, or the game ends up crashing.
It turns out that `[@]` array read operator (`myvar = array[@index]`) is completely broken in GameMaker, just returning 0 both if reading out of bounds and if applied to something that isn't an array at all. Previously I was lucky (or careful enough) to not have made any missteps with this (thus not even knowing of this behaviour), but somewhere in the recent changes a bug was introduced, so GM' runner gets a 0 instead of showing an error, then it passes 0 as the index to one or other data structure management functions, and then everything spectacularly explodes before you could even blink.
I've re-enabled an older (working) version of the game for now while I'm looking over the game code to change everything to use `[]` operator for reading so that I can locate the actual source of problem.
Do you have the source available? I was on and off working on a two player Super Crate Box since the source became available and just found this. I want to see how you've done it. Thanks!
This is based on Humble Bundle version of the game source code.
The source for my edited version currently is not available (quite rushed, and, as it turns out, largely working by series of coincidences), and it doesn't seem to be legal to redistribute the edited sources for anything from the bundle but Spelunky (which was already open-source).
But basically, for local multiplayer, you just need to have each projectile store the ID of the player that fired it, and change things like "Player.x" to get that from the correct player (nearest for AI, owner for bullets, all for conditions). Then it's just lots of small edits like making laser guns not fly out of all players when firing.
I ended up changing a substantial amount of code in the game, but that was largely related to online multiplayer, and unneeded if that is not your goal.
Show post...
hi
Genius
God bless you and the internet.