Jump to content

Phaser 1.1.3 "Arafel" Released - Hello WebGL shaders


rich
 Share

Recommended Posts

I'm pleased to say that version 1.1.3 of Phaser is now released!

 

And we've also now got over 1000 stars on our github project, which is excellent :)

 

This release focused on updating Phaser to use the latest version of Pixi.js, which introduces the wonderful world of shaders to your WebGL games. We have been busy creating and modifying shaders for your use, and you'll find a bunch of them in the new filters folder in the repository plus examples in the Examples area. They include fire, plasma, light beams, blur effects and lots lots more coming.

 

There is also a brand new (but still experimental) BitmapData object which we'll work on making more solid over the coming weeks, but it essentially gives you a blank canvas onto which you can draw, plot lines, render text, copy chunks and perform effects and but it can also be used as a texture by any Phaser.Sprite - so dynamic sprite effects are now a whole lot easier. We'll carry on ironing out this class, but it's already pretty powerful.

 

I have spent a long time updating the documentation as well. Some classes which didn't have any, like all the Tilemap ones, are now fully done. And I've replaced lots of instances of "Description" (i.e. "todo") with actual meaningful descriptions. Many type definitions have also been fixed. Thanks to community help the TypeScript definitions file is now a lot more accurate too.

 

There is an extensive change log on the github repo, but I've included the 'new' section below.

 

We will aim to get 1.1.4 released before the end of the year and then start planning out the features that will make 1.2 (almost certainly a proper physics system, as our p2.js tests are going extremely well).

 

Enjoy everyone!

 

post-1-0-49252000-1385751719.png

 

* Phaser.Filter. A new way to use the new WebGL shaders/filters that the new version of Pixi supports.

* Phaser.BitmapData object. A Canvas you can freely draw to with lots of functions. Can be used as a texture for Sprites. See the new examples and docs for details.

* The entire Phaser library has been updated to match the new JSHint configuration.

* Added a .jshintrc so contributions can be run through JSHint to help retain formatting across the library (thanks kevinthompson)

* Added a new in-built texture. Sprites now use __default if no texture was provided (a 32x32 transparent PNG) or __missing if one was given but not found (a 32x32 black box with a green cross through it)

* Loader can now load JavaScript files. Just use game.load.script('key', 'url') - the file will be turned into a script tag in the document head on successful load.

* RenderTexture.render now takes a Phaser.Group. Also added renderXY for when you don't want to make a new Point object.

* Physics.overlap now supports Sprites, Groups or Emitters and can perform group vs. group (etc) overlap checks with a custom callback and process handler.

* Added Sound.externalNode which allows you to connect a Sound to an external node input rather than the SoundManager gain node.

* Added SoundManager.connectToMaster boolean. Used in conjunction with Sound.externalNode you can easily configure audio nodes to connect together for special effects.

* PluginManager.remove, added PluginManager.removeAll (thanks crazysam)

* scrollFactorX/scrollFactorY have been added to TilemapLayers (thanks jcd-as)

* Phaser.Game parent can now be an HTMLElement or a string (thanks beeglebug)

* Now using the latest version of Pixi.js. Which means you can use all the sexy new WebGL filters :)

* Sprite.animations.getAnimation will return an animation instance which was added by name.

* Added Mouse.button which is set to the button that was pressed: Phaser.Mouse.LEFT_BUTTON, MIDDLE_BUTTON or RIGHT_BUTTON (thanks wKLV)

* Added Mouse.pointerLock signal which you can listen to whenever the browser enters or leaves pointer lock mode.

* StageScaleMode.forceOrientation allows you to lock your game to one orientation and display a Sprite (i.e. a "please rotate" screen) when incorrect.

* World.visible boolean added, toggles rendering of the world on/off entirely.

* Polygon class & drawPolygon method added to Graphics (thanks rjimenezda)

* Added Group.iterate, a powerful way to count or return children that match a certain criteria. Refactored Group to use iterate, lots of repeated code cut.

* Added Group.sort. You can now sort the Group based on any given numeric property (x, y, health), finally you can do depth-sorting :) Example created to show.

* Enhanced renderTexture so it can accept a Phaser.Group object and improved documentation and examples.

* Device.littleEndian boolean added. Only safe to use if the browser supports TypedArrays (which IE9 doesn't, but nearly all others do)

* You can now call game.sound.play() and simply pass it a key. The sound will play if the audio system is unlocked and optionally destroy itself on complete.

* Mouse.capture is a boolean. If set to true then DOM mouse events will have event.preventDefault() applied, if false they will propogate fully.

* The object returned by Math.sinCosGenerator now contains a length property.

 
Link to comment
Share on other sites

  • 2 weeks later...

Just getting stuck into Phaser now, after having been through the arduous (but very necessary) learning process of rolling my own engine from scratch, for several production titles.

 

I am incredibly impressed with the cleanliness of the Phaser API - and I cannot wait to get up to scratch with the engine and contributing to it's growth, 'on production' as it were. Massive thanks to Richard and Matt (and every other author) for your epic contributions to an embryonic industry - you shall never be forgotten ;)

Link to comment
Share on other sites

Still working on it, pushed up a load of new updates / fixes tonight. Tilemaps are ALMOST ready, but still need some more tweaks. They're already significantly better than ever before, but a few final issues to iron out (camera follow still broken for example). Not sure when it'll drop now, but should still be before the end of the year atm.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...