18th Apr 2013
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
13th Apr 2013
With Phaser just announced we started thinking about a logo that would compliment the name. I made some rough sketches that we both liked and Rich thought it would be a good idea to share with you guys so you can see how this piece of artwork will evolve.
Have to say I am curious where it’ll go myself as currently I am not even sure if I want to give it a vector, pixel art, or CG painting treatment. Each method has its own advantages, both in terms of application and esthetics. Vectors are scalable and clean, pixel art is a natural fit given the nature of Phaser, and CG painting would retain some of the organic warmth of the original pencil sketch. Perhaps I will end up doing all three, we’ll see. I better keep my options open for the time being.
Before I grabbed my pencil we had a little talk and came to the conclusion that it would be nice, and also fitting, to have a very fun logo for Phaser. That is, not just a regular typographic logotype (although we need that too). It didn’t take long to come up with a busy space opera scene. You can see the evolution of the spaceman design as I felt that the default bubble helmet guy wasn’t iconic enough. Having recognisable characters is always a good thing, they will make the logo more memorable and can also serve as mascots. Some day they might even get a game of their own, you never know.
Those of you who didn’t fumble their perception roll will also notice a vector test of the logotype in top right. Rich was (justifiably) concerned about how the logo would stand on its own so we made a quick test. You will notice that the letters P, A and R had to be somewhat changed to work well outside of the distorted hand-drawn logo, but luckily I was able to preserve the style with minor modifications.
The next step for me is to think about colour that will bring the scene to life and make it work on any background.
12th Apr 2013
We’ve two exciting bits of news to share today. First we have just released Phaser. Phaser is a light-weight 2D HTML5 game framework based heavily on Flixel. Indeed it started life called Flixel5 but was renamed to avoid any potential confusion The current feature list is pretty comprehensive:
- Asset Loading
Easy loading for Images, Sprite Sheets, Texture Packer Data, JSON, Text Files and Audio Files.
Multiple world cameras that can scale, rotate, flash, shake, alpha and track sprites around the game world.
All sprites have physics properties including velocity, acceleration, bounce and drag and collision built-in.
Group sprites together for collision checks, visibility toggling and easy function iteration.
Sprites can be animated by a sprite sheet or Texture Atlas (JSON Array format supported). Animation playback controls, looping, fps based timer and custom frames.
A QuadTree based Sprite to Sprite, Sprite to Group or Group to Group collision system within world space.
An easy to use Emitter can emit sprites in a burst or at a constant rate, setting physics properties on them as it does so.
Keyboard, Mouse and Touch support (advanced gestures coming soon)
Easily change properties about your game via the stage, such as background color, position and size.
The game world can be any size and collision and motion is tracked across the whole world.
- Sound (partial support)
Currently uses WebAudio for playback. More work needs to be done in this area.
- State Management
For larger games it’s useful to break your game down into States, i.e. MainMenu, Level1, GameOver. The state manager makes swapping states easy, but the use of a state is completely optional.
All loaded resources are stored in an easy to access cache, which can be cleared between State changes or persist through-out the whole game.
Support for CSV and Tiled JSON format tile maps is implemented.
- Random Number Generator
A seed based random number generator allows for reproducible in-game effects.
- Game Scaling
Games can scale to fit any device and will scroll the URL/status bar away on Android and iOS mobile.
- Asset Loading
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