Hacker News new | past | comments | ask | show | jobs | submit login
Phaser – A fast, fun and free open source HTML5 game framework (phaser.io)
232 points by lobo_tuerto on Aug 15, 2015 | hide | past | web | favorite | 55 comments

This is a great resource of examples; the author uses Phaser for all the samples: http://gamemechanicexplorer.com

QICI Engine (http://www.qiciengine.com/) is a open-source JavaScript library based on Phaser with a web-based comprehensive suite of game making tools. It will be released soon, we want to help to make Phaser better. https://twitter.com/sailing8036/status/629495719414476800

Phaser News: http://phaser.io/news/2015/08/qici-dota-demo

Dota demo: http://engine.qiciengine.com/demo/0.5/dota.html

Performance demo: http://engine.qiciengine.com/demo/0.5/performance.html

Tower Defense demo: http://engine.qiciengine.com/demo/0.5/tower.html

Casual game demo: http://engine.qiciengine.com/demo/0.5/sources.html

Request Evaluation throws a 404.

Website is currently under construction, we will release QICI Engine next month. Thanks for your interest!

this sounds interesting, but I get:

> ERROR > Failed to contact the origin.

which demo causes this error?

the actual home page at http://www.qiciengine.com/, but it seems to work now.

After trying out several HTML5/JS game libraries, I'm pretty sure that Phaser is the best one for 2D games. It has frequent updates, great documentation and an awesome community support, too. One can learn a tremendous amount of game development techniques just be reading the source code of Phaser.

what would you say is best for 3d? (Html5 engines I mean)

I would recommend PlayCanvas [http://playcanvas.com]. :-)

We have an editor tool (like Unity/Unreal), good documentation, a great community of other developers. And the engine is open source if you're not interested using the Editor tools [http://github.com/playcanvas/engine]

The person I'm replying to is the co-founder of playcanvas, for disclosure's sake.

I looked at phaser recently, but couldn't find any examples of successful games made with it. Are there any success stories?

You know, this is one of the things that I think is really important in a game engine: Has a fully polished game ever shipped using the engine.

It's easy, by comparison, to get to the 80% point with a game -- especially if you have a sample to start from that's somewhat close to what you want to create. What's hard is making every little bit work correctly; creating a finished product that doesn't have glitches, that works on all devices/in all browsers, and that has a good "feel" throughout. That last bit of polish, that last "20%", probably takes well over 80% of the time; I'd estimate it at about 95% of the time. And if you start with an "80%" engine that hasn't gone through that polish phase at least once, then you're doing all that work yourself.

This isn't precisely what you asked: You asked for success stories. A casual browsing of the site doesn't find any published game lists, though. The creators of Phaser.io do have a list of games THEY'VE published with it:


Look at the "HTML5" options; they used to make games in Flash.

I looked at Phaser a while back, and decided against using it. None of those games actually look much more complicated than a proof-of-concept, 80%-at-most demo.

On the other hand, Cocos2d-X has been used in dozens of hit games, and they are up to v3.0 of Cocos2d-js, which looks awesome, has an amazing free toolchain you can use, works in a browser, AND can be embedded in a custom wrapper on mobile (something like PhoneGap/Cordova, only tuned and optimized for game development -- it includes SpiderMonkey directly, for instance, so you don't have to worry about what browser it's running in).

The choice wasn't that hard.

I shipped one of the first large games with Haxe on iOS (in ~2011), and I am at a loss for words to describe just how right you are.

My game was complete, but the garbage collector would randomly crash, every hour or so. I spent nearly two weeks reading through incomprehensible C++ code, and completely failed to fix the problem myself.

Hugh, the creator of NekoNME, graciously helped me after I sent in a deterministically crashing test case, and that's the only reason the game was shipped at all. I consider myself a competent developer, but utterly incapable of debugging someone elses GC.

I also had to make a whole bunch of smaller fixes (eg adding in app purchases, fixing leaks etc), but those things I expected.

If you're evaluating an engine for use, there should either be a flawless game more complex than what you're trying to accomplish, or you should be ready, willing and able to traverse the full stack fixing whatever comes up.

(Note: Haxe is battle tested now.)

I released an android game using HaxeFlixel and the process was relatively painless, actually I was suroprise at how well it run on my device and how flawlesly things like immersive mode and in-app purchases were implemented.

But again, it as last year, so I assume 3 years make a huge difference in development, plus Haxeflixel is a haxe framework tailored for making games. To whoever might be interested in diving into it, we shipped a nice amount of polished finished games: http://haxeflixel.com/showcase/games/ (Mine is polaritron)

We made an entire mini-gaming platform on iOS with all phaser games. They are quick and challenging; though not big titles by any means. We've found phaser to be perfect for rapid development and prototyping.

You can check it out here https://wiblits.com/

The homepage, http://phaser.io/, is literally covered with games created with Phaser, many of them non-trivial.

You can find the full blog roll here: http://phaser.io/news/category/game

The makers of Phaser.io were commissioned to make a game for each of the emotions from "Inside Out". I believe it's on their blog or the main developers blog.

I'm working on 91 applications in it (Series of educational games/interactives/story books). It's going really well and we have more than half complete. There are some bugs, but any framework has that.

You do have a company right? How many applications/games have you already shipped?

Yes, but we don't normally do "games". I make games on the side for fun and it ended up with me doing some professionally. Out of the 91, I'd say we've 'shipped' 16 at this point; with 16-20 more in the final tweak stages (repack assets, adjust sound, add mouse overs, tweak animations, add additional tweens, etc). We'll be working on it through the end of the year. We've tried to take the flash apps and improve on the design. Most now run on a series of 'engines'. So take 91 apps; categorize them; build the engines, then script the games for each engine. We've just finished up getting mouth movements to match audio; and allowing activities to launch other activities by restarting the preload state. We have a series of Grunt scripts for each engine that package up each game/activity as a zip file that is SCORM compatible.

Coded http://lalo.li/car/ (desktop only) for a js-meetup talk in Vienna.

The good: as advertised, it's fast and free

The bad: as with every framework, I would have done it another way

Is this open-source?

MIT - https://github.com/franzenzenhofer/car

But don't look at the code, I'm ashamed of it!

I think it is. https://news.ycombinator.com/item?id=9539248

Really cool indeed, but at first I didn't draw wheels. Also the drawing area could be larger.

I've been tinkering with phaser for awhile, so far it's been an enjoyable experience. The best parts I've seen is the out-of-the-box support for animations and integration with tiled map editors.

Work in progress (not too much to show really)




Good examples and loads of tutorials. I just started playing with it and circular dependencies make me cringe. Game object initiates subsystems that in turn get their dependencies through game object, which is a requirement for initialising aforementioned subsystems. What is this pattern? It's really tough to compose things with it.

Working with it professionally, I agree. You pass the game object everywhere, no matter what. The variation if factory methods is also frustrating. It's ridiculous trying to reference how to create things when all the examples use game.add.<whatever> and sometimes you want to construct them separate and use .add.existing. But the standalone constructors will take different sets of arguments (including the game object).

I built a shooter with limited bullets with his. It was fun. I now encourage students to use this library. See my silly game at http://escape.bphogan.com. It should work with a mouse or keyboard.

My kids are currently learning Phaser. I highly recommend this for learning:


(Not affiliated with them in anyway, just a customer who purchased it for my kids to learn).

Here is a small game I made to learn the engine awhile ago:


It isn't polished yet as it's a work in progress, and I'm a pretty newbie programmer, so my code isn't perfect :)

It was pretty easy for me to learn, even without a lot of CS experience, and worked pretty well on mobile (at least iOS) without too much hassle. If you have no idea how to make a game and want to make a simple one fast, it seems like an awesome library to do so. The examples and tutorials were plentiful and I was able to find detailed ones on third party sites as well.

This is quite a coincidence, I first learned of Phaser earlier today as I was investigating various modern HTML5 gaming engines. I have finished writing the story for a game that's been in my head for years, and I am eager to move on to implementation now that the story is solid. I may opt to roll my own engine since I am well-versed in the necessary minutia, and I enjoy the learning experience. But on the other hand, it would be nice to release the game within the decade. Damn the relentless march of time.

About a year ago, some friends and I made a small game using Phaser at a 12-hour hackathon. It's a nice little framework and, while we didn't really make use of many of its features, it was really easy to pick up.

Check out what we built here: https://github.com/gavinanderegg/coffeeQuest

I am going through the official tutorial right now. Are there any:

1) examples of phaser games using multiple .js files?

2) games with multiple levels?

And what are the best games made with phaser?

I could possibly get you an example of both if you were interested. Most of the people using Phaser are using Tyepscript and doing multi-module management with that. I use Browserify (and bring in Phaser separately).

If you have a state that loads levels, you change the level targets and restart the state so that the preload runs again and gets the new resources. Or you can load everything up front and approach multiple levels that way.

yes please teach me!

Here is a multi-module project I wrote back in January: https://github.com/georgefrick/PhaserJsDemoGame

Here's a game with multiple levels and multiple .js files I made last June.

Source: https://github.com/frontfish/blobber Play: http://frontfish.net/games/blobber

> 1) examples of phaser games using multiple .js files?

Not a example but you can use Yeoman to organise your code.


Thomas Palef wrote 12 Phaser games in 12 weeks sometime back: http://www.lessmilk.com/

Is there any way to eliminate mouse lag? For example, in http://gamemechanicexplorer.com/#raycasting-2 the light source lags visibly behind the pointer. I'd prefer it it was locked to the pointer.

I think that example is recalculating the wall positions for every frame. That works for an example of a mechanic, but you wouldn't do that in a real game.

I think the problem is worse than that. Here's a small jsfiddle showing that JavaScript's onmousemove is inherently laggy: http://jsfiddle.net/z8h6y787/

Also see this page: http://atebits.github.io/browser-input-latency/

The framework is good, however I got faster (fps wise) results using my own rendering functions on Canvas than I was getting using their rendering on both Canvas and WebGL. I think in their efforts to be basically a drop in replacement for Flash/AS3 they have really let themselves down.

the rendering is done by another library (pixi.js), and there is currently a rewrite of phaser underway, which will include a custom renderer, that is already much faster than the old one.


Make sure to check out Tiled , a level editor. It works great with phaser. Easy to use and learn. Free.

I really REALLY like the examples they put up. This is a good resource for an entry level game-designer/programmer to try out some ideas.

It's true, the examples are nicely presented. Full game examples would be good though. The community section has some, but I couldn't find anything really impressive.

The car on terrain box2d example looks promising, but the question is, how does it perform in the context of a full game? Hillclimb Racing is the benchmark to aim for... great native app game. If we can get that performance happening in the browser with these engines then we're doing okay, but I can't help doubting these engines are up to Hillclimb Racing standards. That is, fast and smooth with lots of track loaded in memory. Even the native app suffers a slight stutter on occasion as it loads more track ahead, so I wonder how much track can be in memory in the browser. (I'm guessing these side scrolling games have a maximum window of game area available at any one time).

does anyone know of an example of a TCG/CCG or other card games built with phaser? I've been looking for a while without success.

https://solitaire.gg is my card game, it's WebGL/Phaser.

Does it have any built-in tweening support? I remember choosing Easel.js a couple of years back because of this.

It does, and they're easy to use.

Phaser is pretty impressive. i am building my first game on it and i am in love.

Applications are open for YC Winter 2020

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact