> For the complete documentation index, see [llms.txt](https://docs.launchboard.app/cxd/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.launchboard.app/cxd/video-game/project-outline/1-7-phaser-practice-3-side-scrolling-game.md).

# 1-7 Phaser Practice 3: Side-Scrolling Game

In this third practice, you're going to create a side-scrolling game that follows the player's character as it moves through an extended game world. The instructions will help you make a partial game, which you'll need to finish designing and creating yourself. You'll also create some of your own custom assets (sound effects and an animated sprite) to add to your game. This practice will allow you to apply your existing knowledge of Phaser, plus show you a few more new features.

![](https://728828027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LDgX-RykK9XCDxfIhX_%2F-LDgX7Ifr9nc11ubI925%2F-LDgX8NYfGQkyxxhTIMx%2Fpractice3-title.png?generation=1527608046607605\&alt=media)

![](https://728828027-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LDgX-RykK9XCDxfIhX_%2F-LDgX7Ifr9nc11ubI925%2F-LDgX8N_PNNIt_SJrzHW%2Fpractice3.jpg?generation=1527608032955323\&alt=media)

**PREVIEW VIDEO:** [Demo of Totally Awesome Untitled Game](https://drive.google.com/open?id=0B8MTiM_lFG9TanY1M21TM0s0LW8)

## PREP STEPS

1. Prepare a new [Phaser Game Template](https://docs.launchboard.app/cxd/video-game/project-references/phaser-game-template.md). Be sure to place a copy of **phaser.min.js** into the same folder that has your HTML, CSS, and JS files.
2. Download this [assets.zip](https://drive.google.com/open?id=0B8MTiM_lFG9TOXpWLUVJY1NUMVk) file, and extract the file contents, which will be a folder named **assets** that has two subfolders containing 30 images and 2 sounds. Place the **assets** folder into your game template folder. (For this game, you won't necessarily use all the provided images. It will be up to you to decide whether to use some of them.)
3. Test your Phaser game template by previewing the HTML file online. If everything's ready to go, you should see a **solid black box** (your blank game canvas) on your webpage. (If you don't get the solid black box, consult the **Troubleshooting** tips at the end of the [Phaser Game Template](https://docs.launchboard.app/cxd/video-game/project-references/phaser-game-template.md) page.)

## CODING STEPS

This third practice game will be coded in 15 steps. Most of the steps will involve coding that's similar to things you did previously. However, some of the steps will introduce and explain new Phaser features.

As a reminder, all your game coding is done in your JS file (**code.js**).

The steps are outlined below. The instructions for Steps 1-5 start on the next page.

### Step 1: Add Player Sprite and Physics

### Step 2: Add Player Input and Movement

### Step 3: Resize Game World and Add Background

### Step 4: Add Platforms and Walls

### Step 5: Add Coins and Score

### Step 6: Add Enemy and Health Bar

### Step 7: Add Power-Up with Timer

### Step 8: Add Countdown Timer for Game Over

### Step 9: Create Your Own Design for Rest of Level

### Step 10: Add Rest of Platforms and Walls

### Step 11: Add Obstacle to Hinder Player

### Step 12: Add Resource to Help Player

### Step 13: Create and Add Sound Effects

### Step 14: Create and Add Animated Sprite

### Step 15: Playtest and Improve Your Game


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.launchboard.app/cxd/video-game/project-outline/1-7-phaser-practice-3-side-scrolling-game.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
