Heppell08 Posted January 15, 2014 Share Posted January 15, 2014 So i was looking at parallax scrolling backdrops and want it in my game. I have 1 large backdrop image and it can be scrollable with edges meeting eachother to look seemless. When i load in the tilesprite i get a lovely message in console on chrome with this message: Phaser v1.1.3 - Renderer: WebGL - Audio: WebAudio phaser.min.js:577WebGL: 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. phaser.min.js:3Also that 77 in there keeps going up. Any idea? Link to comment Share on other sites More sharing options...
jcs Posted January 15, 2014 Share Posted January 15, 2014 most likely your texture (tilesprite image) needs to be have power-of-two dimensions. this is an artefact of WebGL and the underlying technology that it uses (OpenGL, 3d GPU hardware). Mike 1 Link to comment Share on other sites More sharing options...
rich Posted January 16, 2014 Share Posted January 16, 2014 Yup, use ^2 textures for now. Pixi actually fixed this in their 1.4 update, so that fix will get passed on to Phaser when we upgrade to that. Heppell08 1 Link to comment Share on other sites More sharing options...
Heppell08 Posted January 16, 2014 Author Share Posted January 16, 2014 Thanks I didn't know if I noobed out or it was a bug. I did a work around for now for what I'm trying to achieve. I'll wait until 1.1.4 comes to Master (Is it Master yet?) Link to comment Share on other sites More sharing options...
Chupup Games Posted February 4, 2014 Share Posted February 4, 2014 something really seems not to work with the tilesprites. First, WebGL don't like png, always get errors here, with jpg not. also when i change the y-coordinate doesn't make a difference: tilesprite = game.add.tileSprite(0, 500, 480, 256, 'bg_01'); and game.add.tileSprite(0, 300, 480, 256, 'bg_01'); for example gives me the same output... Link to comment Share on other sites More sharing options...
Chupup Games Posted February 5, 2014 Share Posted February 5, 2014 i try and try, but for me it looks like a bug. game.add.tileSprite(x, y, width, height, 'xxxx') ---> setting x and y doesn't work i am using 1.1.4 Dev version Link to comment Share on other sites More sharing options...
toby1kenobi Posted February 25, 2014 Share Posted February 25, 2014 I'm struggling with this too, although this being my first foray into anything Phaser-related it's probably something I'm doing... I have this:var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });function preload() { game.load.image('ground', 'assets/Ground.jpg');}function create() { bgGrd = game.add.tileSprite(0, 0, game.stage.bounds.width, 121, 'ground');}and I just get a blank, black game area, no JS errors though. The tile is 121 x 121 - I didn't fully understand the comment about it having to have, "power-of-two dimensions" - maybe I misunderstood that bit? Am I even close?! Any help much appreciated,Toby Link to comment Share on other sites More sharing options...
rich Posted February 26, 2014 Share Posted February 26, 2014 Just to say that TileSprites are now properly handled in 1.2. You can place them anywhere, fix them to the camera, even get input events off them. For the meantime though Toby - I would suggest trying a power of 2 texture, which means a texture where the dimensions are a power of two (i.e. 16x16, 32x32, 64x64, 128x128, 256x256, etc). There are some in the examples assets folder if you need. Link to comment Share on other sites More sharing options...
toby1kenobi Posted February 26, 2014 Share Posted February 26, 2014 For the meantime though Toby - I would suggest trying a power of 2 texture, which means a texture where the dimensions are a power of two (i.e. 16x16, 32x32, 64x64, 128x128, 256x256, etc). There are some in the examples assets folder if you need. Thanks for that, much appreciated. I still don't quite get what's meant by 'a power of 2 texture' though, am I being thick?! Do you mean a square tile where the side lengths are 2^x, where x is any integer? I though it meant the side lengths were x^2 (x to the 'power of 2'), but your examples don't fit that rule.Toby Link to comment Share on other sites More sharing options...
Chupup Games Posted February 26, 2014 Share Posted February 26, 2014 @tobi1kenobi Don't think so much about a formula, just make your textures in a size he said (16 x 16, 32 x 32, 64 x 64, 128 x 128, 256 x 256 ...)Both sides of the image have the same size. Link to comment Share on other sites More sharing options...
toby1kenobi Posted February 26, 2014 Share Posted February 26, 2014 Thanks for that, much appreciated. I still don't quite get what's meant by 'a power of 2 texture' though, am I being thick?! Do you mean a square tile where the side lengths are 2^x, where x is any integer? I though it meant the side lengths were x^2 (x to the 'power of 2'), but your examples don't fit that rule.Toby Ok, I have it working, so thanks! It seems like any rectangle where side lengths are 2^x work. Link to comment Share on other sites More sharing options...
toby1kenobi Posted February 26, 2014 Share Posted February 26, 2014 @tobi1kenobi Don't think so much about a formula, just make your textures in a size he said (16 x 16, 32 x 32, 64 x 64, 128 x 128, 256 x 256 ...)Both sides of the image have the same size. Oh, just saw this - I actually have it working for rectangles, not just squares. Thanks anyway though. Link to comment Share on other sites More sharing options...
Recommended Posts