When we play a board game, one of the first things we do is read the rules. In order to play a board game properly, we need to understand all the rules, and they're usually all available for us at the start of the game. If we didn't know and understand the rules of the game, we wouldn't know if someone was cheating, or even what the goal of the game might be. In video games, it's much different. Most people start playing a game without reading any instructions, and they discover the rules by exploring the game and trying out different actions. They try out things with their character to answer questions like, is this ice thick enough to support my weight? Are these dragons friendly? Can I jump to the other side of that chasm? They don't need to know the rules, because the game acts as a referee. It knows all the rules and makes sure that none of them are broken as the player explores the game's world. For the purpose of this class, a rule is anything that defines what happens in the game and isn't a player's input. There might be a rule that says the character can jump five feet. Another might say, the character cannot walk through walls. That's an obvious rule, but it's one that a designer would need to define. Anything that needs to happen, or needs to not happen, will have to be explained in a rule. And that can be a lot of rules. Let's go over some rules you might see in a video game. I'll use Pong as an example, since it's a simple game that most of us are familiar with. My friend and I studied Pong for a while and tried to figure out every rule we could think of. It took awhile, and I think we found a bunch. [SOUND] To make things a little simpler, I'm gonna start off with a few rules that define the world where Pong happens. And after that, we'll go over the actual gameplay rules of Pong. When I talk about world's rules, I'm talking about rules that define the way a game's world works. What it looks like and how a player might interact with the objects in that world. When I talk about gameplay rules, I'm talking about rules that define a game in the way it's won or lost. Here's a few rules from Pong that would fit into the category of world's rules. Each player controls only one paddle. The paddles can only move up or down. The paddles cannot move above or below the screen. The speed of the ball is affected by the speed and direction of the paddle it hits. There's a bunch of other rules, but we don't need to list every one of them. The point is, even though Pong is a simple game, there are quite a few rules that govern the world in which it takes places. It's another reminder of why we start of with simple projects when designing games. These rules we just listed help describe the world in which our game takes place. They help keep the objects in the world organized in a way that makes sense to the player. For instance, if we didn't have the paddles cannot move above or below the screen as a rule, the player might accidentally move the paddle far below the bottom of the screen, and be unable to find it. If we didn't say that the paddles could only move up or down, the players might move their paddles side to side, and start bumping into each other. It would be total chaos. Other rules are there to make the game more interesting for the players, such as the rule that let's players affect the speed of the ball by the speed and direction of their paddle. Giving them the power to speed up or slow down the ball allows a greater level of skill to be involved in the game, and allows the game to be played differently as the player continues to practice. And it keeps that game interesting after repeated matches. So those are the rules that define our world. How about the rules that define the game that takes place in our world? Now we move on the gameplay rules. While our first type of rules define the place in which the game happens, these rules set out how the game is played. In more complicated games, the gameplay rules may also help explain the narrative aspects of the game and lay out the various goals a player needs to achieve to complete your game. In Pong, some examples of this type of rule would be, the ball starts from the dotted line in the middle of the screen, moving at a medium speed towards the right side of the screen. Yes? >> Well, that rule seems complicated. Why don't we just tell the computer to serve the ball to the player on the right. >> Well, that assumes that the computer knows how to play ping pong. A computer doesn't know how to serve a ball, it doesn't even know what the word serve means. That's what these rules are for. If we didn't tell the computer to start from middle, the ball might start on the left edge of screen and score a point for the right player before anybody had a chance to react. If we didn't request a specific speed, the computer might make the ball too fast or too slow. The actual rule is probably even more specific, maybe mentioning the exact angle at which the ball moves. When we're making rules we have to be very clear, because unclear rules can be really easily misinterpreted. Here's some more game rules from Pong. If the ball passes off to the left side of the screen, the right player receives one point. And vice versa for the other player. If the right player scores, the next ball will start on the dotted line, and move at a medium speed towards the other player, and vice versa for the other player. The first player to reach 11 points wins the game. When either player wins, the game ends. Pong is a simple game, but there's quite a few rules. Notice how if any of these are removed, the game becomes impossible to play or win. For instance, without the rule that tells us how the ball appears and starts moving, we'd never have a ball to play with. If the first rule didn't tell us how the ball was moving, we might have a ball appear at the start of the game, but just sit in the middle of the screen. Rule 6 tells us that the game is won when a player gets to 11 points, but without rule 7 telling us that the game ends after somebody wins, the players would keep on playing forever, and the game would never end. The reason I'm breaking up rules into two categories is to help me organize rules in my project. Most games will need a lot of rules. So it pays to stay organized. Breaking them up into the world and gameplay rules work for me. but there are different ways of organizing and describing rules among different game designer, different game companies, and even in the same company with different games. The important thing is not that you choose to organize your rules in this exact way, but that you organize them in a way that is clear to you and your collaborators, and in a way that makes sense for your game.