Chapter 6. Space Defender Part 1

How was your break? I hope it was good! Anyways, remember back in 1979 when times were easier? When the best game on the market was a simple 2D single-colored set of pixels flying around a CRT screen? Yes in 1979, Atari released arguably the most influential game in history, Asteroids. I never saw the '70s or most of the '80s but I played Asteroids, as has the majority of the world and it is quite an addictive game. It's one of those great games where you and a group of friends would play for hours to see who could get the high score. What does that have to do with this chapter? We are going to make an Asteroids clone, but we are going to have some better-looking effects. After all, our game is going to be on the iPhone!

This game is going to be a little more complex than our last one. We are going to incorporate some more touch controls via buttons to control the ship, include various enemies, and at the end of this chapter we are going to deploy our game to the iPhone for testing purposes, which will help immensely when getting your game ready to deploy to the App Store. You will get to see how it performs and controls on the device. Nothing would be worse than releasing a game that doesn't work! Let's see what we are going to cover in this chapter:

  • Creating a good user interface and sprites
  • Numerous AI (enemies)
  • Sound effects
  • Spaceship movement

Things are going to get juicy in this chapter, and by the end, you are going to have a great idea of how to effectively use GameSalad's more complex procedures. As with the last game, this is going to be divided into two chapters because there is a lot to cover and you need to breathe in between. Let's go!

Creating UI and sprites

I think, for this chapter, I am going to use Photoshop to design all the sprites. Let's start with the Logo Screen; this is simply going to be a screen that shows your company logo or a logo to represent yourself. I have a company, so following is the logo that I'm going to use for this game.

Tip

If the images imported into Game Salad are smaller than your actual image (for example, you import an image at 960x640 and it imports at 240x160) then, while saving your image, make sure your resolution is 72DPI that is, 72 dots per inch. Then, import it into GameSalad and you will have the correct resolution.

Creating UI and sprites

Ooh... pretty! This is exactly what the player wants to see! The previous screenshot is a flashy, cool-looking graphic, but don't forget that it has to match your gameplay. Ok, so let's import that into GameSalad, create a new project, and fill in all the details on the main screen.

  1. Now, open up your Initial Scene and start editing it.
  2. Import your image into the Library and drag it into your scene. All we are going to do with this actor is add a Timer behavior, so double-click it (the actor), drag in a Timer behavior and change its attribute to Every 4 seconds, and drag in a Change Scene behavior and set it to Next Scene.
    Creating UI and sprites
  3. If you want to have more than one of these splash screens, then by all means do it; I did it too.
    Creating UI and sprites
  4. Just copy the first level, change the image, and keep the timer the same. Now, let's move on to our Main Menu; create a super flashy looking background for this one. As for me, I am going to imitate the original Asteroids box art.
    Creating UI and sprites

It's pretty easy to create splash screens, isn't it?

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

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