Jump to content


  • Content Count

  • Joined

  • Last visited

About GregDev

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Full code looks like this in case anyone else has the same issue: class Player extends Phaser.Physics.Matter.Image { constructor (config) { super( config.scene.matter.world, 200, 200, 'assetKey' ) this.scene = config.scene this.scene.add.existing(this) } preUpdate (time, delta) { //it works! } }
  2. Appreciate the response, calling preUpdate() doesn't seem to do anything for me, I tried with the player and scene class out of curiosity. I had a look at the player class with the chrome debugger and I couldn't find any preUpdate() function, is there something I have to do to get it setup? EDIT Nevermind, it wasn't working because I needed to add the player to the scene
  3. Hi all, I have a scene and a player, the player needs do something in the core game loop. Whenever I run into a situation like this I always end up creating an update method on the sprite/image/whatever and calling it from the scene like this: class Level1 extends Phaser.Scene { constructor () { this.player = new Player() } update () { this.player.updatePlayer() } } class Player extends Phaser.Physics.Matter.Image { updatePlayer(){ //do something } } It doesn't look too bad in this example, but I find things get messy once yo
  4. I would also like to know this one
  5. Built with React + Nodejs Link - https://www.newgrounds.com/portal/view/727279
  6. A space rally type game where you try to get to the finish alive. Made with Phaser 3 using matterjs for physics. It's just on Newgrounds right now but I plan on adding it to the Google Play Store soon! LINK -> https://gmclean.itch.io/space-drift FEATURES --------------------- - 10 campaign levels - Unlockable endless mode - Retro soundtrack HOW TO PLAY --------------------- When your engine flame makes contact with walls and other ships, you gain speed and power. Power is used for shield ene
  7. I have a simple list for a mobile game that I'd like to be able to scroll as if it were a webpage. I can make scroll buttons if I need to, buuuut figured I'd ask in case this problem has been solved. Thanks!
  8. Interesting.. I've only tried it with chrome, I'll see if I can put up a fix for it tonight
  9. Getting my feet wet with Phaser 3 by making a simple game with stock art. Any feedback is greatly appreciated! Description - Practice mental math in space! - Use the left/right arrow keys or click and drag to fly the ship towards cargo containers that contain the right answer. A wrong answer will destroy the ship. Features: - progressive difficulty - unlockable game modes - 8 bit soundtrack - mobile friendly PC (Newgrounds) : https://www.newgrounds.com/portal/view/712621 Android (Google Play): https://play.google.com/store/apps/detai
  10. 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
  11. 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(); }els
  12. 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
  13. 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 l
  14. Tried it in the mobile chrome browser using a Samsung A5, lookin good
  15. 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
  • Create New...