Jump to content


  • Content Count

  • Joined

  • Last visited

About Batzi

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  • Location
    Outer Heaven
  • Interests
    Metal Gear

Recent Profile Visitors

1924 profile views
  1. Hello guys, I'm having issues with the iOS version of my app. LocalStorage is not working and I am not sure if it's a Cocoon problem or an iOS problem given it works great on Android. It seems that the data being stored is cleared after I quit the app. My app (Phaser) is packaged using Cocoon (Webview+). Any of you having localStorage problems on iOS? Are you using something other than Cocoon to package the app? Thank you
  2. Check this out: http://phaser.io/examples/v2/text/word-wrap
  3. As you probably know, when you are scaling the world in Phaser, the center point by default is (0,0). Been trying to zoom to a mouse pointer's coordinates but failed miserably with no luck. Anyone here managed to get this work?
  4. var map = game.add.sprite(x,y,mapKey); var player1 = game.add.sprite(x,y,Player1Key); var player2 = game.add.sprite(x,y,Player2Key); var sprites = game.add.group(); sprites.add(map); sprites.add(player1); sprites.add(player2); sprites.scale.set(0.8); The above code will scale down all the sprites to 80%. Not sure if that's what you want. EDIT: Just noticed you're asking for scaling to window screen. The code I wrote is for zoom. Thought you were talking about that kind of scale.
  5. Why don't you put your sprites in a group and scale that group?
  6. For mobile you can scale-in the sprite onInputDown and when you release it, it tweens back to normal scale. Anything to make it feel like a button is appreciated for user experience.
  7. Very beautiful game man! Love the artwork! I am at work now so don't have much time to test it out but one thing you could add that I find very important is when you hover over clickable objects just change the cursor to a hand so that we know it's clickable. var sprite; sprite.inputEnabled = true; sprite.input.useHandCursor = true;
  8. I'm sorry I was in a meeting. Here's what I'd suggest you try. Create 2 sprites. 1 is moved using the moveToXY() function and the other moves to the mouse pointer (where you click). Use camera.follow() on the latter. When you use moveToXY(), you can set the time you want your sprite to take to reach its destination. Something like this game.physics.arcade.moveToXY(sprite,x,y,velocity,time in ms); Now usually the sprite doesn't stop unless you tell it to so assuming you do something like this game.physics.arcade.moveToXY(sprite,200,200,20,2000); You're basically tel
  9. You should know that the update() executes a frame per second meaning that it is running game.camera.x++ every frame per second which is causing your problem. Keep that in mind. Let me do a sandbox for you and we can see if that sorts your problem. brb. I will load a sprite that is moved using moveToXY() and another that I will move using the mouse pointer and use a game.follow() on him
  10. what do you mean it halts while it loads the large mp3 file? You mean it keeps loading in the background while the bar has finished loading?
  11. are you placing this.game.camera.x++; under a condition?
  12. If you remove camera.follow() and make that sprite move like the other sprites, what happens? Do you still have the problem?
  13. what about the code for the other sprite that uses camera.follow() can you plz post that? And can you please wrap your code using the code tag in the editor?
  • Create New...