Time for action — side scrolling

Side scrolling games are some of the most enjoyable games out there (in my opinion anyways), how do they do it? Well, programming it is a huge task, but with GameSalad it's so easy! It's just a matter of creating a large level (anything more than the viewable screen size; the iPhone's screen for example is 320x480) and then drag the Player actor. The following steps show how it is done:

  1. Bouncy time! Ok, let's get to it! Double-click the ball actor in the scene, add a Control Camera behavior, go back to the scene editor, click the Camera Mode button, as shown in the following screenhsot:
    Time for action — side scrolling
  2. Now, move the bounds of the camera so that they are in the center, as shown in the following screenshot:
    Time for action — side scrolling
  3. Now, as in the rest of the levels, you have to add the Useable Platforms behavior to the platform the player will be using, and also change the Gravity to 300.
Time for action — side scrolling

Everything works and looks great! Do you want to take a break?

What just happened?

In these first five levels, we were able to take a look at some different, more complex behaviors, such as constraining attributes (like the platforms' X and Y value to a touch), removing the bounciness of an object by lowering its Restitution, switching levels via collisions, teleporting, and changing the position of an object when it collides with another. We also looked at how to make an object control the camera with a simple behavior! It's so easy, isn't it?

Go ahead, take a breather, go get a coffee, and a doughnut. Mmmmm honey cruller, no Boston cream! Ugh! I'll just get a dozen assorted. We can pick this up when you get back.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.12.232