I started in Phaser a few days ago, I have several games created with Cordova and I would like to learn how to use this engine that Phaser.
I followed the guide and the Hello Word Tour and everything went perfect.
I started the following tutorial:
Create a game on Phaser
and I still could not show the elements on the screen.
I explain the configuration I have of Phaser:
The server creates it with node.js. I show you my file server.js
const http = require('http')
const fs = require('fs')
const server = http.createServer((req, res) => {
fs.readFile("./part1.html", (err, data) => {
if(err){console.error(err); return;}
res.end(data)
})
})
console.log('escuchando en el puerto 3000')
server.listen(3000)
1 - I have created a folder (phaser) to save all the projects that I am doing.
2. In that folder I create a folder called tuto1, where I have unzipped the files that come in the tutorial: phaser3-tutorial-src.zip, which consists of 10 html files and a folder with images.
3- I started the project with npm init
4 - Install Phaser with: npm install phaser@3.15.1 --save and as it did not work install also with npm install phaser@3.15.1
I followed the steps of the tutorial, but I can not see the elements in the canvas.
Something Iâm doing wrong that escapes me and I can not find.
The browser inspector does not give me errors, and I have tested with Mozilla and Chrome.
The result is the one I show in the capture,
What am I doing wrong ?
Do not call images well?
If you give me some idea, I have started with great enthusiasm, but I am not able to create this which is as simple as copying the code, it does not work.
Thanks for the work that the community is doing.
A greeting.