//Phaser configuration setup
let config = {
type: Phaser.AUTO,
width: 1000,
height: 615,
physics: {
default: "arcade",
arcade: {
debug: false
}
},
scene: {
preload: preload,
create: create,
update: update
}
};
//game declaration
const game = new Phaser.Game(config);
//preload assets and data function
function preload() {
}
//create function
function create() {
}
//update game function
function update() {
}
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Shooter :)</title>
<link href="style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<script src="script.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/npm/phaser@3.14.0/dist/phaser.min.js"></script>
</body>
</html>