-
-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Phaser >= 3.50 Issue #7
Comments
The bug is in Phaser itselfe. The headless mode of Phaser does not work in 3.50.0. Why don't you use an older version? You could also use v3.24.1 on the server and 3.50.0 in the client. Two hours ago, v3.50.1 has been released. Maybe it works now. Do you want to check it? |
@yandeu I will do what you said and use 3.24 on the server since that will probably work, or maybe 3.50.1. Thanks for responding! |
Looks like it has been fixed and does now work in v3.51.0 |
Nope, it does not work. Even v3.52.0 does not work yet. |
There are no open issues about HEADLESS mode on the Phaser repo, so until someone creates one this is going to remain an issue (whatever it is) |
Having said that, our example works fine in 3.51 and above: http://labs.phaser.io/view.html?src=src%5Cgame%20config%5Cheadless%20renderer.js so if you've managed to break it in a different way then it definitely needs reporting as an issue. |
The issue is not in the browser. It's on Node.js. Before v3.50 everything worked great. v3.50 created the issue phaserjs/phaser#5468. But since then, it does not seem to run on Node.js. I admit I haven't investigated because I thought the huge update to 3.50 would bring some issues anyways and that this would be fixed automatically sooner or later. I was wrong :/ The code below works great in v3.24.1, but not in newer versions. {
"scripts": {
"start": "node index.js"
},
"dependencies": {
"@geckos.io/phaser-on-nodejs": "^1.2.3",
"phaser": "^3.24.1"
}
}
// index.js
require('@geckos.io/phaser-on-nodejs')
const Phaser = require('phaser')
class MainScene extends Phaser.Scene {
create() {
console.log('it works!')
}
}
const config = {
type: Phaser.HEADLESS,
banner: false,
audio: false,
scene: [MainScene],
physics: {
default: 'arcade',
arcade: {
gravity: { y: 300 }
}
}
}
new Phaser.Game(config) @photonstorm Do you know how to run Phaser.js on Node.js? |
I'm successfully running Perhaps unrelated, I noticed a problem where Edit: I noticed another error being thrown with the latest phaser version when calling
I'm not sure why this error is thrown, because via a quick search I think
This forces phaser to use timeouts for the main game loop instead of |
@sebastianFast Thanks a lot! I personally wait for another release since I'm fine using an older version for now.
With your PR or the official 3.54.0 version? |
You're welcome. Made an edit to my original message, unrelated to your question
Yes and no. I got it working in the first place with the official 3.54.0. Then I stumbled above the bug mentioned in the issue phaserjs/phaser#5689 and issued a PR for the fix. If you do not need to use |
I see. Thanks! |
@sebastianFast Looks like your pull request solved the issue. It now works again. Thanks a lot! |
Hello I just found this repo and I am using Phaser 3.50.
The readme mentions an error, what is it? I have no other option than to use phaser 3.50 so I would like to help fix it.
The text was updated successfully, but these errors were encountered: