From the course: Programming Foundations: Programming for Kids

Programming games: GameSalad

From the course: Programming Foundations: Programming for Kids

Start my 1-month free trial

Programming games: GameSalad

In this chapter, I've described graphical programming tools for building animations with Scratch, and Android mobile apps with MIT App Inventor. And now I'm going to describe another graphical programming tool named GameSalad that kids can use to build their own games. GameSalad isn't just for kids, it's used actually by real software developers to build game apps that are published on a lot of platforms. But because it's primarily a graphical programming environment that requires little to no code, kids can learn it pretty easily. I do recommend this for older kids, starting at about age 13. Before that age, the interface is probably a little bit too complex. The software you use to build games with GameSalad is completely free. You'll need to provide your email address and register, but then you can download the software for either Mac or Windows. On Mac, when you first start up the application, it looks like this. On Windows, you'll have more of a conventional menu-based interface. On Mac, it's possible to start a new project by using one of the existing templates. And to show you a little bit about GameSalad, I'll focus on these templates. I'll start with the Platformer Template. This is a template for a running and jumping game, and it uses environmental physics. That is, a sprite, or an actor, as it's known in GameSalad, runs around an environment and is subject the rules of that environment. It can't go through floors or ceilings or through walls, but it can run and jump to get around everything. And there are consequences for getting the moves wrong. I'll open the template, and expand to full screen, and show you that there are four tabs across the top. The Project info is where you set the game title, the dimensions of the environment. By default, this game is built for an iPhone in landscape orientation. And a description, instructions, and search tags. The next tab is for scenes. This game has one level and one scene. And then, there are the actors. Actors in GameSalad are like sprites in Scratch. They have their own internal logic, and they have rules that they have to follow. In this template, there's an actor called the Player. You'll see that is the little thing that runs around the environment. And then, there are other actors such as springs, torches, and gems, which also affect the behavior of the game. To get to the details of the game, I'll go back to the scenes and specifically to level 1. In level 1, I see a listing of all the actors that will be used. I see the background, I see the Player right here, and all the other items that will show up on the screen. In the lower left, there's a set of behaviors. Things that the actors can do. They can accelerate, they can move, they can collide, they can destroy. Then there are the images. And this is where you can create animations. And there are sounds. For both images and sounds, you'll see tabs here labeled Project and Purchased. And this gives you a little clue to the GameSalad business model. They give you the software for free, but then there's a big marketplace where you can buy assets and templates. So you can get started quickly building your own games. But you can always build your own games with your own graphics. So I'll go back to this top panel, the Inspector, and I'm going to double click on the Player, that's one of the actors. And here is where all of the behaviors are managed. This is called the Player Prototype screen. It's where you define the behavior of all instances of the Player. There's definitions for how collisions work, for how character controls work. What happens when the character is moving left, how the animations are managed. What happens when the Player's moving right. And let's take a look in detail at the jumping control. The jumping control says that when the actor receives an event of a keystroke, which is of spacebar on the keyboard, then it first asks the question, is the character grounded? And if it's true then it does one behavior. And if it isn't, it ignores it. So let's see what happens when you actually play the game. I'll do that by clicking the Preview button at the top, and I see the game rendered in iPhone dimensions. Starting from the beginning of the game, I'll press the right arrow key on my keyboard, and the character moves to the right. When it gets past the floor, it drops down to the next level. Then I'll make it go left, and it drops down again. And I'll make it go right. I see that there's a gem over on the left side, so I'll go grab it. And when I grab it, I hear a little sound from my computer. Now, I'm ready to exercise that jump control. I'll press the spacebar and move forward. And now we come to the consequences. The red area over on the right is a pool of lava. If I drop into the pool of lava, the game will be over. But I want to get that gem. So I'll jump and jump and then I'll make sure I don't go too far. And then I'll show you what happens when I do go too far. I'll jump and that's the end of the game. So, a kid can start with a template and diagnose how the game works, and that can give them clues on how to build their own game. I'll show you one more template called Cannon Physics. Just like the previous game, it's built for the iPhone. And I'm just going to run the game this time. When I click and hold the cannon, it goes up. And when I let go, the cannonball is launched. This is a game very similar to Angry Birds. The goal is to shoot objects and knock things over. Specifically, these walls that are stacked on top of each other. I'll lower the trajectory of the cannon and shoot the ball. And this time, I knock a few walls over. Now once again, it's fun to play the game, but the important thing here is to understand how it's put together. I'll go to the home screen, and then I'll double-click to edit the cannon actor. And once again, I see that there are a whole bunch of behaviors that are already defined. They define how the cannon behaves and what effect it has on the rest of the game. Once you've built games with GameSalad, you can then publish them immediately for use on PCs and Macs, and also on iOS if you have an iOS developer account from Apple. But if you want to publish on other platforms, such as Android, you'll need a pro membership, and this is an annual subscription. On this webpage at gamesalad.com/creator/pricing, you'll see which additional features you get with a paid membership. My personal opinion is that these features are more for adults who are treating making games as a business. For kids who just want to have some fun building games, the free features are plenty. The game solid website has a community section where there's a forum where you can ask questions. An education section where you can learn about using GameSalad. A marketplace where you can buy and sell assets and game templates. And an arcade where you can play games built by other GameSalad developers. GameSalad is great platform for building games, not just for use at home or sharing among friends, but also for building game apps that could be distributed widely. I'm describing it in some depth, because it has free option and is available for both major platforms, Macs and PCs. And it's a great way to get started with games without having to do a lot of coding.

Contents