Jump to content


  • Content Count

  • Joined

  • Last visited

About nandobtz

  • Rank

Recent Profile Visitors

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

  1. It worked graciously! Thanks a lot Flow! Much appreciated!
  2. I've been trying for HOURS. It seems that the player isn't responding to the game.physics.p2.setBounds. I know it's asking a lot but would you be able to look at the code and tell me if you see anything that could be blocking it? http://flagz.io/__versioncontrol/0.2-fp/js/game.min.js You'd find it under Game.create = function You can see this modified version of the game here: http://flagz.io/__versioncontrol/0.2-fp/ game.physics.p2.enable(player) is under Game.Cplayer = function Should it be under the 'create' function? I've tried it but it didn't work.
  3. That's exactly what I need (besides the broken left bound). I'm still not sure why I can't implement it into my game. Grr. Frustrating. Please let me know when you figure the broken left side. Thanks!
  4. Hey Flow, do you happen to have a codepen for your code? I'd like to see it working live. Thanks
  5. Here's the complete piece of code inside the Create Function: Game.create = function () { this.time.advancedTiming=true; Game.playerMap = {}; deadland = game.add.tileSprite(world.x1 - 1200, world.y1 - 1200, world.x2*2, world.y2*2, 'deadland'); game.world.sendToBack(deadland); land = game.add.tileSprite(world.x1, world.y1, world.x2, world.y2, 'earth'); land.fixedToCamera = false; land.boundsPadding = 100; game.world.sendToBack(land); // Enable p2 physics game.physics.startSystem(Phaser.Physics.P2JS); game.world.setBounds(world.x1 - 1200, world.y1 - 1200,
  6. I've tried with game.physics.p2.setBounds(world.x1, world.y1, world.x2, world.y2); and game.physics.arcade.setBounds(world.x1, world.y1, world.x2, world.y2); I've tried with number as well. None of them seem to work. Player still goes to the darker area.
  7. My idea is to do like most multiplayer .io games do when the player reaches the boundaries. You can't go to the darker area. Diep.io, for example: https://gyazo.com/3fca590076b2e2c1de23beab799243d8 Notice that the player always stays centered because of that extra area. The 'deadland' tileSprite, in my case, would be the darker area. I can do it without this deadland sprite, but the darker area would be a black background instead: https://gyazo.com/a3a2d1cd249e7a32ad6776306f88f333 The player can go there anyway. I need it to stop at the game world (lighter area)
  8. My goal is to make the player stay centered on the canvas at all times, even when he reaches the boundaries of the world. This is how it is now: https://gyazo.com/ea478d70b78201ad51aa6ae09b2649a6 And I've modified the code to be like this: deadland = game.add.tileSprite(world.x1 - 1200, world.y1 - 1200, world.x2*2, world.y2*2, 'deadland'); land = game.add.tileSprite(world.x1, world.y1, world.x2, world.y2, 'earth'); land.fixedToCamera = false; land.boundsPadding = 100; game.world.setBounds(world.x1 -1200, world.y1 -1200, world.x2*2, world.y2*2); game.physics
  9. I'm using phaser ce v2.10.1. Not sure if it makes any difference. It worked fine for me.
  10. Yes, it is a multiplayer game, kind of like agario and diepio. You can check it at http://flagz.io (you won't see any players there because I haven't advertised it yet. Still in beta testing) If you want to check the multiplayer factor, I'd suggest you to open the game in 2 tabs or 2 different browsers. If you have a pretty good PC, you won't see any different in the move speed. But you can try to open the game in many tabs until your PC slows down. Then you will notice that move speed difference.
  11. I'm aware that the client's computer GPU might affect the game's performance (smoothness and freezing). But the game I'm creating now is being affected differently. The client's GPU is literally affecting his player movement speed globally (even on the other player's views, not only locally for him). If you check other .io games like agar.io and diep.io, even with a slow computer, you will notice that the player movement speed is is the same (based on the same player level). It skips a few frames and it isn't smooth at all. But the movement speed is the same. Every player on my gam
  12. Wonderful, wonderful! I was able to implement it perfectly. Now that's exactly what I needed. The only thing I changed was the "var scale = Math.max(1, Math.max(scaleX, scaleY));" to var scale = Math.max(0.5, Math.max(scaleX, scaleY)); so players with smaller screen will have a similar view to bigger screen (not cut out). Thank you again, Samme. You're a savior!
  13. That's almost it, yes! Thank you samme! I will try to implement it and let you know how it goes. EDIT: The only thing I noticed that doesn't fit with what I need is the WIDTH. On your pen, the height fills the screen. But the width doesn't fill the screen (see black bars on the left and right side). Any way to fix that too?
  14. Noob here using Phaser. But here's my issue: I'm struggling to get to a perfect scale on the game I'm building. The best option for me so far is Phaser.ScaleManager.RESIZE; But this method doesn't have a limit to the canvas size. If an user has a huge screen, say 30 inches, he'd have a lot of advantage over an user with a medium size screen, say 17 inches. The 30 inches user would have much more view of the world. I've tried to set the canvas to a fixed size, like 1280x720, then dynamically resize the canvas style. And using Phaser.ScaleManager.SHOW_ALL; But it doesn't do the trick be
  • Create New...