Making a Game – Report 17

24 Sep

What I did

First thing this sprint was the “quick fix” to get the character’s rotations synced correctly.  It turns out that was a bit more tricky than I thought, with me using the wrong method to point towards a point 3 times.  For anyone interested, the correct method in the end was “Quaternion.LookRotation(pos2 – pos1)”.  I had to tweak it a bit too if your final move was going down a ladder, as it left a player facedown on the ground.  Unless a bug presents itself there’s nothing left to do with this one now.

After a fair amount of roughness, play now switches between players correctly.  I had a lot of trouble with this one, with it refusing to sync player names correctly, but it’s finally working. In the end, the trick was to realise that my game logic only cared if you were the current player, and beyond that it simply didn’t matter.  I had some issues where it was changing players, but not changing teams, and another when it was changing teams, but not players, but both of these have been resolved as well.

Finally I made it so that when play switches away from you, all the turn-based UI buttons are hidden from view.  You can still move the camera around, look at the controls, exit the game, etc (when the buttons work that is), but everything you shouldn’t be able to do, you are now prevented from doing.

What I didn’t do

I wasn’t able to start on synchronising health levels and character deaths. In fact, when doing some testing it seems these values aren’t even being updated on the div local machine. Quite a bit of work to do here.

It’s not enough to show a character lose health, you need to see the shot taking place. I’m going to create a small package containing the necessary information (character shooting, character shot, damage, hit success, etc) and that as a one big update when the Fire button is clicked.

When that’s finished I’ll be at a point where I can start working on the main game mechanics again. The first thing is to get the game over screens to show correctly, whether it’s a success or fail. When I’ve got something more interesting to display I can turn this screen into a battle report, showing the immediate and long term effects of the battle (injuries suffered , loot found, experience gained, etc).

Finally I’ve still got 3 videos left to watch in the UNET tutorial series I’ve been following, totalling 40 minutes. Shouldn’t take too long, and the next one deals with writing a customised HUD for the network manager, which I’ll need to do before too long as the default one isn’t very pretty.

What I will do next time

As mentioned above, I’ll be synchronising characters health levels and whether they’re alive. I’ll also rewrite the firing methods to send a package over so both players can watch the shot take place at the same time. Each player will be taken to the correct game over screen after finishing the game, and I’ll watch the last few UNET tutorial videos.

Currently the movement circle is shown even when you’re not the current player. It serves no purpose so it should be hidden.

Additionally I’ve noticed that the movement circle is reverting to its original size after you’ve confirmed a move. I’m not sure what’s broken here, it’s either the code for resizing the circle, or the movement mechanics. Either way, it needs fixing.

When you’re the inactive player you’re not alerted when your turn begins. For now I’d like to move the view to the character you’re controlling when this happens. I need to do something more than this, but I’ll think about that a bit longer before I try something with it.

Even though they can’t move anyone, the inactive player can still place movement waypoints. Should just be a case of adding an extra check when you try clicking anywhere to make sure you’re the active player.

As always, you can see my current Trello board here.

Leave a comment

Posted by on September 24, 2015 in Making a Game


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: