The latest version of Phaser was pushed to github today. This marks the v0.9 release and consisted of a large re-factoring of the code base, as well as lots of enhancements and new features:
- Everything now lives within the Phaser module, so it no longer creates anything in the global name space. It makes coding a tiny bit more verbose but is the right way to handle it. It should also allow for code-insight in editors like WebStorm to function correctly.
- NEW: GeomSprites. This is a game object that can be added to the world, but that uses any of the geometry primitives for its data. So you can populate a GeomSprite with a Circle, Rectangle, Point or Line and then have it rendered in your game world. This is extremely useful for fast prototyping.
- NEW: Collision class. This class handles all forms of object collision and intersection for both game objects and geometry. You’ll find methods for things such as checking for line intersection, circle overlaps, game object collision and more.
- NEW: Geometry Intersection results. This compact little object is returned by intersection methods and contains the resulting data about the intersection, rather than just a true/false.
- NEW: Motion class. This contains rafts of handy methods dealing with the movement and motion of game objects, such as ‘moveTowardsObject’ or ‘velocityFromAngle’ can be found in here.
- NEW: Tween Manager. You can now create tweens without using a 3rd party library. All the usual tween eases are supported (Bounce, Back, Circular, Quintic, etc) and it’s hooked into the core game clock. This means that if your game pauses when it resumes all active tweens will adjust themselves accordingly and carry on as normal.
- UPDATED: Input.Keyboard used to call event.preventDefault() on keydown, but that of course blocks all keyboard events from the browser – so simple things like pressing F5 to refresh the page stopped working. We removed that in the previous commit but it meant that using the arrow keys in a game would also scroll the browser window if large enough. Newly added to Input.Keyboard are addKeyCapture(), removeKeyCapture() and clearCaptures(). These allow you to consume key events but only for specific keys.
There are a couple of features left on the “to do” list before we will consider a Phaser 1.0 release and that includes tile map collision, documentation and enhancing the sound support. Once those are in we’ll release 1.0 and then turn to the community for suggestions on where to head next.
Right now we’ve very happy with what we’ve built. It’s compact (just 39KB minified and gzipped) yet extremely powerful, while still hopefully easy to use. That is of course a large part of where we need to go next: tutorials and a getting started guide. But first let’s take Phaser to a 1.0 release.
Support and general discussion can be found on the Phaser forum.
Latest updates can be found on github: https://github.com/photonstorm/phaser
2 ResponsesLeave a comment
Make yourself heard
All about Photon Storm and our
HTML5 game development services
Filter our Content
- Cool Links
- Flash Game Dev Tips
- Game Development
- Geek Shopping
- In the Media
- Phaser 3