Pages

Thursday, June 23, 2016

Multiplayer Unit Movement! And More...

I haven't posted for a few weeks, but I have been busy working on Fragile and Durable. Besides multiplayer unit movement (we'll get to that), I worked on the following, each of which were not worthy of their own post:
  • Text fading over time
  • Improved Durable server logging and Fragile error handling
  • Very basic profanity filter (it replaces all cusswords with "drumpf", Donald Trump's ancestral surname) and other chat message filtration
  • Preparations for actual release of game client executable
  • Fixed numerous 3D block object scaling and positioning issues
  • Managed blocks better and added the concept of units and buildings
  • Added forward and backward camera strafing (as opposed to in and out)
On top of all of that, I added multiplayer unit movement!

Currently, each player is only "lerped" (linearly interpolated, aka. "moved gradually in a line") towards their destination, and they go right through each other and other buildings. This should be a very simple fix in the future though, to add at least a small-scale path-finding algorithm for the time being. Collision detection will also be extremely easy to implement. It's all just in the logistics.

Other than a bunch of bugs that I had to fix once I added this feature, several of the challenges I faced were:
  • Introducing a lot of different concepts to the game at once, such as: different types of units, different types of unit actions (i.e. move, move to build, attack, etc.), different types of buildings, different player colors, etc. (and all of this multiplayer!).
  • When a player logs on (which, for the time being, is the equivalent of joining in on the actual gameplay), if any other players, units, and buildings are already in the game, they all need to be sent to the joined player immediately, to sort of "catch him up". This is a very nice feature to have though, that you don't find in a lot of other RTS-ish games: mid-game joining. I demonstrate this working in the second video.
  • When a player logs off, all of his units and buildings need to be erased, both on the server-side (and thus for all of the other clients as well (depending on the mini-game)) and on the client-side.
But alas, it's all working (though there may be a small bug or two left...)! Forty second step complete:

No comments:

Post a Comment