Thursday, 22 October 2015

Pong Game Development

As a starter to Unity we were given a two-player Pong game template for us to analyse, but with certain aspects purposely broken or tweaked for us to modify. For example, the controls for player 1 were Q and Z to move the paddle up and down, rather than the conventionally used W and S that most PC games have as their standard control scheme. I modified the values of the C# code in MonoDevelop to change the keybindings, and the controls work much better for both players now.
The Game and Scene view of the modified game.
Likewise the original colour scheme for the game were mainly washed-out and hard to see colours like a greyed-out green. I changed this to make each object standout and be instantly recognisable, such as making the ball a bright green, and the bats red for player 1 and blue for player 2. This is to match the conventional player-coordinated colour schemes used in many local-multiplayer video games across the industry, such as the Mario Party series. It's gotten to a point in the industry where red and blue are standard player 1 and 2 colours, where even PS4 remote control light bars switch their LED light to match the standard colours and let the player instantly know what player they are (without having 1-4 dots light up on a Wii Remote for example and be much more visually pleasant). I also changed the walls to a light cyan colour so they're visibly clear to see, as the default dark colour blended into the background too much.

The default game also moved at a slow pace and the ball commonly got stuck behind the bats. To remedy this I moved the bats further back towards the wall so the ball couldn't get behind them. I then tripled the ball's vertical movement speed but kept the horizontal movement (code extract thisBody.AddForce(new Vector2(forceAmnt * 150, 50));), this was to help prevent the ball constantly bouncing up and down when moving sideways at a slow pace, bogging down the gameplay. I also upped the force of the bats to push the ball faster and stop the ball naturally slowing down due to friction.

No comments:

Post a Comment