Jump to content

Phaser 1.2 Progress Update - w/e 14th Feb.


rich
 Share

Recommended Posts

So this week has been pretty monumental. I started it on anti-biotics and feeling like hell thanks to a chest infection, but progress has still been rapid to say the least.

 

All of the old Game Objects have now been moved over to 1.2 and given a serious spring clean. Gone are the strange inheritance structures and they're all now clean Object extensions, usually from either Phaser.Image or a core Pixi object. This means lots less duplicate code and in some cases loads of new features for less KB than before. For example the Phaser.Text class is much cleaner now while supporting some nice new things like mouse over events, drop shadows, gradients fills and more.

 

World and Stage have gone on a diet too and a huge amount of the physics is finished. Outstanding on this are easy ways to set-up collision groups (it's all bitmask driven, so I want to find a way to handle that nicely), some World properties and finally adding in Springs (tempted to maybe leave this for 1.2.1).

 

There's new BitmapFont and BitmapText classes too. BitmapText handles a lot of things more cleanly now (fonts with spaces in the name for example! woot!) and BitmapFont is for when you want to use old-school sprite sheet style fonts :) SpriteBatches are in now too.

 

The most complex problem left to solve is tilemap collision. I'm more than happy with how it's working internally and found a nice way to speed-up rendering considerably, but still need to find an elegant way to hook it up with p2. Most likely walking the collideable tiles and building a polygon from it, but this will need testing. The physics objects do have AABBs, so I could possibly use those for tilemap collision - but it won't be as accurate and I really want all the things you'd expect from it. More experiments needed.

Link to comment
Share on other sites

Awesome.

 

Just noticed a small issue (probably a work in progress) with setZeroRotation. It is currently setZeroRotation:function({ship.body.angularVelocity=0} 

 

but should be setZeroRotation:function(){this.data.angularVelocity=0}

 

Quick question: How do I draw debug lines around a physics object?

 

Looking forward to your progress next week!

Link to comment
Share on other sites

Lonan - yeah I fixed that last night, but thanks for posting :)

 

The version I pushed last night also contains a working game.debug.renderPhysicsBody function which works with p2, so you can use that now. It works for polygon shapes (so rects and loaded polys are fine) but not circles or capsules yet - will add those next week. Also added Springs. Not fully integrated, but working all the same :)

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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