HKMP Synchronisation improvements
Added 2024-09-07 22:14:25 +0000 UTCLast month I released the latest development version of HKMP 3.0 to the Patreon. A few of you have taken the time to check it out and seemed pleased with its capability. This post will focus on the bugs that you encountered while playing and some improvements I've managed to make in the meantime. All in all, HKMP is getting closer to being the fully functional multiplayer mod I envisioned long ago.
Thanks to a lot of you playing the development version and especially to the people streaming their playthrough, I've managed to get a nice long list of bugs that managed to fly under the radar up until now.
One of the most obvious bugs was related to hosting a server on a new save file. While I mostly test on existing save files that have specific setups, I most definitely also tested starting a new save file every once in a while. The reason that I never encountered this bug before is because it does not happen with the "QoL" (Quality of Life) mod installed. The QoL mod significantly speeds up scene transitions and loads, and automatically skips or lets the player skip cutscenes. In the context of starting a new save file, this meant that the bug didn't trigger. Luckily, this has since been fixed.
A couple of other bugs came to my attention through a Youtube stream by Relyea and Primacon. Eager to play HKMP 3.0, they jumped into a new save file to speedrun the game as soon as possible. Unfortunately, HKMP had other plans and foiled their plans a bit by soft-locking both Relyea and Primacon a few times with a stag bell. While this sounds completely ridiculous, there is a perfectly reasonable (albeit a bit complex, and unintended) reason for this behaviour.
HKMP 3.0 aims to synchronise anything and everything (in the realm of possibility) in the game. This includes synchronising which stag stations have been unlocked. Therefore, when a player unlocks a stag station (by paying the toll gate and getting the bell), the client will network this unlock to the server. When it is networked to the server, it is subsequently broadcast to all other players. That way, whenever another player enters the stag station, it will be unlocked for them as well.
So far, nothing wrong. However, there is another system at play that messes things up. Whenever two players are at the stag station before it is unlocked and one of the players (player A) decides to unlock it, naturally it should immediately unlock for the other player (player B) as well. The system responsible for this has custom implementations for each interaction in the game where this happens. For example, stag stations, breakable walls that open up into other scenes, toll gates, etc. The problem arises with a small issue on how these networked changes are handled. When player B receives the changes they'll trigger the station toll box to unlock as well and somehow think that they payed for it themselves, therefore networking the unlock again to the server. When player A receives the unlock again, they were already unlocking the station and it triggers twice, soft-locking the player.
The last few bugs were related to a couple of bosses that were not properly handled due to a combination of Team Cherry spaghetti code and my inability to still not expect Team Cherry's spaghetti code. For example, the Dream Warriors in Godhome are somehow different to the Dream Warriors out in the world. Although they behave completely similar, their code (FSMs) are slightly different.
Another boss that did not function properly was Grimm. The code for the Grimm boss fight utilizes an internal mechanism called "FSM templates", which either hasn't been used anywhere else or not caused an issue so far. However, for Grimm this meant that most if not all of its attacks did not get properly registered. Players joining the boss fight would not see the bat attack or the fireballs from the upward slash or the pufferfish attack.
Of course, there are also a couple of outstanding bugs that I have not been able to fix yet. The following is a list of known bugs/issues:
Hosting a server with Steel soul or Godseeker mode will not put joining players in that same game-mode.
The Radiance fight will not synchronise hazard respawns. This means that if a player falls in the void during stage 2 or stage 3 of the fight, the player might respawn in the void until they eventually die.
That's everything I have for now. I'll include the new development build (3.0.1) in this post for everyone to check out. If you want to do a playthrough with it, feel free. Hosting on new save files should work and you hopefully shouldn't be getting soft-locked again!
If you need help with anything regarding HKMP or want to delve deeper in any topic regarding the development of HKMP, feel free to link you Discord account to Patreon and join the Patreon exclusive channel. I'm always happy to talk whenever I have time!
Comments
Como se habilitan los teams?
Diego Martinez
2025-11-17 21:33:30 +0000 UTCHey, thanks for the insight! I've actually released a new development version in the Discord that aims to fix this exact issue. Feel free to check it out and let me know what you think!
Extremelyd1
2024-09-15 06:59:17 +0000 UTCHey there, really glad to hear that you were able to work though a lot of these bugs. There was one other thing that was a major break that was not mentioned. Primacon and myself both could not enter Slys house (near Salubra). Looking forward to playing the mod again after the major updates. Thank you,
Andrew Relyea
2024-09-15 00:35:44 +0000 UTCIt's incredible to see the amount of progress that you've made here, especially recently, as I'd given up on ever seeing a functioning entity sync system. Great work, and best of luck with the future bugs that I'm sure people will find :grublove:
Lethal
2024-09-07 22:23:07 +0000 UTC