from Hacker News

Phaser 3.0: HTML5 game framework

by johnhattan on 2/14/18, 12:40 AM with 59 comments

  • by aroman on 2/14/18, 3:30 AM

    I've spent the past 6 months building a game[1] using Phaser and TypeScript. On the whole, it's been a great experience.

    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/

    [2] http://phaser.io/phaser3

    [3] https://github.com/TooManyCaptains/TooManyCaptains/tree/mast...

    [4] https://photonstorm.github.io/phaser-ce/Phaser.ScaleManager....

  • by james-skemp on 2/14/18, 1:34 AM

    Having been watching this, it's still rough around the edges, but I have no doubt that Phaser 3 will get to feature complete and beyond at a nice pace.

    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.

    https://github.com/JamesSkemp/PhaserTutorials

  • by madethemcry on 2/14/18, 6:23 AM

    There is also a huge community around Phaser (as well as Pixi, the huge 3D gaming framework Babylon.js and many more) hosted by Richard who is developing Phaser.

    http://www.html5gamedevs.com

    It's a wonderful place to stroll stroll around even if you don't have a concrete question in mind.

  • by freehunter on 2/14/18, 2:26 AM

    A year or so ago I did a lot with Phaser. I learned I'm not cut out for indie game dev and since moved on, but man is Phaser easy to learn and easy to get more advanced in. Even though I don't use it anymore, I am a big fan of their work.

    Congratulations on shipping 3.0. I hope it inspires a lot of great talent to discover themselves.

  • by jjjensen90 on 2/14/18, 3:47 AM

    Aw man, looks like they moved away from naming releases after places in The Wheel of Time by Robert Jordan. I remember finding that when I stumbled across Phaser a couple years ago and being delighted. I made a toy "game" with some FSM actors and was impressed even in the much older version.

    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.

  • by keithnz on 2/14/18, 2:57 AM

    At one stage this was built on pixi for 2d rendering ( http://www.pixijs.com/ ) but I think 3.0 it took out pixi?

    Anyone know what the rendering is like now?

  • by Fifer82 on 2/14/18, 1:45 PM

    Great job guys on this long journey.

    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!

  • by birracerveza on 2/14/18, 8:12 AM

    I love Phaser! I've been in love with this framework ever since it came out because it's based on Flixel, which was per se an amazing framework built on AS3 by the same guy. Only Love2D comes close to it. I had completely forgot about it until now, and now that they added Typescript support I might just pick it up again for a spin. Is the renderer still bolted in? Last time I tried it I wanted to use it as backend for a multiplayer game, but couldn't because Pixi.js was a necessity.
  • by mephitix on 2/14/18, 2:31 AM

    "Games can be compiled to iOS, Android and native apps via 3rd party tools"

    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?

  • by Ycros on 2/14/18, 2:10 AM

    I'd expect the "What's New" section to tell me at a high level what's actually new in this release.
  • by cyberferret on 2/14/18, 4:38 AM

    My son and I built a small game together a couple of years back with Phaser 2. It was a really pleasant experience. I don't do game dev any more, but will probably take a look at Phaser 3 in the next few months and probably build another tiny game out of it just for fun. Glad to see such an excellent project still kicking along.
  • by uptown on 2/14/18, 2:46 AM

    Hadn't heard of Phaser but I'll definitely give it a look. Are there any frameworks that are specifically geared towards turn-based games with a "gameboard" similar to Scrabble / Words With Friends? I've been working on a game that follows this model, but have rolled-my-own implementation till now.
  • by Donzo on 2/14/18, 12:36 PM

    I’ve been using ImpactJS since around 2012 or so to make HTML5 / JS browser games.

    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?

  • by myth_drannon on 2/14/18, 2:23 AM

    Hopefully Thomas Palef will update his "Discover Phaser" book for Phaser 3.
  • by disease on 2/14/18, 2:34 PM

    Anyone know the story regarding TypeScript definitions and this project? I'm surprised to see that they don't seem to be available yet considering this project used to be written in TypeScript.
  • by ggregoire on 2/14/18, 1:57 AM

    What are the main differences with Pixi? I'm new to game dev, I picked Pixi 1 week ago because it's the one generally recommended on HN.

    Both frameworks have 17,500 stars on github.

  • by baldfat on 2/14/18, 1:36 AM

    I LOVE Phaser though I have moved on to Godot wanting to see if it is a better fit for me. Congrats to the team for making a great toolkit.
  • by drumttocs8 on 2/14/18, 2:39 PM

    How does this compare to standards such as Unity?
  • by dgritsko on 2/14/18, 2:41 AM

    How does this compare to the "Community Edition" of the Phaser framework?