Jump to content


  • Content Count

  • Joined

  • Last visited

About Puflo

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Sorry for late response. That fixed the problem.
  2. No, scaleSignal is assigned before tileLayer. This error only happens after restart even if i don't resize the game.
  3. I have 2 states: Game and Idle, i switch state to Idle everytime player disconnects from the server, and state is switched to Game when player connects to a server. I get this error after restarting game state without refreshing the page: This SignalBinding causes the error this.scaleSignal = this.scale.onSizeChange.add(function(scaleObject, width, height){ if (this.map && this.collisionLayer && this.tileLayer){ this.collisionLayer.resize(width, height); this.tileLayer.resize(width, height); this.tileLayer.resizeWorld(); } }, this); I have this shutd
  4. Is it possible to check if sprite is a circle or not without manually specifying it?
  5. How can I call a function when Game state is shutting down? To be more specific, I want to close a connection when the game is switching to another state.
  6. Is sprites/sounds in phaser examples site free to use for commercial projects?
  7. I made a multiplayer HTML5 game for web browsers but i have no idea how to monetize it. I don't have a google adsense account and I don't think they'd accept my game with low (20-30) amount of players, i can't afford server prices without ads. Any suggestions are welcome. (except sites that show popup ads or only has paypal as payment method)
  8. I need to add google play games to my game, which cordova plugin would you recommend?
  9. Puflo

    Physics bug

    I can't get ship2 and ship3 to collide world bounds, what i'm doing wrong? They collide each other but only ship1 is colliding world bounds. ship1 = game.add.sprite(200, 300, 'ship'); game.physics.box2d.enable(ship1); ship1.body.setCircle(14); ship1.body.setCollisionCategory(1); ship2 = game.add.sprite(200, 200, 'ship'); game.physics.box2d.enable(ship2); ship2.body.setCircle(14); ship2.body.setCollisionCategory(2); ship2.body.setCollisionMask(3); ship3 = game.add.sprite(300, 200, 'ship'); game.physics.box2d.enable(ship3); ship3.body.setCircle(14); ship3.body.setCollisionCategory(2);
  10. Not sure but i think you can do something like this: // update function var currentTile = map.getTile(mapLayer.getTileX(player.body.x), mapLayer.getTileY(player.body.y), mapLayer); if (currentTile.properties.isLadder && cursors.up.isDown){ player.body.velocity.y = -200; }
  11. Puflo

    Physics bug

    What exactly is 2 + 4 and why is collision mask 4 colliding with ship 2?
  12. Puflo

    Physics bug

    Box2D always calls contact callback twice. Here's an example: Ship with collision category 2 (ship at left) calls contact callback once while ship with collision category 1 (default) calls it twice. I've been trying to fix this for weeks but couldn't find any solution in web, i really need you guys to help me. function create() { game.physics.startSystem(Phaser.Physics.BOX2D); game.stage.backgroundColor = '#2d2d2d'; // User-controlled ship ship1 = game.add.sprite(250, 300, 'ship'); game.physics.box2d.enable(ship1); ship1.body.setCircle(14);
  13. Okay, i have a little question; how can i draw a colored circle with bitmapdata? Couldn't find anything in examples.
  14. What is the difference between bitmapText, text and graphics, bitmapData? Which one should i use for mobile games?
  15. I want to create a ball inside a circle line, is there any way to do this in Phaser?
  • Create New...