If you have npm installed you can install it using npm install -global http-serverĪnd then start the server using http-server '/path/to/game/directory/'Īlternatively there are other web servers recommended here. I’ve been using the Node.js http-server, which has worked well.
Setupīefore we can run any Phaser game, we need a webserver which we can use to serve the files. In this tutorial we will create a simple demo where you can move left, right, up and down and collide with objects. Here I am going to share how I created a top-down system in the hope that others will find it useful. create a game world with tilesets and collisions create a 2D top-down player controller set up multiple dynamic animations for the player and enemy make multiple weapons the OOP (object-oriented programming) way code a state machine for enemies with basic AI make three levels in which videos we will talk about design and enemy placement code a. I wanted to create a game with a top-down/sky view, but I found that most of the tutorials and examples were for side-scrolling games. Recently I have been trying to figure out how to use Phaser so that I can try my hand at making simple games. Create a top-down game in JavaScript using the Phaser framework for making HTML5 games.