Jump to content

Search the Community

Showing results for tags 'game bounds'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. Hi guys! i am a beginner user 1st time building a game using Phaser. I am trying to build a climbing game where a guy tries climbs up a trunk with obstacles as high as he can. So far, this is what i have got: Currently, the obstacles(rocks) appear across the whole game.world.width. How do i set the game bounds so that the obstacles will only appear within the trunk? I tried using sprite.input.boundsSprite = trunk; and sprite.input.boundsRect = trunk; but it seems its only applicable to bound sprite dragging. Then i tried game.world.setBounds but from the Phaser docs, do not quite understand how do i set the trunk as the game border. especially when I hope for it to scale so as it will appear right for all devices. Additional info, some of my code: var game = new Phaser.Game(window.innerWidth * window.devicePixelRatio, window.innerHeight * window.devicePixelRatio, Phaser.AUTO); Using tileSprite to create the trunk for player to climb: this.trunk = this.add.tileSprite(Math.ceil(this.game.world.width * 0.15), 0, Math.ceil(this.game.world.width * 0.7), this.game.world.height, 'trunk'); *The background is not a sprite but just a normal sky blue background color. Can you please kindly advice? Thank you!
×
×
  • Create New...