rich Posted February 14, 2014 Share Posted February 14, 2014 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. binarez, jerome, tackle and 1 other 4 Link to comment Share on other sites More sharing options...
rich Posted February 14, 2014 Author Share Posted February 14, 2014 For those wanting to test it this weekend I've just pushed up a new build including phaser.js and phaser.min.js versions too Play with the code in the examples/wip folder (and labs folder too). tackle 1 Link to comment Share on other sites More sharing options...
Alvin Posted February 14, 2014 Share Posted February 14, 2014 What a week indeed Congratulations Link to comment Share on other sites More sharing options...
Vidsneezes Posted February 14, 2014 Share Posted February 14, 2014 Cool, I love digging into the Phaser source. I learn something new everytime! Arlefreak 1 Link to comment Share on other sites More sharing options...
Fishrock123 Posted February 14, 2014 Share Posted February 14, 2014 For those who are curious, here's the week in 1.2 commits: https://github.com/photonstorm/phaser/compare/d583b36...1cb40b6 tackle 1 Link to comment Share on other sites More sharing options...
Lonan Posted February 15, 2014 Share Posted February 15, 2014 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 More sharing options...
rich Posted February 16, 2014 Author Share Posted February 16, 2014 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 More sharing options...
Zaidar Posted February 16, 2014 Share Posted February 16, 2014 Wow this is so great ! I can't wait 1.2 ! I'd really mike to help by coding, but I feel I'll just break the code base, so I think I'll test 1.2 and try to find bugs and issues ! I'm very exited by the way Phaser grows ! Link to comment Share on other sites More sharing options...
Recommended Posts