Search the Community

Showing results for tags 'arcade.physics.collide'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Platform
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 2 results

  1. You play for a very greedy bear who is ready to fish until his energy is over. When you catch the right fish, some of the energy is restored, but over time it will end. Your task is to score as many points as possible, balancing between the more valuable fish and more nutritious. It appears randomly and jumps in a random direction.
  2. Soloshadow


    Hi everyone, I am pretty new to phaser but I am working on an endless runner game and I would like my player to be able to jump on top of platforms. BUt everytime I try to jump on one my character just pass through it like it isn't even there. This is the code to my platform (I am working in typescript if it matters) class Platform extends Phaser.Sprite{ private platform; constructor(g: Phaser.Game, x: number, y: number){ super(g,x,y,"platform",0); this.platform =,y,'platform') this.platform.scale.setTo(5, 2); //;, Phaser.Physics.ARCADE); //this.platform.body.allowGravity = false; this.platform.body.immovable = true; } public update(){ this.platform.body.velocity.x -= 0.5; /* if(this.platform.body.velocity.x < -(this.platform.width)){ this.platform.body.velocity.x =; console.log("this"); } */ } } This is the player class. I didn't work on this. A team member did this class Player extends Phaser.Sprite{ //create a subclass voor Phaser.Sprite private playerSprite =, 0, 'player'); //de url van de sprite staat in global.ts //gravity private jumpTimer = 0; private jump: Phaser.Key =; //mapping keys private jumpAlt: Phaser.Key =; private slide: Phaser.Key =; private slideAlt: Phaser.Key =; public speed:number = 30; private score:number = 0; constructor(game:Phaser.Game, x:number, y:number){ //word ook sprite aangemaakt??? super(game,x,y,"player",0); //Een typescript functie voor subclasses( ) //geen verwarring meer bij this.y en this.playerSprite.y this.playerSprite.x = x; this.playerSprite.y = y; //spritegrootte this.playerSprite.width = 100; this.playerSprite.height = 144; //muisklik (op telefoon is dat je vinger) this.playerSprite.inputEnabled = true; //, this); this.jump.onDown.add(Player.prototype.goUp, this); //Voer functies uit op basis van input this.jumpAlt.onDown.add(Player.prototype.goUp, this); this.slide.onDown.add(Player.prototype.goDown, this); this.slideAlt.onDown.add(Player.prototype.goDown, this); this.anchor.set(0.5,0.5); //verander de anchor point voor de sprite this.scale.set(0, 0.2); //jumping (gravity); // = 250;; this.playerSprite.body.collideWorldBounds = true; //, Phaser.Physics.ARCADE); this.playerSprite.body.gravity. y = 250; this.playerSprite.body.bounce.y = 0.15; this.playerSprite.body.collideWorldBounds = true; console.log("player setup"); } private doJump(velocity:number) { if (this.jump.isDown && this.playerSprite.body.onFloor() && > this.jumpTimer || this.jumpAlt.isDown && this.playerSprite.body.onFloor() && > this.jumpTimer) { this.playerSprite.body.velocity.y = velocity; this.jumpTimer = + 750; console.log("jumping"); } } And in the update function in the gameplay state we added, this.platform); this.player and this.platform is the name of the instance that was created in the gameplay state