Hi!
I’m learning Phaser, and I have a lot of questions, as a beginner in Phaser, I would like to see the opinion who already have a good experience in development games with Phaser about this article:
what’s is YOUR opinion?
Hi!
I’m learning Phaser, and I have a lot of questions, as a beginner in Phaser, I would like to see the opinion who already have a good experience in development games with Phaser about this article:
what’s is YOUR opinion?
The article just shows valid opinions backed up by examples. It’s mostly about Phaser, but some points are related to the JavaScript ecosystem as a whole. If there’s anything written there you want a detailed analysis of, you can ask. One thing I want to point out is that HTML 5 Game Devs used to be the official forum, so it’s not really a third-party source.
Personally, the reason I like Phaser is that it handles all of the difficult parts of a game’s lifecycle (time step, rendering, input, physics, things like that), but it’s still incredibly flexible and doesn’t force you to do things in a particular way, unlike a full game engine. It’s easy to learn if you’re beginner, but it’s also easy to do pretty much anything you want if you know your way around JavaScript and WebGL.
I honestly think phaser 3 is great for people who have worked with phaser 2 and understand the landscape of what phaser brings. It brings a lot of cool features like scene management/transitions with state, an easy to implement arcade physics system, a lot of examples and really good JSDoc implementation, seamless WebGL integration with their pixijs wrapper-- and some more stuff. That being said there are a ton of frustrations you’ll experience if you’re expecting a mature game development ecosystem.
The SEO stinks.
Many times searching for a way to solve an issue in phaser 3 will lead you to phaser 2 examples and some times you won’t realize it until you’ve already wasted time on a solution. Generally you get burned once then learn your lesson. There’s also a handy banner that brings you to phaser 3 documentation but it dumps you to the phaser 3 category link where you have to go back into digging for a solution. It’s incredibly frustrating after going through the process the 13th time. Having smarter routing that brings you directly to the phaser 3 examples of the phaser 2 category you were on would help immensely.
There are tons of examples where only one or two would suffice
Yes there are a lot of examples to check out which is great, but sometimes you’ll find yourself looking through 4 of mostly the same examples done a bit different when only one well thought out example would be preferable with slight pivots when needed. Also the fact that sometimes the github api doesn’t load the code is kinda scuffed. If you want to keep the github api and leverage constant code changes have an SSR solution like a static cache that is occasionally built or SSR the github api result to the page on demand (which can be cpu intensive, I realize.)
The examples are still using ES5
ES6 came out 5 years ago. Use var responsibly (or better yet not at all). If you know your way around javascript this isn’t a problem. At best it’s a minor inconvenience for people to do mental gymnastics and at worst teaching people new to javascript bad outdated practices they’ll have to unlearn.
The JSDocs coverage is amazing but…
It’s only good if you already kinda know what you’re looking for. There are times where you instantiate a wrong class because it seems right and scratch your head as to why it doesn’t have a method you’re looking for (physicsbody vs gameobject). I’d MUCH rather have better typescript support
Typescript support is awkward
Typescript is there, but the types are very verbose and not very intuitive. You’ll find yourself getting comfortable hovering over objects just to find the type. Apparently typescript support should be more in tune in Phaser 4 and I can’t wait to see it.
There are more little frustrations but ultimately I’d say phaser 3 isn’t the perfect engine to buckle down and learn. It just isn’t there yet for anything beyond small games. The benefit being if you set everything up you can make a LOT of small games (if you’re looking to pump out a massive amount of content). I can’t wait to see what phaser 4 brings and would love to give it another go especially since I feel javascript is mostly underutilized since it can be used universally on multiple devices and the market for games is huge. It’s also completely capable for creating content with visual fidelity what with WebGPU coming soon-ish and the current presence of WebGL2. I would love a good javascript engine and phaser is almost there but it’s not. I just feel phaser 3 is awkward to work with unless you’ve worked with phaser before. If you’re truly trying to make games and want to keep making games I would highly suggest looking at one of the bigger game engines. At the very least it’s resume experience many game companies look for.
I’ve created a few games using Phaser and I like it a lot. Some of the Phaser3 examples are really useful like this one and this example but a lot of them leave me scratching my head.
So I have to agree with the general criticism of the code examples. There are a lot of examples where it’s unclear (to me at least) how you would use that in a typical game situation. And also, a lot of examples can imho use a bit more explanation, either in on-screen text or in the code comments (preferably both) because example code is aimed at people who are new to Phaser.
For example this one just removes random sprites, or this one animates sprites seemingly at random. A better game examples would be to show how to remove or animate a sprite at the mouse cursor or something like that.
And these “dwitter” effects look cool but is dwitter a part of the Phaser objects? I guess not but you can use them as a background maybe? If so, why use abstract effects and not typical game backgrounds like this starfield or any of these or these water effects ?
This example or this one doesn’t seem to do anything, I know there is text ouptut in the console, but why no text explanation on screen or in the code comments?