There’s been further work this week on various gameplay elements such as multiple balls and special moves.

Multiple Balls

This week I added support for multiple balls in play at the same time. Eventually I’d like to add a selection of different game modes that are not constrained by standard tennis rules and one of the ideas I’ve got requires several balls in play. Also, I needed to add this functionality for a special move.

Allowing more than one ball caused a bunch of problems, many more than I anticipated, and I ended up rewriting loads of core code for handling the ball. One of the major problems was selecting which ball the player would attempt to hit if several could be reached at the time the player starts to take the shot.

In the end I chose to select the ball that requires the least amount of running to hit, if two balls have roughly the same distance it will pick the ball that will pass the player first. It’s far from perfect though, if the player is in between two balls, closer to one but running towards the other it can appear to select to hit the ball that you didn’t really want based on the above conditions.

It’s going to take several revisions to get this feeling just right.

New Special Move – Split Ball

With the code now refactored to support multiple balls I added a new special move where the ball can split into multiple balls.  Once triggered, the ball will travel for a short distance and then will be hit by a lightening effect.  Two new balls are then created at the same location and targets for these balls are calculated to the left and right of the original ball. Lastly, two out of the three balls are marked as fake balls, these move like normal but disappear if you try to return them. When you attempt to return a ball you have a 1/3 chance of hitting the right ball.

For debugging purposes I made the correct ball have a different trail to the other two.  I may end up leaving this in as otherwise it feels a little unfair when you hit the incorrect ball!

New Special Move – Punch

A few weeks back I started work on a quick special move idea: punch ball.   I got around to adding this so the player can trigger it this week.  The idea is pretty simple, the ball inflates and is returned like it’s been punched, it has a large amount of acceleration when hit but then slows down.  When the player attempts to return it they get a slight push back applied.

Out of all the specials I’ve added so far this is my least favourite as it didn’t really turn out as planned.  The penalty for hitting the special doesn’t seem to affect the player that much, ultimately this may be one move that doesn’t make the final cut.

Video

Here’s the two new special moves in action.

Next Week

  • Work on character ideas and designs
  • Shield special move
  • Powerups