Day 9: Easy Pong 4 (Coroutines & Simple UI)

Today we look at how to extend our functions beyond the Update loop by allowing them to pause and resume execution using “Coroutines”. We also take our first look at Unity’s UI system, and use these together to create a “Get Ready” state to prepare our players for gameplay. Get Ready!!! Part 1: Coroutines Incontinue reading

Day 8: Easy Pong 3 (Enumeration & Finite State Machines)

Today we build out the flow of our game logic – setting up the game, starting a round, identifying a scoring event, and starting the next round. There are many steps to consider and so we visually map them out into a flow diagram that we will use to build our “finite state machine”. We will also use an “enumerated type” to create an easy-to-read variable to hold our current state, and use the “GameObject.Find( )” command to allow one object to easily locate another. Let’s go!

continue reading

Assignment #2: Finish Easy Pong

Your assignment is to complete our Pong game by placing and managing the remaining UI components for scoring and messaging, adding the missing steps from our state outline, and customizing the game with your own personal touches.  There are five required parts to this, and two that are optional. Completing the required will get youcontinue reading

Day 7: Easy Pong 2 (Collisions & Sound)

Today we take a look at collisions – when objects bump into one another. These are some of the most commonly used events because so much of our game mechanics depend on whether or not two things have touched. We use them to determine if a hit was successful, if an enemy has touched us, if we are on the ground, if we should be making a sound. Understanding how collision events are generated and how to interpret them is incredibly important. And today, we will use them to generate game feedback in the form of sounds.

continue reading

Day 5: Hard Pong Collisions

In our latest class, we established our collision and bouncing system using a two-step process:

  1. Identify whether or not our ball was still inside of the field of play
  2. If we are outside of the box, figure out what our position inside should be and move the ball there.

To use this, we will run a number of checks and scenarios using the “if/elseif” and “switch” conditional statements.

continue reading

Day 4: Hard Pong

In today’s class, we discussed the principles behind what makes an “animation” – the rapid succession of images that create the illusion of movement. We discussed the difference between display rates of monitors (refresh rate) and game engines (frame rates), and covered a little bit of “vector math” which we will use to position and move objects.

continue reading

Assignment 1: Paddles

For our first week, we will keep things relatively simple – you will add the two features outlined below to our game. Try to get these working to the best of your ability. For this first assignment you will be graded on the attempt rather than the execution.

continue reading

Day 3: Code Basics & Hard Pong

In class today we covered some of the basic rules and concepts of code, such as how to declare a variable, the importance of type, and why you should never confuse = (assignment) with == (is equal to).

Next we started out making our own version of Pong. We used Unity primitives to create a playing field, changed the color of the playing field with a material, and set the camera position to give us a top down view.

(Slides and Zipped project from today’s session will be available on the course Box folder)

continue reading