Source: /cirosantilli/phaser-hello-world

= Phaser hello world
{c}
{tag=Hello world}

* \a[phaser/hello.html]: a minimal hello world adapted from https://web.archive.org/web/20230323212804/https://phaser.io/tutorials/getting-started-phaser3/part5[]. Not an actual game strictly speaking though, just shows the phaser logo bouncing around the screen.

  Fully contained in a single HTML file, except that it loads the phaser library and image assets from the web.
* \a[phaser/hello-game.html]: an actually hello world game where you have to collect stars and avoid bombs.

  Based on https://labs.phaser.io/index.html?dir=games/firstgame/&q=[]:
  * finished version: https://labs.phaser.io/view.html?src=src/games/firstgame/part10.js[]
  * corresponding tutorial: https://web.archive.org/web/20230323210501/https://phaser.io/tutorials/making-your-first-phaser-3-game/part10[].

A web server is mandatory for assets, unless you embed them in data URLs, `file://` access is not possible:
* https://web.archive.org/web/20230323212818/https://phaser.io/tutorials/getting-started-phaser3
* https://stackoverflow.com/questions/39565296/cors-issue-with-html5-canvas-javascript
* https://stackoverflow.com/questions/59362232/i-cannot-load-images-from-my-pc-in-phaser-3
* https://github.com/photonstorm/phaser/issues/3464