Actually, I was surprised to see this posted here now, since Phaser 3.0 is not yet out. It's mostly feature-complete, but they're still working on docs and preparing for the release (in the few days to a week). I've really enjoyed following the v3 devlog[2]. Richard Davey's dedication to the project and his and the other contributors herculean efforts towards v3.0 have been inspiring to watch. Truly a labor of love.
Some tips for others based on my experience with Phaser:
- USE TYPESCRIPT! One of the worst parts of Phaser is its documentation. In fact, the docs on the main website have been outdated by about 4 major releases, and the new docs are ugly and hard to use. TypeScript + VSCode massively improves this experience, by auto-completing functions and adding inline JSDoc info.
- Webpack is great, but hard to use with Phaser 2 OOTB. This may be a moot point since V3 is almost here, but if anyone wants to see how it can be done, my whole game is open source[3].
- Phaser.Group is a weird concept, but very powerful. Not only useful for object pooling, but also for creating custom GUIs using surfaces with coordinates relative to the group size/position. Makes nested dynamic UIs very easy.
- Phaser's scaling system[4] is awesome. Use it. Don't try to reinvent the wheel yourself!
Richard and crew, if you're reading this, THANK YOU! You've built an incredible project. Thank you for sharing it with the world.
[1] http://www.toomanycaptains.com/
[3] https://github.com/TooManyCaptains/TooManyCaptains/tree/mast...
[4] https://photonstorm.github.io/phaser-ce/Phaser.ScaleManager....
I tried to avoid webpack since I knew compile time would be an issue for my other team members and it turned it out it was. As a web-dev I'm use to its workflow but onboarding game devs hate it. I have to hear everyday lets move to Godot, Unity, Unreal Engine because waiting 4 seconds for compiling is a headache.
Switching to Typescript is great for larger teams because it makes properties explicit. I personally like coffee-script and find it more productive if I'm the only dev but I swallowed the medicine on this one and it was worth it.
VSScode is powerful with Typescript but its not as productive as VIM. I think of code completion and seeing errors right away as crutches that atrophies a developers own skills to find code and errors but they can make it much easier for juniors and lower the bar, pair this with wallabyjs and you have a controlled environment that catches everything for you.
I found no resources on testing Phaser but figured out my own way of mocking Phaser objects, and came up with my own way to write acceptance-like tests for my game without electron.
I really wanted to contribute to Phaser3 and had put great effort to join but Richard was useless in responding. He said he was porting their tickets from Trello to Github and then I could contribute which never happened, I asked month over month. I really wanted to use Phaser 3 to future proof my game and I would have contributed significantly. I could have forked PhaserCE but its a mess which makes sense for the rewrite but working blindly on Phaser 3 would be futile. I am quite bitter about bitter about this because I 20 hours a week for 6 months I could have contribute and now I don't
I think I will likely just write my own lightweight game framework to map only what I need and gut Phaser. Even looking at Phaser 3 codebase with their big rewrite from scratch its still clunky and I think this is because they don't build games at a large scale with a team to have a good feeling to fine tune an engine.
That's an awful lot of "I am very smart" for one comment. You shouldn't need to repeatedly insult your fellow team members to express your thoughts on such matters.
Preferring vim over an IDE isn't enough to convict, but when someone starts associating the use of an IDE with "juniors", the verdict is guilty. Your choice of tools should be about getting the job done efficiently - using vim isn't a skill that demonstrates seniority or superiority.
>> I really wanted to contribute[...] put great effort to join but Richard was useless in responding[...] I asked month over month[...] I would have contributed significantly[...]
Classic "nice guy". You might have taken the hint after the first few weeks - or months - that he wasn't interested. I'm sure that, upon reading your comment, he would be relieved to know he didn't invest his time onboarding someone who would have sucked the life out of the project.
Source: You sound like me 10 years ago. Right down to the perspective on vim.
Really? You would rub sticks together for fire rather than use modern tools such as a lighter? I can't see how this reflects being a better programmer. While you are rubbing sticks, I am probably wondering how X can be improved and implementing that.
(meaning: team-based, has more days available, not part of the main "competition", which is about the solo achievement of making a 48 hour game)
It was my first introduction to either, and none of us had used Phaser before. My experience matches yours: combining the two made for a great dev experience, and the docs are confusing at times.
Luckily my friends Thomas ten Cate (aka Frozen Fractal) and Marten Veldthuis (aka... Marten Veldthuis) are excellent developers, who have struggled with way worse documentation, so we managed anyway. Docs aside, Phaser-the-framework seemed very well constructed.
Tangent: a few competitions later Thomas made Leonardo's Paint Machine[2], which is so amazing, especially for a 48 hour game, that I'll link it despite being made in a different framework (he uses Ludum Dares to try new out new frameworks and such).
[0] http://ludumdare.com/compo/ludum-dare-34/?action=preview&uid...
[1] https://blindedcyclops.neocities.org/ld34/index.html
[2] https://frozenfractal.com/games/leonardos-painting-machine/
(I was using timer instead of collision for bullets since I had the hit/miss outcome coming from a percentage base rile as opposed as game phisycs and expired bullets just at the right time to make them appear misses - maybe not the greatest idea mind you but eh got it working and was cool enough)
I can't imagine any project deliberately having crappy docs in order to sell resources, as you'd get almost no buy in to begin with.
Who wants to work on docs after all? Some people, but probably not enough
What's holding me back from starting to really experiment with it is lack of TypeScript definitions. Phaser 2 was what got me started using TypeScript, and as a C# guy I'm still holding out hope that I can get my work using TypeScript for some project or other.
If you've been wanting to play with TypeScript, I highly recommend taking a look at creating a simple game with TypeScript.
There's a lot of templates out there, and I've done some popular tutorials in TypeScript instead of the JavaScript they were written in.
It's a wonderful place to stroll stroll around even if you don't have a concrete question in mind.
I bet it's a great place to learn tricks for squeezing better performance out of the web too (even if limited to specific niche tasks).
Congratulations on shipping 3.0. I hope it inspires a lot of great talent to discover themselves.
One thing I would recommend for someone trying it out, especially coming from C/C++ game development like I did, is to use Typescript and the tooling that comes with it.
Anyone know what the rendering is like now?
I used to make Web Games, but then I realized the race to the bottom and bailed all together. I found after 10 years as a GameDeveloper (where every project is practically unique) has made being a React developer almost like using a baby's soft toy.
My job is beneath me, I sleep like a baby, and I get paid 4 times more than being a game developer for a job that demands 1% of the effort on a daily basis.
I don't miss my times with gaming at all and I would never go back.
Each to their own!
Gonna need some explanation here... does it spit out native code? Where are the tools? And since it's HTML5 why can't I just run the thing in a native web view? Are there perf issues?
Phaser is a great framework. I managed to conceive, write the game from scratch and have it in the app store within a day.
It's no longer on the iOS store as I didn't continue to pay my dev licence, but happy to share the play store link if anyone is interested.
In the end was running well enough from the browser too making wrapping moot.
It’s published at http://increstellar.com and the code is not obfuscated but beware: it’s very amateurish
I'm not an Android or Swift dev, but I imagine you can just stick it in a native webview, which is what I believe Cordova does.
As for performance I can't imagine it's super-performant, but I do know the lead dev does his best to aim for 60fps rendering even under heavy duress.
I really like it, but development on the project has been stagnant, and I’m considering a move.
Can anyone whose used both speak to what Phaser does better/worse than ImpactJS?
One of the recent posts mentioned that TS defs would be part of launch, but it's been quiet on that front now.
There's a closed issue in GitHub where someone is creating defs themself.
If I remember correctly TS community support was why he didn't stick with it. Community voted and straight JS but with TS defs were going to be the target.
Both frameworks have 17,500 stars on github.
Phaser uses an old customized version of pixi for the visuals.
If on the other hand you want the option to build for desktop or mobile and other platforms try Unity. Why not pick Unity from the start? It supports building in WebGL but you can't really delve in that automatically generated javascript code to fix something in there and even if you tried to do it you would have to do it every time you build your game. You just have to trust that Unity will keep up to date its framework and its build system will optimise it as best as it can.
Also with Unity you trust your art and music to its packaging system. You can change some of the import options, but in the end you depend on its optimisations.