3man7

Members
  • Content count

    19
  • Joined

  • Last visited

About 3man7

  • Rank
    Member

Contact Methods

  • Website URL
    http://www.3man7.net/
  • Twitter
    Mr3man7
  1. Game list of phaser games

    Hopefully no one minds but I've already posted my game on 'Game Showcase' section and I've wanted to post it here too as this is my first launch on Google Play! Jelly Haven is an action-arcade HTML5 game in which you control a jellyfish going through the space gathering shiny gems and avoid being hit by dangerous obstacles like meteors and rockets. The game gets really fast paced as you purchase upgrades from the store which helps you survive much longer. * Translated in 9 languages: English, Russian, French, German, Italian, Spanish, Portuguese, Turkish and Romanian. Link to game: http://37dev.ga/jelly Quick Gameplay: https://youtu.be/nRIHGlr1X64 Google Play: https://play.google.com/store/apps/details?id=com.thirtyseven.jellyhaven
  2. [Phaser] Jelly Haven

    Quick update: My first game launch on Google Play: 'Jelly Haven'! https://play.google.com/store/apps/details?id=com.thirtyseven.jellyhaven Enjoy!
  3. cannot apply gray filter to sprite

    Ohh I get it. What I would've done instead is this: create a black box with the transparency of 60% and save it as .png. After that just duplicate the .png image with 'for loop', put them in a group and place them over the colored levels (aka unlocked). Then kill() the image specific to the levels unlocked. It won't be grayscale but it's a similar effect. In the end it's up to you
  4. cannot apply gray filter to sprite

    The filter option will definitely have an impact on the performance. I would personally apply the filter to the batch of images in Photoshop using 'Action'. Here's a good tutorial: youtube.com/watch?v=lcZp2h5WXdA Don't forget to backup your original images! This method only applies if your sprites will remain grayscale the entire project. If you want to transition from color to grayscale and back on color then I would advice against this method and instead try to find a fix for the code. Sorry that I cannot help you enough with the filter code as I haven't used them before.
  5. Scrolling background with switching images

    I have a similar 'question': Is (1) supposed to go in update? What if you use a tween in create? Would that be better performance related?
  6. cannot apply gray filter to sprite

    Well, like @samid737 said, the issue is that you are using CANVAS. In the testing I've used Phaser 2.6.2 and Phaser.AUTO. I am not entirely sure if there are filters that can be used with CANVAS as they are meant to work with WEBGL only. Refer to: https://github.com/photonstorm/phaser/issues/2223 http://phaser.io/docs/2.6.2/Phaser.Filter.html
  7. how to debug this error on canvas+ ?

    I'm not sure if the error refers to something else but first thing that came to my mind is the lack of semi-colons at the end of the lines in create function.
  8. cannot apply gray filter to sprite

    I did a quick test and the code works for me. Are there any errors on console from your app?
  9. Problems in Landscape mode

    In boot.js you've set some limits regarding the game scale: game.scale.minWidth = 250; game.scale.minHeight = 170; <-- lower this or delete the line entirely. game.scale.maxWidth = 1000; game.scale.maxHeight = 680;
  10. [Phaser] Jelly Haven

    Hey guys, I just wanted to let you know about my first HTML5 game made with Phaser! It is an action-arcade game in which you control a jellyfish going through the space gathering shiny gems and avoid being hit by dangerous obstacles like meteors and rockets. Link to game: http://37dev.ga/jelly Quick Gameplay: https://youtu.be/nRIHGlr1X64 The game starts off slowly but it gets really fast paced as you purchase upgrades from the store which helps you survive much longer. Endless fun game with great performance. Optimized for mobile devices but fully playable in desktop as well. Audio support for all mobile operating systems. Easily localized as the texts are stored in a .json file. Saving/loading game with cookies system. Translated in 9 languages: English, Russian, French, German, Italian, Spanish, Portuguese, Turkish and Romanian. The game is currently looking for sponsorship and has not yet been published before. Let me know what you guys think! Enjoy!
  11. Why does my gradient disappear?

    Well I'm new to Phaser as well but here's my take: The problem here is the value given to the radius in tween. Should've been half of the size given in 'outerCircle', which is 150. (this.outerCircle = new Phaser.Circle(200, 200, 300);) But for some reason it doesn't accept the perfect half, but by a point off. (149.9) (not sure why, hopefully someone could help me on this one) This is a dirty hack and I would definitely look into other ways of dealing with this kind of effect. //define variable var circleRadius = 300; //create this.outerCircle = new Phaser.Circle(200, 200, circleRadius); //update this.smokeTween = this.game.add.tween(this.radCircle).to( { radius: circleRadius / 2 - .1 }, 20000, Phaser.Easing.Sinusoidal.Out, true);
  12. Tween problems / onComplete

    @samme Yeah there's definetely an easier way of coding this. Basically I needed a button to pause/resume everything at a quick click. I did get it to work but I didn't understand why my methods acted like that. @samid737 Well that makes more sense now! I appreciate your detailed message! I'm gonna have to take a second and read your reply several times because I'm not quite familiar with method chaining in Javascript. I might've skipped some basic lessons. Thanks both of you for the replies!
  13. Tween problems / onComplete

    Hello guys, I have 2 'simple questions' (I assume) that kinda bugs me for a while now. I wouldn't want to get too in-depth with this mainly because I'm not good at explaining stuff; but I'll try to keep it simple. 1st question: Is 'fig 1' and 'fig 2' supposed to be the same thing? 2nd question: I got a button that is supposed to pause the game. 'mygamepaused' is a variable that goes true/false on a click. 'mytimepass' is a 3 seconds timer that runs the tween from the first question. 'smiley_tw_pass' is a variable that goes true when the timer is finished (aka my way of telling the program that the tween just started) 'smiley_tw' is the name assigned to the tween (see question 1). After the tween is completed (see question 1) - the sprite (this.smiley) goes to 100 on y axis and changes alpha to 0.1. Here's where I run into problems. 1st: "smiley_tw is not defined" console error when trying to press the button before the timer passess (aka it cannot find the tween) fixed it by assigning a variable (smiley_tw_pass) right after the timer runs out. ...is that a good way of checking if the tween just started?... 2nd: "smiley_tw.pause is not a function" console error when using fig 1 (see question 1) fixed it by using fig 2 (see question 1) ...this bugs me because in my mind the two methods should work the same way, right?... So that's how I solved the problem - by using a variable to detect if the tween just started AND using fig 2 instead of the first one - But WHY? Why does the 2 methods doesn't work the same way here - AND - is declaring a variable (smiley_tw_pass) to check if a tween is running - a good thing? I would really appreciate if someone can figure this 'mistery' and can clear my mind a little. Full code: (480x720) var Test = function (game) {}; var mygamepaused = false; var smiley_tw_pass = false; Test.prototype = { create: function () { //create button this.mybutton = game.add.button(this.world.centerX, 600, 'smiley', this.myfunction, this); this.mybutton.anchor.setTo(.5); this.mybutton.scale.setTo(.2); this.mybutton.inputEnabled = true; //create smiley this.smiley = game.add.sprite(this.world.centerX, this.world.centerY, 'smiley'); this.smiley.anchor.setTo(.5); this.smiley.scale.setTo(.5); //create mytimepass mytimepass = game.time.create(false); mytimepass.add(3000, function () { if (!smiley_tw_pass) smiley_tw_pass = true; smiley_tw = game.add.tween(this.smiley).to({ alpha: 0 }, 1200, Phaser.Easing.Quadratic.InOut, true); smiley_tw.onComplete.add(function () { this.smiley.y = 100; this.smiley.alpha = 0.1; }, this); }, this); mytimepass.start(); }, myfunction: function () { switch (mygamepaused) { case false: mygamepaused = true; mytimepass.pause(); if (smiley_tw_pass) smiley_tw.pause(); break; case true: mygamepaused = false; mytimepass.resume(); if (smiley_tw_pass) smiley_tw.resume(); break; } }, render: function () { game.debug.text('mygamepaused: ' + mygamepaused, 20, 20); game.debug.text('smiley_tw_pass: ' + smiley_tw_pass, 20, 40); game.debug.text('mytimepass: ' + mytimepass.duration.toFixed(0), 20, 80); } };
  14. Arcade overlap doesn't work

    I think the problem here is the beam's hitbox. You see, every sprite has a hitbox and it's basically a rectangle shape; rotating the beam at 45 degrees will not rotate the hitbox. You can change its size but not its shape; unless you take the p2 physics route which will have an impact on the performance due to the complex shape; it will require more cpu power. Granted I might be wrong about this and your problem might be something else...sorry that I can't give you a straight answer but I'm kinda new to Phaser myself. Someone more experienced might help you on this one Take a look here: https://phaser.io/examples/v2/p2-physics/body-debug Try to render the beam's body and see what's going on: update: function () { //stuff }, render: function () { this.game.debug.body(player); this.beams.forEachAlive(function (beams_body) { this.game.debug.body(beams_body); }, this); }
  15. @samid737 Ooohh yeah I get it, that makes sense now. Thanks for the explanation! It works great now, assigning a property did the job. Thank you both very much for your help!