Mattias Posted November 14, 2013 Share Posted November 14, 2013 Using the Basic template from resources in phaser we have built a game.The problem now is that on iPhone devices, after the preloader is done loading (background and progress bar is visible here), the next state/screen has broken images (green rectangles with a slash through). Happens on both iOS 6 and 7. We're using tag 1.1.3 in git and all other devices seems to work fine so far. Boot.js looks like this:var Main;Main = {};Main.Boot = function(game) {};Main.Boot.prototype = { preload: function() { this.load.atlas("introSprite", "assets/intro.png", "assets/intro.json"); this.load.image("preloader", "assets/loaderFull.png"); }, create: function() { this.input.maxPointers = 1; if (this.game.device.desktop) { this.stage.scaleMode = Phaser.StageScaleMode.SHOW_ALL; } else { this.stage.scaleMode = Phaser.StageScaleMode.EXACT_FIT; this.stage.scale.forcePortrait = true; } this.stage.scale.pageAlignHorizontally = true; this.stage.scale.setScreenSize(true); this.game.state.start("preloader"); }};Preloader.js looks like this:Main.Preloader = function(game) { this.game = game;};Main.Preloader.prototype = { loaderFull: Phaser.Sprite, preload: function() { this.preloader_bg = this.add.sprite(0, 0, 'introSprite'); this.preloader_bg.frameName = '_0000s_0000_Bg.png'; this.preloader = this.add.sprite(this.game.world.centerX - 200, this.game.world.centerY + 200, 'preloader'); this.load.atlas('menuSprite', 'assets/menu.png', 'assets/menu.json'); }, create: function() { this.game.state.start('mainMenu'); }}; The next screen, loading images exactly the same as you are supposed to (works on all desktops and android devices), gets broken images on iPhone. Is this known? The spritesheets are all the same, preloader shows sprites without problems. We've tested on several different iPhone devices, all showing the same issues. Link to comment Share on other sites More sharing options...
Mattias Posted November 15, 2013 Author Share Posted November 15, 2013 I suspect it's something similar to this thread:http://www.html5gamedevs.com/topic/1673-image-isnt-drawn-in-chrome-but-drawn-in-safari/ I guess I'll skip spritesheet atlases. Link to comment Share on other sites More sharing options...
Recommended Posts