Posts Tagged ‘update’

  • Phaser 0.9.5 Released – Camera FX, lots of Tilemap updates and more!

    And here’s Phaser 0.9.5 :) A lot has changed in this update. The most fundamental updates include:

    New FXManager

    In previous versions, as in Flixel, camera effects like shake, flash and fade were all bundled into the main Camera class. This has now changed. A new project, Special FX was created and all of the effects moved there. A Camera now has an fx property to which you can register any number of effects that you want. The effects are also compiled to their own js file (phaser-fx.js), so if you don’t need to use any of them in your game you can save some extra bytes. The Camera class is now a lot smaller and faster as a result too. It also allowed us to add in new effects, so feel free to play with the Camera Scanlines and Camera Mirror effects :)

    In a future version we’ll adopt use of the FXManager for other game objects, not just cameras.


    Lots of Tilemap Updates

    Tilemaps have really been given an adrenalin boost in this update. For example collision with them is now much more flexible. You get a list of all colliding tiles returned (not just a boolean), you can control if a tile should cause separation if an object collides with it or not and finally set your own collision callbacks.

    As well as this we added a lot of map data manipulation commands. For example replaceTile will scan the map (or a region of it that you define), replacing all instances of a specific tile for another. There is also swapTile, fillTiles, putTile, randomiseTiles and new methods to get tile data. You could now easily create an in-game tile editor should you wish. The above screen shot is from one of the new tests showing putTile in action.

    Boot and Pause Screens

    Phaser has always had a built-in boot and pause screen. Before they were bundled into the Stage class, but have since moved into their own area (system/screens) making them much easier for you to customise as you see fit, and also keeping Stage cleaner as a result.

    TypeScript declarations

    The project is now generating TypeScript declaration files. This was important to get the new SpecialFX library working and we’ve updated all of the test suite to use them. Basically it means you can now start a fresh TypeScript project and just copy in the lib.d rather than all the source for the whole framework. Of course if you’re coding using JavaScript this means nothing to you :)

    As well as the above there are lots of bug fixes, thanks to the support of devs reporting issues on github. Please do keep them coming.

    I’ll be away for most of next week in LA at Adobe Max, so 0.9.6 will be at least 3 weeks away, but it will focus heavily on expanding the Input handling.

    Check out Phaser on this site, or direct on github.

  • Phaser 0.9 Released – Motion, Collision, GeomSprites and more


    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:

  • PixelBlitz Update – addLimit() and removeLimit()

    While chatting to Norm on MSN we were both quite surprised at the lack of Game specific libraries / frameworks for AS3. Things that make creating a game as easy as possible for the developer. That is what we really want PixelBlitz to turn into, and I made another small step towards it today.

    I’ve commited r22 to Google Code, which contains two new commands: addLimit() and removeLimit(). They are as easy to use as this:

    //    The Player
    player = new PixelSprite(new Bitmap(new plane1BD(0, 0)));

    //    Limit the player to the region starting from 100,100 down to 450,300
    player.addLimit(100, 100, 450, 300);

    Essentially all it does is limit the PixelSprite to a set region of the stage (in this case a 350×200 block in the middle). It’s far from earth shattering, but PixelBlitz is about helping you make your game quickly, with as clean code as possible, and all these little things build up over time.

    It means that when checking the keyboard to see if you can move the player, you no longer also need to check the X/Y position, because that is being handled for you.

    I’d post a demo, but I figure you can work out what it looks like already :)