2025-05-11 Multiplayer!
Multiplayer!
published: Sun 11 May 2025Finally implemented multiplayer! There are a ton of bugs to still squash, but I have two morlinnians wandering around punching thaxes! I also verified with some technical trickery that internet multiplayer is possible.
As part of all the code rework I needed to get multiplayer to actually function, I got a few other nice features. As usual, only the more visible/important features are mentioned here, with plenty of reworks that are not as immediately obvious hidden in git logs.
- The "what should this actor be doing next frame" decision logic is now being handled by a BrainComponent, which will make switching it out for other types of decision logic easier. Currently, I'm subclassing BrainComponent (to MobAIComponent and PlayerInputComponent), but I'll probably change that implementation later to use Node composition instead.
- Reworked how the thax behaves so it will target players based on a vision cone and wander around if it sees no players. The targeted player is indicated by a connecting line if debug is turned on.
- Changed how the hurtboxes are enabled/disabled, which will make it easier to make this more consistent with future attacks.
Here's a quick gif of two local copies of the game playing together: