• Content Count

  • Joined

  • Last visited

Everything posted by WitheringTreant

  1. Looks nice! Loved the ending on that steam video. xD
  2. Looking forward for this game. Looks amazingly smooth. What kind of framework/engine are you using?
  3. I think I just got quite bored building this and that mine and warehouse etc. Maybe a prebuilt base which you can arrange into your liking by moving structures? Maybe i was just tired and the game requires no changes. :9
  4. A very nice game! I loved the boss fight! A suggestion: randomize where the enemies throw grenades a bit. It'll make more interesting situations.
  5. Thanks All the game art in this picture is made by me. I have some placeholder art elsewhere. The hp bars are just 2 overlaid bars (red and green), where green's x-scale is determined by (currenthealth / maxhealth). EDIT: The fps meter is normal Google Chrome dev tool.
  6. A screenshot of my project. It's quite a big project, I've been working on it for a long time.
  7. How do you actually disable the current draghandler and use a custom method with this instead?
  8. Very nice solution, sanojian. Thanks!
  9. I like your answer, mattstyles. I've been a bit annoyed with that repetition. Might try your way next time. Although I currently often use this, since it allows me to adjust rolls more accurately. chanceRoll(4) means it has 4/100 chance of being true. // ROLL: OBJECT var object = null; while (object === null) { if (game.math.chanceRoll(1)) {object = 'star1'}; if (game.math.chanceRoll(4)) {object = 'star2'}; if (game.math.chanceRoll(1)) {object = 'nebula1'}; if (game.math.chanceRoll(5)) {object = 'anomaly1'}; }
  10. This game looks really nice. Its polished and pleasant. The only problem for me was that I got bored before the tutorial ended. Might wanna make it a bit faster.
  11. I usually make randomized generation like this: // this rolls either value 1, 2 or 3 var roll = game.rnd.integerInRange(1, 3); // make separate if-statements for each value of roll // (i dont know what kind of background item youre using, i use images like this, but add them to display groups) if (roll === 1) {backgroundimage = game.add.image(0, 0, 'image1');}; if (roll === 2) {backgroundimage = game.add.image(0, 0, 'image2');}; if (roll === 3) {backgroundimage = game.add.image(0, 0, 'image3');}; // Its basically just rolling a dice and telling the code what to do depending on the number it rolls
  12. The answer to that is subject to change when phaser 3 comes out. It will no longer use pixi.
  13. Kinda liked the game after a short test, but it was very burdensome to use the items from the inventory. I think the ui needs a lot of work still. Been looking for a game like this, but it seems a bit cumbersome to play. Maybe ill check back someday.
  14. I think it has a funny idea of a dinosaur trying to dodge meteors. Good job with the graphics too.
  15. Thank you very much for your solution Fricken Hamster. After replacing the "or" statement and removing ":Number"s I managed to get it to work perfectly. I have been trying to figure this out for so damn long..
  16. A nice idea, novel gameplay, polished. A nice game.
  17. How about something like this? Counter tracks the time since last shot and resets when you shoot counter = 0; function update(){ if(cursors.up.isDown && counter >= 60) { console.log('ispressed'); shoot(); counter = 0; } else {counter++} }
  18. Hey, have you already looked at this? http://www.html5gamedevs.com/topic/4702-states-with-parameters/ Also, yes you can set global variables. Just set them outside any functions, including game functions like create, update etc. http://www.w3schools.com/js/js_scope.asp I use global variables in that purpose in my game.
  19. Looks like i've found a solution to my problem. I've added this.game.input.activePointer.isDown before the button check, so it checks (true/false) if any button is pressed currently before checking if the button id is 0. if (this.game.input.activePointer.isDown && this.game.input.activePointer.button === 0) {console.log("left mouse button is down")}
  20. How about something like var inactivity_time = 5000; when player control button is pressed: inactivity_time = this.game.time.now + 5000; In the update loop, you check for: if (inactivity_time < this.game.time.now) {end game}
  21. How about game camera zooming in and out functionality? Is this possibly going to be added soon?
  22. Hey, I have a weird problem. Phaser does not seem to understand whether or not mouse left button is down. So I've put this in the update function: console.log(this.game.input.activePointer.button); And when i check console, it shows that button 0 (left mouse button) is down regardless of whether it's actually down or not. So a condition like this returns true regardless of whether left button is down or up. It only is false if some other button is down. if (this.game.input.activePointer.button === 0) { console.log("button 0 down") } Basically that means that the left mouse button is unusable as a control, because its not triggered correctly. Does anyone have any idea how to make mouse left button work normally (activated only if button is down)? Is this a phaser fault or might something in my code cause this? As far as i've understood, having no buttons down should return -1 (NO_BUTTON) in the console.log. I'm using newest phaser version (2.2.1).