Chapter 9. Hunger Run

In this project, we will build a fast-moving game called Hunger Run. It is an auto-scrolling platform game. Although the art for Hunger Run is inspired by Super Mario, my all-time favorite platform-based game, the game is more similar to Monster Dash (https://itunes.apple.com/us/app/monster-dash/id370070561?mt=8).

Mission briefing

In this project, we will create an auto-scrolling platform game called Hunger Run. We will learn to view our game world's spatial space as a 2D grid of fixed-size grid units. On this 2D grid, we will learn how to scroll a player sprite through grid units. Moreover, we will add food sprites to each grid for Marco and Polo. They will run from one grid to another, picking up food as they go. Along the path of their frantic run, they will find food that nourishes as well as poisonous mushrooms that kill.

Mission briefing

Why is it awesome?

While creating Hunger Run, we will learn how scrolling works and will also create auto-scrolling platforms that simulate player sprite moving between platforms. Not only that, we will also add food sprites that scroll with the platforms and interact with the player.

Our player sprite might remind you of Mario and Luigi. Marco and Polo are as cool as Mario and Luigi and definitely hungrier than them. They may not have a princess to save, but they have an empty stomach to fill!

Why is it awesome?

Moreover, Hunger Run, just as in Project 4, Space Age, has a Game Manager sprite that manages the game's lifecycle and level advancement. To display the score, the score sprites are included in the starter project and can be used as they are.

Your Hotshot objectives

To build Hungry Run, we will start with a starter project that includes a complete set of Hunger Run sprites, minus the scripts. We will first understand the mechanics of scrolling and then apply the scrolling concepts to create the platform and food sprites, the scrolling sprites in this game. Next, we will create scripts for the player and Game Manager sprites. The following are our objectives:

  • Understanding scrolling
  • Adding scripts to the brick sprite
  • Adding scripts to the food sprite
  • Adding scripts to the player sprite
  • Adding scripts to the Game Manager sprite
  • Tweaking the game
..................Content has been hidden....................

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