Devlog #6 - Enemy Spawning & Syncing


Spawning & Animations:

Looking back to the diagram I made in Devlog #3, I came to the conclusion that enemy spawning and logic would be on the Host and the hit detection for each player would be on the individual clients. Firstly, the basic implementation of having the enemy locations and spawns synced was the same process as with the items. However, the enemies additionally need to move, which means that they will need to be animated, something that I had not accounted for in my plan. Obviously, the initial solution that I came up with was to just let the enemies animate themselves on the clients didn't work as the logic for all of these is disabled and it wouldn't be a small amount of work to change that. Looking for another solution I landed on giving each of the enemies an animation sync component witch means that there is a lot more information being sent to the clients but it was a very easy solution that worked really well. I'm really happy with my problem solving process. I stepped back and evaluated the different options that I had, and ended up landing on one that balanced the time investment with the effectiveness incredibly well for these circumstances. It demonstrates the importance of adaptability in the game environment and that there is not a one size fits all solution to problems in development.


Hit Detection:

The hit detection being dealt with on the clients just worked easily with some small tweaks to ensure the host was not also calculating the damage. However, there are a couple of issues with the UI not updating how you would expect and after a few hours of trying to find the cause I decided to leave it there for now and add this to the Trello to deal with another time. Again, recognising that I could solve the problem better if I step back for a while and let the problem sit for a while.


Edit (13-03-25): Sorry this is out of order, I forgot to hit the Publish button.

Get Candy Corporate

Download NowName your own price

Leave a comment

Log in with itch.io to leave a comment.