TheScruffyGuy

Members
  • Content Count

    10
  • Joined

  • Last visited

  1. TheScruffyGuy

    Image Animation loading progress

    I would to use a a way to show loading progress for my loading scene but instead of a bar I have a gear sprite sheet that I would like to spin until loading is complete. Is there reference to this anywhere I have been combing through the P3 examples and can't figure out how to link the two together.
  2. TheScruffyGuy

    A Creeping Death, Fading, light effects, etc

    Thanks @SamTheMightyI am definitely look into raycasting as a layer to some level ideas that I have, but its not really what I am looking for so far the best I have come up with is Camera Fade in and out but I am not sure how to implement this into the code seeing as this is the first time I have worked with cameras. so this is what I tried... //Hope hope = this.physics.add.staticGroup({key: 'hope', immovable: true}); hope.create(200, 500, 'hope'); this.physics.add.overlap(player, hope, collectHope); hKey = this.input.keyboard.addKey(Phaser.Input.Keyboard.KeyCodes.SPACE); //Fear this.cameras.main.fadeOut(6000, useHope); } //Hope Mechanic function collectHope(player, score) { hope.killAndHide(score); score.body.enable = false; currentHope = Phaser.Math.MaxAdd(currentHope, 100, maxHope); } //Use Hope function useHope() { if(hKey.isDown, currentHope === 0) { currentHope.Remove(100); this.cameras.main.fadeIn(6000); } } function fearDeath() { if (currentHope === 0); { player.body.reset(100, 450); htext.setText('Hope: TOO AFRAID!') } } this is what I am working on so far some of the stuff isn't right I have been just trying to get it to work some way some how at this point I can't even get the hKey to work.. Anyways that is what I got and I am trying to accomplish.. I still have a lot og doc searching to do so far I haven't found any tutorials on any of this. lol Wish me luck!
  3. I am trying to add a element to my game where the player has two objects two deal with 1) Health meter depletes over time and must be filled by collecting refills (Done) 2) The Creeping death of fear itself.. The creeping death is, well fear. As you play the game, the screen is fading to black around the player and the player needs to collect "hope" to combat this fear but I am not sure the best way to go about it. I thought of making the screen fade with a overlay that darkens over time but then I found a post about lighting in devlogs. I thought cool I can attach a light source on the player and have it fade that way it is always center on the player. The problem with that is I can't open the examples for some reason nothing loads. I will keep trying to open them. My question is, is there another way to do this that I am not thinking about? Is this something that Phaser 3 can do? Here is the feel I am going for. This is not the finished character and its a 2d platformish style game. So he will be facing left and right.
  4. TheScruffyGuy

    Death Counter

    Hello Rich, I have the V3 js in my js folder.. I like I said I have been looking for examples I may have used the wrong versions in some spots.. I couldn’t find any v3 except for the timer, so I tried to “make it work”?
  5. TheScruffyGuy

    Death Counter

    I am trying my hardest to do this myself and also look for examples but I can not find any. To the point I am trying to build a game where my player health is attached to a timer but the player can collect items to add to the timer with a max limit and if the player runs out of time the player dies and returns to the start point. I am struggling hard on this. This is all I have at this point and not sure any of it is right. Player Creation in create function //Player Creation player = this.physics.add.sprite(100, 450, 'robot'); player.setBounce(0.2); player.setCollideWorldBounds(true); life = this.time.delayedCall(60000, restart, [], this); //Keyboard Register For Life Timer Start game.input.keyboard.addKeyCapture([Phaser.Keyboard.LEFT, Phaser.Keyboard.RIGHT, Phaser.Keyboard.UP, Phaser.Keyboard.DOWN]); Update function for action when timer runs out.. if(life.countLiving() < 1) { player.kill(); } and the restart function for the timer event... function restart() { player.revive(); } the restart i know isn't finish yet I have more to put in there I am building a game that is inspired by a short story I wrote which was inspired by a song.. I am trying to put in the blood, sweat and tears alone but my Javascript knowledge is small and it can get frustrating because I really want to make this game lol
  6. TheScruffyGuy

    TILED_JSON headache!

    I had it but I didn't put a "s" on the end of Tilemaps... not it's telling me, "this.load.tilemap" is not a function.. more troubleshooting
  7. TheScruffyGuy

    TILED_JSON headache!

    Hi! I am fairly new to Phaser 3 and I have 1 very simple game under my belt (a bulldozer moving rocks around). I am now trying my hand a tile maps so I downloaded Tile and made my map following a few tutorials and now I have my map I have everything set but I keep getting "Uncaught TypeError: Cannot read property 'TILED_JSON' of undefined". I have done alot of reading and I can't seem to find anything helping me with problem. This is all the code I have for right now I am just trying to get my head around tile maps. I have been trying to figure this out for about 2 hours now and I am starting to get a headache, also not asking for anyone to code it for me but pointing me in a direction would be AMAZING! function preload () { this.load.tilemap('store1', 'assets/images/untitled.json', null, Phaser.Tilemap.TILED_JSON); this.load.image('tileS','assets/images/spriteSbuild.png'); } function create () { this.map = this.add.tilemap('store1', 32, 32, 64, 32 ); this.map.addTilesetImage('tileS','assets/images/spriteSbuild.png'); this.map.createLayer('Tile Layer 1').resizeWorld(); }
  8. TheScruffyGuy

    Game Object not being removed after code is deleted

    Hello @onlycape, I ended up deleting everything that referenced any objects related to the problem, refreshed the page then reinstalled it and it cleared the problem so I am pretty sure your right about it being a browser cache issue. I have since finished my first "game" and am working on something a little more difficult.
  9. I am trying to learn Phaser 3 and I have created ground object 100x100px ground object to randomize, I decided to scarp that and made a image the length I need but now the old image wont change and the second ground object I created is still on the game screen even after I had erased the code. I even went as far as removing its image from function preload(). I am saving the code after every alteration. var game = new Phaser.Game(config); function preload () { this.load.image('bulld', 'assets/images/bulldozer.png'); this.load.image('world', 'assets/images/background1.png'); this.load.image('rock1', 'assets/images/rock1.png'); this.load.image('grnd1', 'assets/images/ground1.png'); } function create () { this.add.image(550,350, 'world'); rocks = this.physics.add.sprite(550, 540, 'rock1'); rocks.setBounce(0.1); rocks.setCollideWorldBounds(true); ground = this.physics.add.staticGroup(); ground.create(400, 652, 'grnd1').setScale(0.27).refreshBody(); }