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.

Be Sociable, Share!
Comment Feed

No Responses (yet)

You must be logged in to post a comment.