GregDev

Members
  • Content count

    6
  • Joined

  • Last visited

  1. Salvage - A little turn-based bullet-hell shooter

    Pretty fun, I'd definitely play during bus rides if it's available on mobile. I wasn't able to use the keyboard to control the game - not sure if I did something wrong <- that was fast
  2. Spawn Sprites as they get close to player

    Thanks guys! My enemies are outside the camera boundaries so I tried enabling autoCull on all my sprites, there was a slight performance increase but not as significant as what I was hoping for. I also tried messing around with kill/revive by putting all the enemies in an array and calling this in the update loop function checkSpawn(game){ for(var i =0; i< this.enemyArr.length;i++){ var distance = player.y - this.enemyArr[i].y; if(distance < 1000 && distance > -1000){ this.enemyArr[i].revive(); }else{ this.enemyArr[i].kill(); } } } This actually worked pretty well, but I'm weary of performance hits as enemyArr grows. There is a moderate amount of work for each sprite in it's update loop, so it looks like pooling might be the way to go. One thing I noticed was each sprite's update method is called regardless if alive/renderable is true or false. It's too bad there's no way to stop a sprite from updating without using destroy()
  3. Hi, I'm making a game where the player traverses through a fairly large area and occasionally encounters enemy sprites. I'm adding around 50 enemy sprites at game start and I'm noticing some performance drops, when I remove the enemy sprites the performance is fine. There's only about 5 sprites on screen at once, so I'm trying to figure out the best way to spawn enemies as they enter camera range. After reading http://www.html5gamedevs.com/topic/16191-is-it-possible-to-make-an-sprite-re-spawn-after-a-short-time/ It looks like creating a handful of sprites and using revive() or changing their x/y coordinates as the player moves around the world is a viable option, but I was wondering if there was another way to do it that doesn't result in a good deal of refactoring for me. Any ideas to save me some time?
  4. Hi guys, I'm new to the framework but I googled around abit and couldn't find an answer to this: I’m making a tile mapped game where the player needs to make their way through a tiled level by moving upwards. To achieve this the camera follows the player around a rectangular world My question is about creating 2 background TileSprites that scroll with the camera BUT not at the same speed as the camera to achieve the effect of having a background with TileSprite 1 in the distance and TileSprite 2 in the far distance Maybe something like an event handler that works like this: onCameraPositionChange(yDistance){ backgroundTileSprite1.scrollY -= yDistance/2 backgroundTileSprite2.scrollY -= yDistance/4 } Right now my setup is like this: TileSprite 1 -> moves with the camera TileSprite 2 -> stays still in background using TileSprite.fixedToCamera It looks okay right now, but I think this would convey a more convincing sense of distance. Cheers and thank you!
  5. Henweigh the Game

    Tried it in the mobile chrome browser using a Samsung A5, lookin good
  6. Space Demons

    Just wanted say hi to the community by posting about my first game, it was build using the html5 canvas combined with other DOM elements. Didn't use a framework so it's pretty rough around the edges. I only released it for android (didn't want to pay the apple subscription fee :P) I'm building another mobile game using Phaser 2.9.2 CE right now and absolutely loving it - looking forward to sharing it with you guys! Google Play Store link: https://play.google.com/store/apps/details?id=com.gmm.spacedemons&hl=en Any feedback/comments would be very much appreciated!