Jump to content


  • Content Count

  • Joined

  • Last visited

  1. I'm using Coding with Chrome on my school Chromebook. https://chrome.google.com/webstore/detail/coding-with-chrome/becloognjehhioodmnimnehjcibkloed?hl=en-US I checked the console and it says Phaser CE v2.11.0. I didn't really notice that before. What do you recommend as a resource for Phaser 2?
  2. How can I tell which version I have? The editor I'm using doesn't seem to list it anywhere. Can I do it programmatically?
  3. this.physics.add.sprite(32*i, 300+32*j, 'block'); didn't work either. It says: Cannot read property 'sprite' of undefined. Is this something that changed between phaser versions? There's a possibility I could be using a different version.
  4. I tried doing these game.physics.add.sprite(32*i, 300+32*j, 'block'); game.physics.add(mapObjs[i][j]); But neither worked. `game.physics.add()` isn't a method and neither is `game.physics.add.sprite()`
  5. That’s the same code I already have. And I will switch to groups later. At this point I just want to get this working so I know what’s going wrong.
  6. game.physics.add does not exist. You have to use arcade to specify which physics engine to use.
  7. I've started using the Coding with Chrome extension to code Phaser on my Chromebook. I've added gravity and I'm trying to detect when things collide using physics.arcade.overlap(), but the function I provide for when it collides is never called. What I do is I make a matrix of objects and then detect collisions between each of them and the player. I think there's a better way to do this with groups but I'll look into that later. Here's my code: var player, map, mapObjs; map = [['b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b', 'b'], ['b', 'b', 'b', 'b', 'b',
  • Create New...