Jump to content


  • Content Count

  • Joined

  • Last visited

About erich

  • Rank
    Advanced Member

Contact Methods

  • Twitter

Recent Profile Visitors

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

  1. Hi, Hope someone can help if I try to do a key press my animation stops until I let go of the key. (keys a and d) to move left and right - is there a way for the key press .onDown to be used once or an aletrantive way to have my animation play when the key is held down, I've tried using the docs but can't seem to find a solution eg demo below http://html5gamer.mobi/2019/ code snippet when pressing d if (this.keyRight.isDown){ this.player.anims.play('walkProper'); this.player.flipX = false; this.player.setVelocityX(150);
  2. Hi everyone, quick question, I googled that you can't add velecity to a group so I wrote this script and it works fine, but am I pulling to many resourses on the cpu if I create mulitble enemies at once on the screen, at present I have 2 enemies but will add more in laymans terms I have an external json file for the enemy x,y, key, velocity etc.., I then push each enemy into an empty array, and use a for loop in the update function to check collision against a wall and reverse the velocity here's the 2 parts I wrote in the create function : //create an empty arr
  3. Hi you can use the this.game.input.activePointer.isDown to use the screen as a button - I used it in one of my original games http://html5gamer.mobi/phaser2/oscar/ I made so you can press a mouse button on the screen (mobile use) or you can press the up cursor on a computer to jump sample code if (this.cursors.up.isDown || this.game.input.activePointer.isDown){ this.playerJump(); } else if (this.cursors.up.isUp || this.game.input.activePointer.isUp){ this.isJumping = false; } Hope that helps Eric
  4. Hi If anyone is interested I created a basic enemy path chase system. It may be of use to someone else trying to make one themselves or to create a better version of it. The basics of the sytem are quite simple (mainly 2 functions) - I created a map array and a group of enemies - In the update function I use the chaseMe() function for the enemies to use their "line of sight" to start the chase if the player isclose to the x and y on the stage - If the player escapes, there is a short timer that will move the enemy (moveMonster() function) in a random direction where it may "
  5. I found my error, I had this.player.body.immovable set to true
  6. (posted in phaser 3 instead of the phaser forum by mistake) Hi I'm hoping someone can hep me, I'm trying to create basic map using an array with 2 different images, one is a wall, the other is a floor. I've created twp groups but when i use this.game.physics.arcade.collide(this.player, this.blocks, null, this.hitBlock, this); I've used the collide function before on other games with no issues - this is my first time using a 2d array but I can't see where the issue is happening code below : cursor controls to move link example :http://html5gamer.mobi/projects/
  7. great read ! I foung intelXDK quite easy to port to the Google store for Android in my experience, I might try phonegap again (I had no joy the 1st time round) I haven't tried the leaderboard stuff yet - its on my to do list...... Eric
  8. very clever idea - well done
  9. was looking for the same - any good online examples ?
  10. have a look at: http://phaser.io/examples/v2/basics/01-load-an-image should be : create: function() { game.add.sprite( 0, 0, 'flag' ); },
  11. well done - thats really good ! Eric
  • Create New...