Jump to content


  • Content Count

  • Joined

  • Last visited

About SteveB

  • Rank

Contact Methods

  • Twitter
  1. Has anyone had any success using Phaser offline using a manifest file. I've set up a manifest file to allow offline use. Works fine everywhere I've tested except on my iPad. The first time, when it downloads the files, it works fine. The second time it just stops. I traced it down to the audio. /** * Called when a file is successfully loaded. * * @method Phaser.Loader#fileComplete * @param {number} index - The index of the file in the file queue that loaded. */ fileComplete: function (index) {... case 'audio': if (this.game.sound.usingWebAudio)
  2. Ok, found it. My boot.js had the line: this.stage.disableVisibilityChange = true;which I think came from one of the templates. That stops the onBlur firing. I thought it only stopped the onPause event.
  3. Any idea why I can't get the game onBlur to fire. I intended to use it to stop background music playing when the game loses focus. I've cut everything down to this: game.onBlur.add(function() { console.log("BLURRED");}, this);I can see that the game object has the signals added but the function never gets called. Have I missed something?
  4. Thanks for the feedback turnA. I hadn't thought of M? meaning I was asking for the M symbol. I'll change the ? into something more intuitive. The _ is a bit close to some of the symbols but I'll think of something.
  5. This is a creepy memory puzzle which I've been using as my Phaser learning curve. There's not much help and it is deliberately very sparse. If you want to try it out, you can go here: Runes My blog is over here at cuckooswearblack.com but there's not much gaming stuff there so you have been warned
  6. Used the fix in this post http://www.html5gamedevs.com/topic/5982-my-game-doesnt-work-on-ie/ Sorted now.
  7. I've got a problem with bitmap fonts in IE11. The game I've put together works fine in Chrome, Firefox, Opera, and Safari but falls over in IE11. Any ideas? Using Phaser 2.0.1 SCRIPT5009: 'Float32Array' is undefined File: phaser.js, Line: 57295, Column: 5 vec2.forEach = (function() { var vec = new Float32Array(2);SCRIPT5007: Unable to get property 'responseText' of undefined or null reference File: phaser.js, Line: 41759, Column: 17 bitmapFont: function (game, xml, cacheKey, xSpacing, ySpacing) { if (!xml || /MSIE 9/i.test(navigator.userAgent)) { if (typeof(wind
  8. Just tried the new version of Cocoonjs (2.0.0 beta). Still loosing my sprites so whatever was going on remains.
  9. Have you thought of using a Tilemap to represent the 2D array? Tilemap already has methods for swaping tiles etc. If you want to extend do something like var MySuperTilemap = function(game, key, tileWidth, tileHeight, width, height) { Phaser.Tilemap.call(this, game, key, tileWidth, tileHeight, width, height); // @todo my construction stuff};MySuperTilemap.prototype = Object.create(Phaser.Tilemap.prototype);MySuperTilemap.prototype.constructor = MySuperTilemap;MySuperTilemap.prototype.coolMethod = function(something) { //@todo more stuff};
  10. I don't know if it helps with the image loading issues. I've been battling away to get CocoonJS working. I've came across this issue, which make no sense to me, but might help someone who know what is going on, to pinpoint the image loading issue. I've got three groups, DPR.background, DPR.midground, and DPR.foreground. I've also got three sprites, DPR.bot, DPR.player and DPR.carriedTile. The first two go in the midground and the last in the foreground. Then for debugging purposes I've added 5 extra sprites. In the following code they go in the foreground group. When I do this, only the DP
  11. What's the best way to reset/reload a tilemap? I've basically loaded a tilemap from JSON and during the game, lots of tiles get shifted around. What I need to do is reset the tilemap back to its start state. At the moment I just destroy the old map and then recreate it. But that puts it above the existing sprites and I finish up destroying those and then recreating them as well; I couldn't see how to alter the z order of the tilemap. Although it all works, I'm obviously doing this wrong.
  12. Thanks Karma Octopus. Unfortunately, not quite. The tileStrip is a sprite using the same tileset image as the map, but the individual tiles on mouse down are created using the index into the tileStrip rather than creating new Sprites; the tileStrip is still the size of the entire tileset image. My problem would be a bit like trying to make the tileStrip the size of one tile and then able to change the tile it shows. Mind you the example showed me a couple of other things I didn't know.
  13. I have a tilemap that's working fine. What I want to do is to create a Sprite that can be based on the same tileset as the tilemap uses so I can create dynamic tiles. I've extracted some of my code from some objects below to make what I'm effectively doing at the moment a bit clearer. var map = game.add.tilemap(mapId);map.addTilesetImage(tilesetName, imageId);var carriedTile = new Phaser.Sprite(game, 100, 64, imageId);game.add.existing(carriedTile);What I get, as expected, is a Sprite that displays the entire tileset image. What I need to do is to get a Sprite that only displays one tile fro
  14. I've set up a chain of tweens by chaining the 'to' method. e.g. this.tween.to({angle: 180}, 2000, Phaser.Easing.Linear.None). to({x: 300}, 3000, Phaser.Easing.Linear.None);but I need to be able to stop the tweens. If I call stop on the parent (this.tween) that stops it in its tracks but the other one then starts. How do I stop the entire chain. I could write some manager to keep track of them but I'm sure that's not the way to do it. I saw the TweenManager has a removeAll but that looks like it would take out other chains as well.
  • Create New...