IllustratorsLeak
Extremelyd1
Extremelyd1

patreon


HKMP Entity System

Almost two years ago, I posted the previous Patreon post. Although I announced that I was going to cut back on the number of posts here, I didn't really anticipate that I wouldn't write anything for two years. I apologize to the people that expected or wanted something to read here, and many thanks for the people that still supported me during this time.

Despite all this, HKMP has seen a staggering amount of development in those two years. Mainly, the focus has been on the so-called "Entity System", which has grown to be my most ambitious addition to HKMP yet.

For anyone not familiar: the entity system started out as a system that would synchronise enemies across clients. Such that each player would be fighting the same enemies and their attacks, animations, position, health, etc. would all be the same on each player's screen. Not only did this turn out to be much more difficult to develop, at times I felt that Hollow Knight (or Team Cherry for that matter) were actively trying to prevent me from making it. From inconsistencies to oddly named fields and methods, the codebase of the game is truly something to behold.

In the years I have spent working on this system, I have gone through a few iterations for this system. Most of these iterations failed due to a variety of reason. Either it would take an ungodly amount of time to implement, or it would not be possible to make due to constraints in the game. Nevertheless, these iterations have added to growing my understanding of the intricacies and quirks that make this game what it is. Two of these iterations stand out, which are called V1 and V2. These were iterations in which I was convinced enough to start working on them significantly and track their progress. As opposed to only working out the concept and its design.

In the entity system V1, the aim was to provide an implementation for each enemy in the game that dictated its behaviour and how to network the relevant details of its state. This proved a feasible solution to the problem when a few of these implementations were done. Unfortunately, it also proved that without any help, I would never realistically finish this system. One of these implementations already took a considerable amount of work and the game has around 150 different enemies for which such an implementation was necessary. Needless to say, this version wasn't sticking around.

After taking a break from the project and brainstorming a while for the next approach, eventually entity system V2 was started. The core idea in this version was to generalize enemies as much as possible in an attempt to have most of them working under a single implementation. This implementation would become quite complex and rather large, but it would account for the variability and inconsistencies between enemies. In contrast to V1, this new approach would be more network-heavy, which was a trade-off I was willing to make given that this version might see the light of day sometime.

I started working on V2 on June 9th 2022 and have been putting in a lot of work over time, but especially in recent months. The approach proved so successful in its initial testing that it has branched out to potentially become the vision I had originally: a true multiplayer experience. For this purpose, not only does the system synchronise enemies, it synchronises anything and everything in the game. This includes switches that are hit, toll gates that are paid, bosses that are defeated, walls that are broken, and so on.

In the attachments to this post I will put the latest development version of HKMP 3.0. Feel free to try it out and let me know what you think. If you have any questions, issues, or remarks, the Patreon Discord channel in the HKMP Discord is the best place to reach me.

Thank you all for sticking with me on this journey!

Comments

It's amazing to see how much this has come from when it started!

DwarfWoot

This has certainly been worth the wait. Thank you for your dedication to this hobby and this project

Lethal


More Creators