mraak

Members
  • Content Count

    41
  • Joined

  • Last visited

  1. What finally worked is using your approach AND setting the second parameter to true. hero.animations.play("fall");hero.animations.currentAnim.setFrame(8, true);useLocalFrameIndex = true, works but I don't know what it means exactly. Thanks.
  2. No it should start from arbitrary frame. I was thinking of constructing 20 arrays but it seems like an overkill. And setFrame throws an error like the function isn't even there hero.animations.setFrame( _.random(0,45));Uncaught TypeError: undefined is not a function
  3. Can I play the animation starting from random frame, and then loop? Say I have 20 frames. I want to start from 8th, continuing to 20, and then loop from 1st all the way to 20th and so on. This doesn't seem to do anything: animations.frame = 8;animations.play("all");
  4. That's right http://examples.phaser.io/_site/view_full.html?d=animation&f=starling+atlas.js&t=starling%20atlas
  5. If I use MaxRects option to create a sprite sheet, currently I get this error. Is it possible to set it somehow, it would be great to make smaller PNG's. Also what about other options such as rotating frames? Uncaught Error: Texture Error: frame does not fit inside the base Texture dimensions [object Object]
  6. For that I use Gulp, it comes with local server, bower, and build automation - minifies your files and prepares them to deploy.
  7. The test page works on Samsung Internet browser, the Phaser example does not. So there must be a bug in Phaser. In about 10 apps, I can only get to hear some 10% of total sounds used. The Phaser example has the debug text that's showing everything correctly, but no sound is coming.
  8. The problem I had with Brackets and why I switched to Sublime, was the editing of the long files with many lines of code. Brackets were very slow at that.
  9. I haven't had much luck with any of the JS editors. There's webstorm that's supposed to be the best when it comes to JS development, but it's not free.
  10. I can't get any to work, but they do on Android Chrome, desktop browsers, iOS Safari, etc...
  11. This seems to be a CSS issue with Samsung Internet, nothing to do with Phaser. It would still be good to know how to workaround it.
  12. Very weird, I see two games on Android Browser, one overlapping the other, with one being displayed in the top left, and one centered as per CSS. Has someone encountered that already? It shows only one game in every other browser on any device. If I don't specify the target div in the Game constructor, and let it create the div, then it is working OK and only one game gets rendered. Game.super_.call(this, 500, 330, Phaser.CANVAS, "game_div");<html> <head> <meta charset="utf-8"> <title>Phaser game</title> <meta http-equiv="X-UA-Compatible" content="chrome=1, IE=9"> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=0, minimum-scale=1, maximum-scale=1,minimal-ui"> <style type="text/css"> head, body, #game { margin: 0px; padding: 0px; width: 100%; height: 100%; } </style> </head> <body> <div id="game_div"></div> <script src="main.js" type="text/javascript" charset="utf-8"></script> </body></html>
  13. Now it works on Android browser, but sounds are not playing or not playing at the right time. But by forcing CANVAS I'm getting all the colors wrong - I mean the background color I set to game, PNG colors are correct. I had to use int for color, not string and that fixed it.
  14. So, forcing canvas mode should fix it?