• Content Count

  • Joined

  • Last visited

About foldem

  • Rank

Contact Methods

  • Twitter
  1. Found the possible solution after tons of testings. You have to use Phaser.AUTO instead of Phaser.CANVAS when initializing the Phaser.Game. Seems like it effects only Android stock browser, the FPS changed from 5-6 to 40-45!
  2. Hi there, I'm making a match-3 game where some graphic elements are static (background, tile bg, etc) and some are moving (color tiles). When I do a grid 11 x 9 and fill it with images, the FPS goes down pretty bad (Chrome - 40, ok; FF - 17; Stock Browser on Samsung Galaxy S3 - 7). The FPS is pretty low even when nothing happens, so it's a problem or rendering/redrawing I guess. So the question is if I do everything right to get the best productivity? Is there any chance to get some images be drawn once and no redrawing (for backgrounds f.e.)? I tried 2 ways: have all the art in one atlas and 1 atlas + game bg image separately - but haven't noticed a big difference. Finally, perhaps I can re-use texture somehow, but I can't figure out how to make it properly to get the desired increase. The game itself is here: How I add sprites now: this.loc.matrix = []; this.loc.backTiles = []; this.loc.colorTiles = []; for (var i = 0; i < this.loc.mapSize.y; i++) { this.loc.matrix[i] = []; this.loc.backTiles[i] = []; this.loc.colorTiles[i] = []; for (var j = 0; j < this.loc.mapSize.x; j++) { this.loc.matrix[i][j] = new Game.MatrixData(this.loc.levelData[i][j]); if (this.loc.levelData[i][j] != Constants.EMPTY_TILE_NUM) { //creating a backTile this.createBackTile(i, j); //creating a colorful tile this.createColorTile(i, j); } } } createColorTile: function(i, j) { var excludeColorsArray = this.getEcludeColorsArray(i, j); var color = Utils.prototype.getRandomIntWithExclude(1, Constants.TOTAL_COLORS_NUMBER, excludeColorsArray); var sprite = new Phaser.Sprite(, ( + Constants.tileSize * j *, ( + Constants.tileSize * i *, 'game', 'colorTile' + color); sprite.width = Constants.tileSize *; sprite.height = sprite.width; this.loc.levelLayers.colorTiles.add(sprite); this.loc.colorTiles[i][j] = sprite; this.loc.matrix[i][j].color = color; }, createBackTile: function(i, j) { var sprite = new Phaser.Sprite(, ( + Constants.tileSize * j *, ( + Constants.tileSize * i *, 'game', 'tile1Bg'); sprite.width = Constants.tileSize *; sprite.height = sprite.width; this.loc.levelLayers.backTiles.add(sprite); this.loc.backTiles[i][j] = sprite; },
  3. I'm having issues with the in-game music or sounds. On the desktop browsers (Chrome, Firefox) everything works well. On iOS devices (Safari) works well too. But on Android everything is pretty bad. Galaxy S3: music doesn't start, the sounds are too quiet (even though the device volume is maximum). Galaxy S2 - similar problems. Here's the code for playing the music and sounds.'menuM', ['music/menu.mp3']);'clickS', ['music/click.mp3']); ='menuM', 1, true); ='clickS', 1, true);'',0,1,true);;What are the general good case practice of using the sounds in Phaser?
  4. Here is the scaling code: = Phaser.StageScaleMode.EXACT_FIT; = null; = null; = null; = null; = true; = true;;Thanks!
  5. Yes, other canvas based games behave the same way on the device. However, in Chrome it works well. Disabling audio didn't change anything for the Stock browser - the same problem. So I guess the device is one of those that doesn't support Phaser normally (at least on the default browser).
  6. Hi all, I'm about to finish my first game made with Phaser, the very last issue left: Everything works well on desktop and iOS devices, but not Android (4.0). The game preloads, show the graphic and Play btn, but I can't tap it (at least nothing changes when I try to tap it). If I rotate the device, I see that the MainMenu screen is displayed normally (and the same for all the taps). So pretty much it reacts on the tap, but somehow doesn't display changes, only after I rotate the device.. I use Phaser 1.1.3 and Phaser.CANVAS in the game init. Any thought are welcome.