Skip to content

Instantly share code, notes, and snippets.

@topherPedersen
Created February 16, 2019 20:13
Show Gist options
  • Select an option

  • Save topherPedersen/4433116d68f8ed66331594a60132123e to your computer and use it in GitHub Desktop.

Select an option

Save topherPedersen/4433116d68f8ed66331594a60132123e to your computer and use it in GitHub Desktop.
PhaserJS Starter Template
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Making your first Phaser 3 Game - Part 2</title>
<script src="//cdn.jsdelivr.net/npm/phaser@3.11.0/dist/phaser.js"></script>
<style type="text/css">
body {
margin: 0;
}
</style>
</head>
<body>
<script type="text/javascript">
var config = {
type: Phaser.AUTO,
width: 800,
height: 600,
scene: {
preload: preload,
create: create,
update: update
}
};
var game = new Phaser.Game(config);
function preload ()
{
/*
this.load.image('sky', 'assets/sky.png');
this.load.image('ground', 'assets/platform.png');
this.load.image('star', 'assets/star.png');
this.load.image('bomb', 'assets/bomb.png');
this.load.spritesheet('dude', 'assets/dude.png', { frameWidth: 32, frameHeight: 48 });
*/
}
function create ()
{
}
function update ()
{
}
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment