lapamplamouse

Members
  • Content Count

    3
  • Joined

  • Last visited

About lapamplamouse

Recent Profile Visitors

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

  1. I am making a 2d cross country horse riding game. The player will be able to move left and right and jump obstacles. I use tiled to make the obstacle course. I want to use matter physics because I needed detailed obstacles rather than just simple shapes. I have also used collisions because I could not find any other way to define whether a user has hit an obstacle on a tile layer. As I am not using collision physics (game over when I hit a obstacle) maybe there is a way better way of doing this game. Here is how I set up the collision: const road = this.make.tilemap({key:"map"}); const roadTileset = road.addTilesetImage("terrain", "tiles"); const belowLayer = road.createStaticLayer("bot", roadTileset, 0, 0); const collisionLayer = road.createStaticLayer("collision", roadTileset, 0, 0); const treeLayer = road.createStaticLayer("tree", roadTileset, 0, 0); //const topLayer = map.createStaticLayer("top", tileset, 0, 0); //collisionLayer.setCollisionByProperty({ collides: true }); collisionLayer.setCollisionByProperty({ collides: true }); this.matter.world.convertTilemapLayer(collisionLayer); this.matter.world.createDebugGraphic(); player physics set up as follows: player = this.matter.add.sprite(400,6300, "player").setOrigin(.5, .5); player.setBody({ type: 'circle', radius: 6 }); I am now trying to get the player to jump over barriers with collides property, I was hoping to do so by pausing the collides property for half a second or so to allow the player to move through when the jump button is pressed, but this is proving more difficult than anticipated.
  2. Thanks for your reply, but I just got it working. Yes, I want the slide type controls. I added a sprite for the tiller, and created a touch rotate function for it using 'pointermove'. I then record the rotation of the tiller and translate that to the degree to which the boat turns.
  3. I am starting out with Phaser/ Phaser 3, so bear with me. I am trying to make a mobile game with viking ship going up a river. the ship will always be moving forward, I wish to have a virtual tiller which the user will touch and drag to angle the ship left and right. I.e Changing the angle which the tiller is displayed on the screen, the more severe the angle the faster the boat will turn. Currently I change direction with the arrow keys on the keyboard. I tried adding it as a button, but got the error message add.button is not a function. Can anyone suggest where to begin this process? i.e add the tiller and allow it to tilt (I will be recording it's angle to determine how much to turn the boat). Attached is a image of the what I mean by tilting.