Search the Community

Showing results for tags 'background image'.



More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • 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

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 4 results

  1. Hi guys, Today I want to try make some simple game with Phaser, but I stuck at the beginning. I can't set background image, also there is no tutorial or examples about basics. I have a code like this: http://jsbin.com/solerulu/5/edit And I don't have any idea why it's not working. In firebug I see background.png is loaded but nothing happends. I see black rectangle only. Could soimeone help me?
  2. preload(){ this.game.load.image('main_background', 'assets/images/gamemenu/background.png'); } create(){ this.background = this.game.add.sprite(0, 0, 'main_background'); } i'm loading an image in preload function and using that as a background . but this gives me an error """" Key "main_background" not found in Cache. ""
  3. I have a top down view game in which the camera is centered at the center of the world, and uses lewster32's zoom technique as discussed in this post http://www.html5gamedevs.com/topic/9920-camera-zoom/?hl=zoom I am trying to create a background image that fills the entire world, but I have been unable to do so. I am able successfully load the background image using the following code: var background = this.game.add.image(0, 0, "lightBlueBackground");background.anchor.setTo(0.5, 0.5);The background images shows up at the center of the camera view. However, using the following code results in a background that only takes up a small portion of the center of the view. var backgroundScaleWidth = 4000 / background.texture.frame.width;var backgroundScaleHeight = backgroundScaleWidth/16 * 9;background.scale.setTo(backgroundScaleWidth, backgroundScaleHeight);If I use large numbers for the scale values like 5000, I get a larger background, but I can not tell where the world boundaries are. Since I'm dynamically adding items to the world, I want to make sure that they are actually on the world, and not beyond it.
  4. Hello everyone, I've looked over all the forums and help docs for how to include a background image for my Phaser game, but for some reason mine isn't working. I keep getting this error repeatedly: "WebGL: drawElements: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering or is not 'texture complete'. Or the texture is Float or Half Float type with linear filtering while OES_float_linear or OES_half_float_linear extension is not enabled. " I have this code in preload(): game.load.image("background", "assets/background.jpg");And this code in create(): background = game.add.tileSprite(0, 0, 1000, 600, "background");Any help would be appreciated... Thanks!