Dream Of Sleeping Posted August 30, 2014 Share Posted August 30, 2014 I've downloaded phaser the other day and it's flicking in firefox. Loads of little white spots. When I replaced it with an older version of phaser that I used on my last game, (still version 2 something) there was no flickering. The only code is just basic set up. Nothing special. Is this a known issue? I couldn't find anything by searching. This is a new computer. The only browsers I've downloaded are firefox and chrome. No problems with chrome so far. Link to comment Share on other sites More sharing options...
kidos Posted August 30, 2014 Share Posted August 30, 2014 What is the Phaser version with the flickering and the one without?Can you show your code here that cause the flickering? Link to comment Share on other sites More sharing options...
Dream Of Sleeping Posted August 30, 2014 Author Share Posted August 30, 2014 The old version without the flicking was 2.0. The one with the flicking is 2.0.7. Here is the code. This is just a template I made to make starting new projects easier and the very start of my new game. Most of it is just about creating a loading bar and then loading the play scene. I'm about to go to bed or I would have spent some time cutting this down to the bare minimum. I'll do that tomorrow if this is too much code. Edit: It works fine on canvas mode.namespace = { }namespace.loadGame = function() { namespace.game = new Phaser.Game(800, 600, Phaser.AUTO, ''); namespace.game.state.add("Boot", namespace.Boot); namespace.game.state.add("Load", namespace.Load); //namespace.game.state.add("StartMenu", namespace.StartMenu) namespace.game.state.add("Play", namespace.Play) namespace.game.state.start("Boot"); };namespace.Boot = function(game) { this.game = game;};namespace.Boot.prototype = { preload: function() { this.game.stage.backgroundColor = "191919ff"; this.game.scale.pageAlignHorizontally = true; this.game.scale.pageAlignVeritcally = true; this.game.scale.refresh(); this.game.load.image('emptyLoadingBar', 'images/emptyloadingbar.png'); this.game.load.image('fullLoadingBar', 'images/fullloadingbar.png'); }, create: function() { this.game.state.start("Load"); } };namespace.Load = function(game) { this.game = game;};namespace.Load.prototype = { preload: function() { var label = this.game.add.text(400, 300, 'Loading', { font: '40px arial', fill: "rgb(236, 236, 236)" }); label.anchor.setTo(0.5, 0.5); var emptyLoadingBar = this.game.add.sprite(0, label.y + 40, "emptyLoadingBar"); emptyLoadingBar.x = (this.game.world.width - emptyLoadingBar.width) / 2; var fullLoadingBar = this.game.add.sprite(emptyLoadingBar.x, emptyLoadingBar.y, "fullLoadingBar"); this.game.load.setPreloadSprite(fullLoadingBar); // load everything here //this.game.load.atlasJSONHash(whatYouWannCallIt, imagePath, jsonPath); //this.game.load.image(whatYouWannaCallIt, imagePath); //this.game.load.audio(whatYouWannaCallIt, arrayOfPaths); this.game.load.audio("clapSound", ["sounds/clap.mp3"]); }, create: function() { //this.game.state.start("StartMenu"); this.game.state.start("Play"); }};namespace.Play = function(game) { this.game = game;};namespace.Play.prototype = { create: function() { console.log("in play create"); this.clapKey = this.game.input.keyboard.addKey(Phaser.Keyboard.SPACEBAR); this.clapKey.onDown.add(this.keypressed, this); this.clapSound = this.game.add.audio("clapSound"); }, update: function() { }, keypressed: function() { console.log("Key pressed"); this.clapSound.play(); }}; Link to comment Share on other sites More sharing options...
Dream Of Sleeping Posted August 30, 2014 Author Share Posted August 30, 2014 I replace the word namespace with the actual name of the game, just in case anyone is wondering what the heck i'm dong. lol Link to comment Share on other sites More sharing options...
Recommended Posts