Leaderboard


Popular Content

Showing content with the highest reputation on 05/10/14 in all areas

  1. 1 point
    Hi guys, I've participated last weekend to Ludum Dare 29 and made a ant simulation game using Phaser. The game I have written a postmortem on http://greweb.me/2014/05/ld29/The game entry is available here: http://www.ludumdare.com/compo/ludum-dare-29/?action=preview&uid=18803 Feedback on Phaser This was the first time for me to use Phaser, and this was quite an awesome choice. The learning curve was quite smooth, the concept are clean and simple. I mainly use the Phaser API documentation, however by doing so I missed some guidelines on what to do, what to not do. But I had 48 hours to make my game, so not so much time to read tutorials. I've recently browsed the library source code and it is quite a good thing to do if anyone wants to use Phaser (that was great to see how the framework works and all the optimisation tricks) During my development there was one thing weird about performances: So my game is a big map of dirt tiles, and I first wanted to use a set of ~ 10 Phaser.BitmapData so I can have different gradient of dirt, and for each tile I would use one of this bitmap data randomly. However, even if a BitmapData is (I think?) suppose to be cached, my performance was awful comparing to just using Image Sprite. Any idea about this performance issues? Thanks, @greweb
  2. 1 point
    Good news, everyone: I got audio to work! (Within the CocoonJS Launcher. Will check compiled app and reconfirm. EDIT: Works!). Thanks to an idea from @Haden (thanks again for that), I found out that M4A isn't even supported under CocoonJS - not even on iOS. So here goes: Setup (as mentioned above): - Phaser 2.0.4 (Canvas+) - CocoonJS 2.0.0 - iPhone 5 iOS 7.1.1 1. I tested M4A, WAV, MP3 and OGG. M4A wasn't even loaded and only MP3 and OGG did actually play back. EDIT: We have MP3, OGG, WAV on iOS, OGG and WAV on Android. 2. Just like in some other mobile browsers, playback only worked after one initial touch, after preload was complete. EDIT: It turned out to be absolutely essential this touch happens BEFORE any audios are being loaded into the game. See this post for details. 3. A previous muted playback as suggested by @Haden in the above post, was not necessary. EDIT: Still isn't if you get touch input before loading. 4. Simultaneous playback of multiple audios works (I tested with two). 5. I experienced some slight lags between playbacks when looping. The lags appeared more frequent the longer the audio was. These may be different for CocoonJS 1.4.7 and other versions of Phaser. What. A. Day! I guess, I can go home and sleep soundly now. @videlias: You may have to update some stuff on the front page.
  3. 1 point
    Of all the games I played/rated, I have loved yours the most, mister. Its brilliant. Good job. I hope you win.
  4. 1 point
    adamyall

    Pinch and mousewheel

    http://jsfiddle.net/adamholdenyall/G68ee/7/ Made a fiddle to figure this out myself. Probably the best way to handle gestures is to just include Hammer.js as gesture support in Phaser itself is limited as far as I can tell. The example shows both pinch to zoom and scroll to zoom. Works for me on Chrome for Android and Firefox.
  5. 1 point
    imshag

    Swipe to Jump

    Hey rumdumdum! I implemented the swipe gesture in one of my prototypes lately. See code below: // 1st parameter determines the distance of the active pointer. My swipe distance trashhold is 150, you can play around with this value// in order to get a better feeling.// So basicly what you do is look for a certain distance (150) in a given time frame (min 100ms till 250ms).function onSwipe() { return (Phaser.Point.distance(game.input.activePointer.position, game.input.activePointer.positionDown) > 150 && game.input.activePointer.duration > 100 && game.input.activePointer.duration < 250);}Far from perfect, but it works fow now. Hope this helps!