Mar

11

I’ve fixed the rejoin issue I discovered last week by making a custom connection negotiation system that doesn’t rely on messages sent reliably and that’s handled at a lower application level than I used  previously.

I noticed that player health values weren’t synchronized when clients had packet loss so I added an option to choose if an objects attribute should be sent as a reliable message when it has changed.

I also worked on the project postmortem and milstone 3 presentation.

Mar

4

I got projectile collisions to “work” using the previously mentioned “less-than-elegant” solution. It involves fetching all physics entities within a certain radius and if they belong to a player entity, that entites health attribute is then lowered by a certain amount. Only the server/host checks for projectile collisions and as soon as one occurs the involved projectile is removed from the game.

I’ve worked on a text-based user interface for all states. In the main menu state it shows which keys you need to push to choose if you’re going to host or join a game and it is used to allow you to type the ip of the server you want to join. It’s not particularly user-friendly but makes it easier for me to test things.

In the battle state is shows the players that are in the game and their health. The health values that are shown are taken directly from the player entities that are synchronized using my object views and distributed object system.

I also added a game over state that all players enter when there’s only one player left alive. At the moment it only shows “Game Over” and tells you to press escape to return to the main menu.

While testing the game I noticed that the client was unable to rejoin the server if it crashed or was restarted. When the client restarts it’s packet sequence numbers are reset while the servers aren’t. This causes the server to ignore messages sent by the client since the client sends packets with sequence numbers that have already been received by the server. I’ve started working on fixing this issue.