Netcode
Until now, the netcode operated under the assumption that nothing happens until all clients are connected. Everyone receives the map data at once, and the reliable messaging always starts on sequence 0.
I need clients to be able to join games already in progress. The new process looks like this:
- Client spams the server with connect packets.
- Once the server receives this packet, it saves the current sequence ID as the starting sequence for that client. The client needs to receive every message starting with that ID.
- The client receives these messages, but does not process them yet. It stores them in a buffer.
- Meanwhile, the server is also sending map data via an entirely separate reliable messaging channel. Normally, all reliable messages are sent to every client, but the map data is only sent to this specific client.
- Once all the map data has been transferred, the client processes the messages it cued up while loading the map, and notifies the server that it's done loading.
- The client is now caught up to the latest sequence ID, and things proceed normally.
Minion attack animation
Previously, when Minions attacked, they would just stare at you until a bolt projectile suddenly materialized out of their forehead. But no more! Now it materializes out of their hand. This changes everything.
New character model
Parkour mode is back, and with it, a new player model.
(actually it's just a modified version of the player model from my last game)
The neat thing is that it lines up perfectly with the Minion model, so I can play every animation on both models.
Slide attack
I'm experimenting with some interactions between the player and minions in parkour mode. So now you can slide into a minion to take him out:
Of course you have to gain a certain amount of momentum to make the attack effective. I'm still tweaking the movement code to make this feel good. One problem with my last game was that you could reach top speed just by holding W, and there was no canonical way to accelerate past that (although speedrunners found a number of exploits). I'm trying to fix that in this game.
Minion melee attack
Minions became awkward when the player got too close; they were still firing projectiles as if the player was far away. Yesterday I added a melee attack:
That's it for now.