> 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/tutorials/hello-phaser.md).

# A. Hello Phaser

In this first tutorial, you'll code a "Hello World" game that displays the Phaser logo and changes the game's background color when the spacebar is pressed.

This won't be a true game (because it will lack an objective, rules, challenge, etc.). However, it will introduce you to coding with the Phaser CE game framework.

## Tutorial Goals  <a href="#tutorial-goals" id="tutorial-goals"></a>

The goals of this tutorial are to help you:

* Understand the basic code structure of a Phaser CE game
* Code a "Hello World" game with a simple player interaction

## What is a Hello World program? <a href="#what-is-a-hello-world-app" id="what-is-a-hello-world-app"></a>

When learning a new programming language, the first step that many people take is to create what is called a ["Hello World"](https://en.wikipedia.org/wiki/%22Hello,_World!%22_program) program. Traditionally, this program simply displays the text "Hello World" on the screen and only requires a few lines of code. The purpose is to demonstrate that you can create a simple yet functional program in the new coding language. It's a first step before creating more complex programs with the new language.

A Phaser game can display text, so you could create a traditional "Hello World" message on the game screen. However, since video games typically use lots of images, you'll instead display an image on the screen. In addition, since video games require player interaction, you'll add the ability to detect input from the keyboard.


---

# 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/tutorials/hello-phaser.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.
