Jump to content


  • Content Count

  • Joined

  • Last visited

  1. Can't say I notice any performance difference, but I prefer using groups as it keeps the code looking tidy. I was pleasantly surprised with collision detection worked with groups. this.game.physics.arcade.collide(this.player, grpEnemies, this.playerEnemyCollide, null, this); playerEnemyCollide: function(player, enemy){ //Player Enemy Collision } }
  2. anyone? dust? anyone? Or is there a way I can debug a single snowman and see all of it's properties, not just the standard positioning but the custom properties?
  3. I'm stuck with 2 last issues with my first platformer game. ***EDIT*** Here's a link for reference http://projectmayhem.co.uk/sandbox/santa/santa.html I can't get all of my snowmen to shoot, and also I can't seem to remove the 'kill' animation when a snowman dies. Any suggestions would be really helpful. I'm creating enemy snowmen and adding them to a group So I'm defining and creating the snowmen group then adding each snowman in the create with grpSnowmen = this.game.add.group();this.spawnSnowman(800,200, 'snowman1');Which calls the following, adding a new snowman to the group
  4. *UPDATE* http://projectmayhem.co.uk/sandbox/santa/santa.html Sorry about the blank screen, it was probably just taking a while to load but I've figured out splash/loading screens now. New version is now online, still need to iron out a few bugs, the enemy die animation is not clearing properly. And also I've yet to figure how to get all snowmen to fire snowballs simultaneously. Currently only the first snowman fires. It's not throwing any errors and as far as I'm away it should be looping through each snowman in the group grpSnowmen and calling a shoot function.. hmm weird.
  5. Is this at all possible? I originally managed to achieve the effect when I loaded in the background as one single image. But now I'm using tilemaps and adding to a layer with addTilesetImage I can't seem to get any movement there. It's just a simple x -= 0.5; //When moving right x += 0.5; //When moving left Here's how I'm currently loading the background layer: game.load.image('sky', 'assets/parallax-bg.png'); game.load.tilemap('map', 'assets/tilemaps/level1.json', null, Phaser.Tilemap.TILED_JSON); this.map = this.add.tilemap('map'); this.map.addTilesetImage('background_spriteshee
  6. http://projectmayhem.co.uk/sandbox/santa/santa.html So I wanted to try my hand at some gaming dev. My 3 yr old son has just started getting the hang of some simple platformers so I decided to make something seasonal for him. Got a long list of things to finish but so far I've got the hang of the fundamentals, tilemaps/spritesheets/collisions. Things to do: loading and start screen object/present collection and points scoring detect snowball-player and enemy-player collisions determine best sizing/ratio (sorry it's so small, but works best that way with the chrome debugger panel open) pa
  7. Strange, Have you tried de-bugging and see if simple collisions work first ie: game.physics.arcade.collide(grpAliens, grpBullets);
  8. I think it should be game.physics.arcade.collide(grpAliens, grpBullets, hitAlien); I think collide accepts 2 more parameters, whether they're required or not I don't know. Will have to look at the docs.
  9. Not sure about the tiles node in the Json file as I've now overwritten it with a working one. I'll see if I can re-create the error and post the message. I may have inadvertently jumped the gun on blaming Phaser for the problem! Let me grab the error message again to confirm.. In the meantime, I'm now struggling with getting a background layer to repeat with: game.add.tileSprite(0, 0, 1024,1024, 'sky');
  10. Hey everyone, Thanks for the replies. After a lot of trial and error, I updated to Phaser 2.2.1 which gave a few more hints in the dev console. Turns out Phaser can't handle more than 1 spritesheet. And I had 2 loaded in through my Tiled project. (Doh!)
  11. Hi All, New to phaser as I wanted to try my hand at game dev. I write business apps with ASP.NET Ajax so the odd bit of javascript doesn't scare me. Anyhow, I've been struggling for an entire evening trying to load a Tiled generated tilemap. json file is all present and correct and I've tried a variety off different tutorials/examples but al I get in the dev console is: 'Uncaught TypeError: Cannot read property '2' of undefined' Here's what I'm trying to use var game = new Phaser.Game(800, 600, Phaser.AUTO, 'mapPhaser', { preload: preload, create: create, update: update }); function p
  • Create New...