Cameron Foale Posted January 5, 2014 Share Posted January 5, 2014 Hi All, I created a little toy using Phaser. It's missing music and some other niceties, but it was done in a few nights. http://www.clientsmash.com The source is available on GitHub at: https://github.com/cocoademon/ClientSmash (it's hosted using GitHub Pages) Works fine on Chrome/Safari. Fails on Firefox on Linux at least, probably elsewhere. Works ok on iPad, but the scaling is off (I used a 1024x768 canvas instead of 1024x672). --- All the real action happens here:https://github.com/cocoademon/ClientSmash/blob/master/src/Game.js It heavily uses Phaser's BitmapData and canvas operations to create the dude's face, and then to take chunks out of it. The code was developed quickly and so has the expected copy-paste coding and minimal commenting, but it might be useful. Caveat lector. --- The only real pain-points Phaser-wise were that drawing Sprites to the BitmapData canvas loses all the sprite niceties like atlasing, rotation etc.Although you could potentially create a new PIXI.CanvasRenderer and go from there, I wanted to avoid using anything outside of Phaser and vanilla HTML5 for this. It would also be nice to have an alternative to Phaser.StageScaleMode.SHOW_ALL that actually adjusts the aspect ratio, which is then available through this.game.widt/height.From my perusal of the Phaser source this actually seems like a fairly hefty undertaking though, tackle, XekeDeath and Arlefreak 3 Link to comment Share on other sites More sharing options...
rich Posted January 6, 2014 Share Posted January 6, 2014 Dude that was... disturbed evan312 and XekeDeath 2 Link to comment Share on other sites More sharing options...
Mike Posted January 6, 2014 Share Posted January 6, 2014 Yep the sound made me jump... but hey it's working as expected! Link to comment Share on other sites More sharing options...
4ucai Posted January 6, 2014 Share Posted January 6, 2014 lol Link to comment Share on other sites More sharing options...
Cameron Foale Posted January 6, 2014 Author Share Posted January 6, 2014 I built it as a gift for a designer friend - clearly I'm not actually a designer. Think of it as a stress ball Link to comment Share on other sites More sharing options...
XekeDeath Posted January 6, 2014 Share Posted January 6, 2014 I work with this guy, so if I ever stop posting here suddenly, you know what happened to me... Cameron Foale and tackle 2 Link to comment Share on other sites More sharing options...
jerome Posted January 6, 2014 Share Posted January 6, 2014 so politicatlly incorrect ... I love ! Link to comment Share on other sites More sharing options...
PAEz Posted January 6, 2014 Share Posted January 6, 2014 hahaha Link to comment Share on other sites More sharing options...
Recommended Posts