• Content Count

  • Joined

  • Last visited

About bobonthenet

  • Rank
    Advanced Member

Contact Methods

  • Twitter

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

775 profile views
  1. bobonthenet

    Upload game

    @kiklop133 rather than making the user click outside the game within the iframe which is not ideal. I just found out you can add the following to your game config. I hope this is even better for you. input: { keyboard: true, mouse: {capture: false}, touch: true, gamepad: false },
  2. bobonthenet

    Upload game

    @kiklop133 did you figure out how to resolve this?
  3. I just created a new utility to automate the creation of a spritesheet, json atlas, and json anims file. It was designed to fit the very specific needs of my own project but I'd like to turn it into something that is useful to the larger Phaser community. All I'd like for you to do is use my tool and tell me how I can improve it to better suit the needs of your own project. I think for some of you this might work great out of the box and for others this might be totally useless as it is. Any feedback I can get to help me make this really useful to the Phaser community would really be appreciated.
  4. bobonthenet

    Scene rebooting issue - Sprites don't disappear

    I couldn't get 3.4 to work. Looks like there was a bug related to matter physics but 3.5 fixes everything for me.
  5. bobonthenet

    Scene restarting not resetting camera FX

    I also noticed this and I think some detailed clarity on what should be retained when a scene is restarted or a new one started is necessary. This currently works counter to the way I think it should, but just having some more understanding and clarity of what to expect when a scene starts would probably clear up a majority of my issues I'm considering opening up bugs for.
  6. bobonthenet

    Scene rebooting issue - Sprites don't disappear

    This issue is driving me crazy. OK, I clearly see @samme 's example working. I'm doing the same thing but it's not working for me. Maybe because the codepen example isn't newing up a scene object that gets re-used? I don't have time to test that this morning. What I'm seeing is also not just the sprites not getting cleaned but also many other objects. I'll try and make a video demonstrating my example later today or please take a look at the github example I shared.
  7. bobonthenet

    Scene rebooting issue - Sprites don't disappear

    I am using this.scene.start('scenename'); In an earlier iteration of trying to get this to work I had preceded that with this.scene.stop('scenename'); and that didn't make a difference.
  8. bobonthenet

    Scene rebooting issue - Sprites don't disappear

    I created this new repo that I think more clearly demonstrates the problem. The scene loads the level correctly the first time but when the scene is restarted it does not load correctly. Instead, the first level is loaded again from where it left off before the restart.
  9. bobonthenet

    Scene rebooting issue - Sprites don't disappear

    Can I do what I am trying to do? My game is going to have multiple levels. The main scene gets the level key passed in via the start method. this.scene.start('MainScene', {level: this.nextLevel}); Then within my scene preload method I load the appropriate level json file. this.load.tilemapTiledJSON('map', `${this.level}.json`); The create method should be building the level based on the json file but it is not. Instead, the previous level is there. I think I'm majorly misunderstanding how scenes are supposed to work. Do I need a new scene for each level? I feel like I shouldn't. I used the same strategy with states in Phaser 2. Can this not be done with Phaser 3 or am I going about this in entirely the wrong way?
  10. bobonthenet

    Scene rebooting issue - Sprites don't disappear

    shutdown() gives the same result as before.
  11. bobonthenet

    Scene rebooting issue - Sprites don't disappear

    This doesn't seem to work completely. The camera has to be reset, that isn't a big deal but it looks like there are some stray objects causing problems with collisions.'collisionstart', function(event, bodyA, bodyB) { if(bodyA.gameObject.collision) { bodyA.gameObject.collision(bodyB.gameObject); } if(bodyB.gameObject.collision) { bodyB.gameObject.collision(bodyA.gameObject); } }, this); The first time the scene is loaded the above code works fine. The second time around though I have a bullet colliding with an object that has no gameObject and thus no collision method. I can't seem to determine anything useful about the object being picked up by this method but it doesn't exist the first time. I'm guessing that there is something else that I need to manually reset similar to the camera. To reset the camera I'm just doing this.cameras.main.scrollX = 0;. Is there a way to completely reset everything? I'd like the scene to start completely fresh and anything that I want to be retained I will explicitly pass back into the scene with the start method.
  12. bobonthenet

    Scene rebooting issue - Sprites don't disappear

    I'm having the same problem in my game. I asked in the slack channel but I don't think I was understood. Your video seems pretty clear so hopefully, someone has a solution.
  13. bobonthenet

    Constrain player sprite to camera

    Is there an easy way to make the player sprite collide with the edge of the camera? I'm using Matterjs physics. My game is a space shooter with an automatically scrolling camera that gradually moves from left to right across a tilemap level. Right now it is very easy to accidentally move the player outside of the viewable area. When that happens the player easily gets lost and it is hard to find your way back to the viewable area. I was thinking I could remedy this by automatically adjusting the player's velocity to match the camera scroll speed when the edge of the camera is reached. I know that would work but before I do that I would like to know if there is a simpler technique I could use.
  14. bobonthenet

    Adding an emitter to a group

    It looks as if when I already have an explosion in process and then a second is fired, then the second explosion would not be complete. It looks as if the first explosion has taken up a portion of the duration of the second explosion. Here is the code I am using for my explosions, maybe this isn't the best strategy. .... create() { //Particles and emitter are created in the create method. const particles = this.add.particles('spark'); this.emitter = particles.createEmitter(); this.emitter.setSpeed(200); this.emitter.setBlendMode(Phaser.BlendModes.ADD); this.emitter.on = false; } ... //This explosion method is called inside the colliding sprites death method. explosion(x, y) { this.emitter.setPosition(x, y); this.emitter.on = true; this.time.delayedCall(1500, function(){ this.emitter.on = false; }, [], this); } P.S. @samme I love brunch now! Thanks for sharing your starter project.
  15. bobonthenet

    Adding an emitter to a group

    Should it be possible to create emitters in a loop and then add them to a group? I'm trying to use particle emitters as explosions and I might need to fire off multiple at a time. I figured I would use basically the same strategy used with bullets. Maybe there is a better strategy? this.explosions =; let particles; let emitter; for(let i=0; i<3; i++) { particles = this.add.particles('spark'); emitter = particles.createEmitter(); emitter.setSpeed(200); emitter.setBlendMode(Phaser.BlendModes.ADD); emitter.on = false; this.explosions.add(emitter); //this line causes an error. }