> 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/code-video-game-1/master.md).

# Code Introduction

{% hint style="danger" %}
**UPDATE IN PROGRESS:** This new code guidebook will be a revision of the [tutorials](https://docs.idew.org/video-game/project-outline/1-5-phaser-practice-1-matching-game) and [references](https://docs.idew.org/video-game/project-references) in the previous project guidebook. Updates to this new code guidebook will be occurring during summer 2019.
{% endhint %}

This Video Game Code Guidebook is a supplement to the [Video Game Project Guidebook](https://docs.idew.org/project-video-game/).

## What's in this Guidebook?

This guidebook contains a series of **video game code tutorials** to help you get familiar with programming games using the Phaser CE game framework.

In addition, this guidebook contains **coding references** to explain how to use Phaser CE code to create a game world and add various features to the gameplay.

Finally, this guidebook also contains **links to external resources**, such as the Phaser CE API code reference, Phaser CE code examples, and online tools for creating game assets, such as animated sprites and sound effects.

{% hint style="info" %}
**HOW TO COPY CODE:**  In this guidebook, you can click the **copy icon** displayed in the upper right of a code block to copy all the code to the clipboard for pasting.
{% endhint %}

```javascript
// example code block
var game = new Phaser.Game(800, 600, Phaser.AUTO, 'my-game',
  { preload: preload, create: create, update: update });
```

## Copyright and License

Copyright © 2016-2019 Michael Frontz and Jim Lyst, Indiana University School of Informatics and Computing at IUPUI

This material is part of the [Computing by Design](https://docs.idew.org/the-cxd-framework/) high school computer science curriculum developed for the [Informatics Diversity-Enhanced Workforce (iDEW)](http://soic.iupui.edu/idew/) program, an award-winning community partnership in central Indiana that is broadening student participation in computing and helping students develop the skills essential for success in the 21st century workplace. The iDEW program is managed by the [Indiana University School of Informatics and Computing at IUPUI](https://soic.iupui.edu/).

![](https://3336303885-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LRN-6cVHcjgmr0O4jn7%2F-LZkOF2uymVUFXFbiXji%2F-LZkOHpr8fJE9bS6q0Ws%2Fcxd-idew-soic-logo.png?alt=media\&token=4e33cd96-c27a-43e1-bd1a-bd9e90b2885d)

This work is licensed under a [Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License](http://creativecommons.org/licenses/by-nc-sa/4.0/). You are free to use, share, or adapt this material for noncommercial purposes as long as you provide proper attribution and distribute any copies or adaptations under this same license.

[![Creative Commons License](https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png)](http://creativecommons.org/licenses/by-nc-sa/4.0/)


---

# 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/code-video-game-1/master.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.
