UncleAcid

Members
  • Content count

    41
  • Joined

  • Last visited

About UncleAcid

  • Rank
    Advanced Member
  • Birthday 12/14/1990

Contact Methods

  • Website URL
    http://rroylance.github.io/

Profile Information

  • Gender
    Male
  • Location
    Toronto, Ontario

Recent Profile Visitors

392 profile views
  1. Simple; just put the built plugin js in your assets folder and it'll be automatically loaded, then just add it with game.plugins.add as usual. Take a look at the BlurX and BlurY in the project (not plugins, they are filters, but same loading process, all you'd have to change is having the game.plugjns.add call with Phaser.Plugin.PluginName). Any issues just let me know.
  2. Hey bushmango, could you get the proper link to your game? I'd love to see it! Maybe put a link to it in the README for my template if that's ok with you?
  3. Ya, I definitely did some things that are very different from using straight up Phaser, but I'm glad you were able to get going and it seems like it did make a positive difference in the end. If you have any feedback on any improvements to make anything easier to do or understand I'd love to hear it. The link doesn't work, it seems the games are all listed with the games name after /38/, maybe that was a pre-release link or something. What's the name of you game?
  4. That is a good plan as well, you have 2 days to get something done, I'd stick with what I know too. Haha Again, send me links to anything you do with my template, if you do anything with it, I'd love to see it
  5. Awesome, glad I could help! I hope it all goes well for you, definitely send me the link to your game after!
  6. Ah, gotcha. I'm not sure, but you could try generating a texture from your graphics object to create a sprite with, instead of just using the graphics object?
  7. How to correct position Phaser Sprites?

    I don't believe that graphics object respect anchors, they only deal with top left, width and height. So it doesn't matter where the parent sprites center is, since the graphics object is looking at the sprites top left. I could be wrong, I didn't confirm that at the moment, but I think I remember reading that at some point.
  8. Is lineStyle what you're looking for? http://phaser.io/docs/2.6.2/Phaser.Graphics.html#lineStyle Calling this before you call drawRect will result in a filled rectangle with an outline.
  9. How to correct position Phaser Sprites?

    It's because you are using the same offset for the mushroom as the boxes, you are positioning the first mushrooms center at 100,100, which is the bottom right of the first border box. You need the + 50 so that you are positioning the mushrooms at the center of the border boxes, not the edges.
  10. FullScreen not working on Chrome Mobile v56

    Not sure, but the issue has been reported in the GitHub repo (https://github.com/photonstorm/phaser-ce/issues/27) you can keep an eye on that issue (or watch/follow it if you use GitHub).
  11. Loading Bar NOT for Preload()

    I don't believe you can do it the exact way you're wanting to, your long create function is all happening on the same thread, causing the game to hang while it runs. The reason the load screen can have the progress update is that it's loading assets in other threads (the browser is loading the assets, not javascript or phaser) and reporting progress back to the javascript thread. Javascript is single threaded so you'll have to run your loads over multiple frames. You could fake it by using setTimeout(this.initNext, 0) or similar so that you only initialize one thing per frame (or as many things you can load without hanging too much/makes progress look the way you want). You'd have to keep track of the amount of loading chunks you have and update your progress bar as you load those chunks. Makes sense?
  12. Phaser Typescript, Can't use private method?

    It's because 'this' in the context of preload is not your instance of your demo class; 'this' in the context of preload is the Phaser.Game. You will have the same issue with both create, and update as well... you could get around that by binding your functions when you set them; /// <reference path="scripts/phaser.d.ts" /> class demo { private game: Phaser.Game; constructor() { this.game = new Phaser.Game(500, 500, Phaser.AUTO, "content", { create: this.create.bind(this), preload: this.preload.bind(this), update: this.update.bind(this) }); } private doSomething(): void { } private update(): void { } private preload(): void { this.doSomething(); } private create(): void{ } } window.onload = () => { new demo(); };
  13. Audio Not Playing

    Sounds like the recent change in Chrome for Android; Web Audio user gesture requirement on cross origin iframes on Android... ? https://www.chromestatus.com/feature/6406908126691328 https://github.com/photonstorm/phaser/issues/2913
  14. Tap, double tap and buttons

    You'll probably run into issues because onTap is not called if you don't release quick enough (not a tap)... honestly, what I would do is use a background and add onInputDown and onInputUp to it to handle the tap and double tap (using time.now and lastClickTime and timers for figuring out if it's one or the other) avoiding the global input.onTap. Then you also don't have to worry about clicking buttons counting as a tap or not as the button is covering the background and therefore the background doesn't get the event...
  15. Tween to modify different fields of an object

    That's the expected way to do it. If you really want to only use a single tween you could defineProperty anything you need; Object.defineProperty(sprite, 'scaleX', { get: function() { return this.scale.x; }, set: function(value) { this.scale.x = value; } }); Object.defineProperty(sprite, 'scaleY', { get: function() { return this.scale.y; }, set: function(value) { this.scale.y = value; } }); var tween = this.game.add.tween(sprite) .to( { x: prevWidth * 1.5, y : prevHeigth * 1.5, scaleX: scX, scaleY: scY }, 200, "Linear", false) .to( { x: prevWidth, y : prevHeigth, scaleX: orX, scaleY: orY }, 200, "Linear", false ); tween.start();