• Content Count

  • Joined

  • Last visited

  1. Awesome! Good idea with the boot menu, I'll keep playing around and if I make any more examples I'll shoot over a PR. Cheers!
  2. I tossed up a spritesheet and input example in my fork if anyone is interested! Thanks nkholski for the repo!
  3. This is a go-to Node hosting platform:
  4. Great game! Very polished puzzles, I enjoyed it! Nice work!
  5. Thanks for putting this together! All I'm getting when running the "sh" command is a new browser window with a "pre" element saying "undefined". Any help would be appreciated!
  6. srobertson421

    l1 Path Finder

    Very awesome! Thanks for the post Rich!
  7. Hi all! I know this is a pretty obscure issue but I was hoping someone with experience with the Facebook iOS app and HTML5 games could help. Currently I have a game that makes a synchronous ajax request to consume my company's API and retrieve data to use in the game. This is done in the Loading state. The goal was also to have the players be playing it in the Facebook webview since our ads would be focused there. Now on most platforms the game plays fine. It receives the data and goes through the rest of the game execution fine. However on some iOS platforms, mainly iPhone 5S and 6, the call never starts and the game crashes as the data isn't received. My question being, does anyone have experience with the Facebook webview on iOS that could maybe shed some light on why only on some devices is a synchronous ajax request bypassed and others it works fine? Maybe a security issue? Any help at all would be appreciated, no matter how far-fetched! Thanks in advance!!
  8. MichaelD is correct. Here is an implementation if you need it: preload: function() { // Load our tilesprite image for the background'background', 'Path/To/Your/Background.png'); // Load our tilesprite image for the ground'ground', 'Path/To/Your/Ground.png'); }create: function() { // Add the tilesprite for the background to the game at position 0, 0 // params - Xpos, Ypos, Width, Height =, 0, backgroundWidth, backgroundWidth, 'background'); // Add the tilesprite for the ground to the game just below the background this.ground =, backgroundHeight, groundWidth, groundHeight); // Now add our ground to the physics engine for collisions with the player; // Make sure it doesn't react to gravity this.ground.body.allowGravity = false; // Make the ground immovable this.ground.body.immovable = true;}update: function() { // Create collision check for player and ground, this.ground); // Finally we move the two tilesprites at different speeds to simulate parallax -= 0.5; this.ground.tilePosition.x -= 1.5;}
  9. Whoops!! Nevermind, I figured it out. Seems I shouldn't have been calling the "collide()" method after my sprite update method. Just called the collision before the update and it works. Is there a way to delete a post to avoid looking like a jackass? lol
  10. Hi guys! I'm currently having an issue with using a tilesprite as the ground for an infinite runner game. Using Arcade physics I set a body to the tilesprite so that I could check collision between my sprite and the ground. The problem comes when the collision actually happens. The sprite body doesn't flag "body.touching" as down nor does it work with "body.onFloor()". A by-product of this issue is that my jump function is negated for some reason. Once my sprite collides with the ground he can't move up at all. Any help would be appreciated!! This is my main game state: Play = function(game) { = game; this.boy = new Player(game); this.girl = new Girl(game); = null; this.ground = null;}Play.prototype = { create: function() { =, 0, 438, 136, 'background'); this.ground =, 125, 438, 44, 'ground');; this.ground.body.allowGravity = false; this.ground.body.immovable = true; this.ground.body.setSize(this.ground.width, this.ground.height - 10, 0, 10); this.boy.create(); this.girl.create(); }, update: function() { -= 0.5; this.ground.tilePosition.x -= 1.5; this.boy.update(); this.girl.update();, this.ground); }And here is my player class: Player = function(game) { = game; this.player = null; this.cursors = null;}Player.prototype = { create: function() { this.player = / 2, / 2, 'boy') this.player.anchor.setTo(0.5, 0.5); this.player.scale.setTo(0.5, 0.5);; this.player.body.collideWorldBounds = true; this.player.animations.add('run', ['run1', 'run3', 'run2', 'run4'], 8, true, false); this.player.animations.add('jump', ['jump1', 'jump2'], 5, false, false); this.player.animations.add('fall', ['fall1', 'fall2', 'fall3'], 8, false, false); this.cursors =; }, update: function() { this.player.body.velocity.x = 0;'run'); if (this.cursors.left.isDown) { this.player.body.velocity.x = -100; } else if (this.cursors.right.isDown) { this.player.body.velocity.x = 100; } if (this.cursors.up.isDown) { this.player.body.velocity.y = -200;'jump'); }Here is a live version: Thanks in advance!!
  11. You can create the underlying sprite first and then place the text at that sprite's coordinates. Then you have the choice of moving them both separately using tweens or grouping them and moving the group using tweens. create function() { // Add initial sprite to put text on. var baseSprite = game.add.sprite(320, 320, 'spriteKey'); baseSprite.anchor.setTo(0.5, 0.5); // Add text sprite second so it renders on top. var spriteText = game.add.text(baseSprite.x, baseSprite.y, 'Sprite Text'); spriteText.anchor.setTo(0.5, 0.5); // Create the group and place both sprites in it. Allows you to move the group instead. var spriteGroup =; spriteGroup.addMultiple([baseSprite, spriteText]); // You can now just tween the group instead and it will move both sprites. var moveGroupTween = game.add.tween(spriteGroup).to({x: 100, y: 100}, 1000, Phaser.Easing.Linear.None, true);}Finally you can simply set the text of the text sprite when you need to change it, that way you only end up using a single text sprite. spriteText.setText('New sprite text');
  12. Hi lewster32. I know this is an older post but I have implemented a version of your color tween but I'm hitting cross-browser issues. Any reason this wouldn't work in Safari or Firefox?
  13. If anyone is also looking for a quick web app solution for texture atlas and the like, try this out: It's worked wonders for me! and you can output to multiple files that are compatible with Phaser. Cheers!
  14. I'm having issues with the callback passed in to the onDown. For some reason when I try to play an animation from within the callback the animation won't play at all. What's strange is the animation will play fine in my key detection in the "update" function. My code is this: Player = function(game) { = game; this.sprite = null; this.cursors = null;};Player.prototype ={ preload: function() {'grandpa', 'assets/grandpa.png', 64, 117); }, create: function() { this.sprite = game.add.sprite(2 * 64, 8 * 64, 'grandpa'); // animations this.sprite.animations.add('left', [7,6,5,4], 7, true); this.sprite.animations.add('right', [0,1,2,3], 7, true); this.sprite.animations.add('up', [8,9,10,11], 7, true); this.sprite.animations.add('down', [0,1,2,3], 7, true); this.sprite.animations.add('beer', [0,12,13,0], 7, true); this.cursors =; var beerButton =; beerButton.onDown.add(beerDrink, this); function beerDrink() { console.log('beer!');'beer'); } }}