phaserjs / create-game

Easily create a Phaser project with our official template CLI tool
35 stars 8 forks source link

[Phaser 4.0.0-beta.1] Phaser's Revenge client-side errors on launch (Firefox and Chromium) #6

Open codingthat opened 4 hours ago

codingthat commented 4 hours ago

Hi! If I do this:

~/Desktop/temp-phaser $ npm create @phaserjs/game@latest

> npx
> create-game

o----------------------------------------------------o
|      Welcome to the Phaser Template Installer      |
|            Let´s start the installation            |
|                       v1.2.4                       |
o----------------------------------------------------o

✔ Enter Project Name: … my-phaser-game
✔ Select Option: › Demo Game (Matching Pairs, Clicker, Shmup)
✔ Select Demo Game: › Coin Clicker - Clicker Game

o----------------------------------------------------------o
|               Project created successfully               |
|                Thank you for using Phaser                |
|        Tell us about your game! - games@phaser.io        |
o----------------------------------------------------------o

Next steps:
1. cd my-phaser-game
2. npm install
3. npm run dev

Happy coding!
~/Desktop/temp-phaser $ cd my-phaser-game && npm i phaser@4.0.0-beta.1 && npm run dev

I get two different errors, depending on the browser, on Linux Mint 20.3.

Firefox 132.0.1 says this:

[vite] connecting... client.ts:19:8
[vite] connected. client.ts:173:14
An AudioContext was prevented from starting automatically. It must be created or resumed after a user gesture on the page. phaser.js:204267:19
     Phaser v4.0.0 Beta 1 (WebGL | Web Audio)  https://phaser.io/v400 phaser.js:16713:20
Loading: 0% preloader.js:34:20
Loading: 6% preloader.js:34:20
Loading: 13% preloader.js:34:20
Loading: 19% preloader.js:34:20
Loading: 25% preloader.js:34:20
Loading: 31% preloader.js:34:20
Loading: 38% preloader.js:34:20
Loading: 44% preloader.js:34:20
Loading: 50% preloader.js:34:20
Loading: 56% preloader.js:34:20
Loading: 63% preloader.js:34:20
Loading: 69% preloader.js:34:20
Loading: 75% preloader.js:34:20
Loading: 81% preloader.js:34:20
Loading: 88% preloader.js:34:20
Loading: 94% preloader.js:34:20
Loading: 100% preloader.js:34:20
Uncaught TypeError: logo.postFX is undefined
    create SplashScene.js:15
    create phaser.js:194309
    bootScene phaser.js:194199
    start phaser.js:194954
    processQueue phaser.js:194000
    update phaser.js:194244
    step phaser.js:17204
    step phaser.js:18240
    step phaser.js:30511
SplashScene.js:15:19

...whereas Brave Version 1.73.89 Chromium: 131.0.6778.69 (Official Build) (64-bit) says this:

phaser.js?v=f394c077:114440 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
createAudioContext @ phaser.js?v=f394c077:114440
phaser.js?v=f394c077:8474      Phaser v4.0.0 Beta 1 (WebGL | Web Audio)  https://phaser.io/v400
preloader.js:34 Loading: 0%
preloader.js:34 Loading: 6%
preloader.js:34 Loading: 13%
preloader.js:34 Loading: 19%
preloader.js:34 Loading: 25%
preloader.js:34 Loading: 31%
preloader.js:34 Loading: 38%
preloader.js:34 Loading: 44%
preloader.js:34 Loading: 50%
preloader.js:34 Loading: 56%
preloader.js:34 Loading: 63%
preloader.js:34 Loading: 69%
preloader.js:34 Loading: 75%
preloader.js:34 Loading: 81%
preloader.js:34 Loading: 88%
preloader.js:34 Loading: 94%
preloader.js:34 Loading: 100%
SplashScene.js:15 Uncaught TypeError: Cannot read properties of undefined (reading 'addShine')
    at SplashScene.create (SplashScene.js:15:32)
    at SceneManager2.create (phaser.js?v=f394c077:108671:36)
    at SceneManager2.bootScene (phaser.js?v=f394c077:108587:28)
    at SceneManager2.start (phaser.js?v=f394c077:109129:26)
    at SceneManager2.processQueue (phaser.js?v=f394c077:108448:37)
    at SceneManager2.update (phaser.js?v=f394c077:108626:26)
    at Game2.step (phaser.js?v=f394c077:8637:32)
    at TimeStep2.step (phaser.js?v=f394c077:9091:26)
    at step (phaser.js?v=f394c077:15978:29)
phaser.js?v=f394c077:114588 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
unlockHandler2 @ phaser.js?v=f394c077:114588
phaser.js?v=f394c077:114588 The AudioContext was not allowed to start. It must be resumed (or created) after a user gesture on the page. https://goo.gl/7K7WLu
codingthat commented 4 hours ago

Looks like Shine was removed, otherwise something like const fx = this.cameras.main.filters.external.addShine(1, .2, 5); might fix the line in question.

photonstorm commented 3 hours ago

None of the sample games are updated for v4 yet and won't be until it's the main release.