rroylance

Members
  • Content Count

    51
  • Joined

  • Last visited

About rroylance

  • 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

690 profile views
  1. rroylance

    Using non-convex polygons sprites (P2 physics)

    I've used Physics Body Editor (http://www.aurelienribon.com/post/2012-04-physics-body-editor-pre-3-0-update) for a couple games I've put out.
  2. Sorry for the delay, as with most people I was on Holiday. Hope you all had a great time with the families or whatever you may have done On the topic at hand; the same result, my canvas is already parented to the window anyway. Note that it also has the same resolution when started in landscape mode as well, so it's not just a result of starting the game in portrait and rotating it. There must just be a setting I'm missing... hmm.
  3. I'm using RESIZE mode not the default SHOW_ALL. I do not want anything to be stretched at all so I used RESIZE which is supposed to simply update the stage to be the same size as the window leaving the scaling intact. I simply want the game size to be updated, not rotated or scaled at all, and I'm going to handle all the positioning and scaling of things; I am making the game to work in both portrait and landscape resolutions with different layouts and such to accommodate the screen space available. So when you rotate the phone I do not want the game to actually rotate, just update the size of the canvas. Sorry if I repeated myself a few times, just trying to explain as clearly as I can. Thanks.
  4. Hi all, Hopefully, this is just something quick I'm missing... I have initialized my game with the resolution of 500x800 and SCALE_MODE is set to RESIZE; In portrait orientation, the game is the correct size of 500x800, however, when I rotate the device and would expect the game to now be 800x500 it is actually 500x313. I'm thinking I'm just missing something that I need to manually resize or update or something, but I'm having trouble finding what I need by searching around. Anyone know how to accomplish what I'm expecting? Thanks.
  5. OK. Think I got a viable solution now. As @samme and @rich said, creating dummy sprite containers is the way to go. What I was missing is that in my case I need to create a new container and add the existing container to it for every transformation. I was looking at this way too long and I'm very glad to be moving on, hopefully no more easy answers escape me. Thank you so much guys, much appreciated! EDIT; None of the codepens are clean or good code, but they were just functionality tests that I can now take the idea into the actual project, so I'm sorry about that. But here is the working example!
  6. @samme @rich Progress! I implemented the dummy sprite as a container and splitting up which object gets scaled vs rotated and that works perfect... when I do the both scales and then the rotate in that order. Below. However I need to be able to do those 3 transformations in any order and have it act as expected, but currently it looks like this (doing scale x, rotate, then scale y). Which totally makes sense, it's doing the scale y based on where the line is in relation to the shape at the start, however the rotation seems to be fine no matter which order, which makes sense since the rotation object is separate: Any idea how I would go about setting the pivot point relative to the shapes current location and orientation so the order doesn't matter ? In the final case, it should scale x and rotate as it does but then the scale y should flip the shape down off the bottom of the screen since it's so far away from the blue line. Thanks again guys.
  7. ... That sounds like it'll work and solve my issues completely. I didn't even consider using a parent. I'll try that out tomorrow. Thank you so much Sam & Rich!
  8. I have tried that and it doesn't quite work; for example when I scale the sprite x to -1 to do the red line transformation and then if I try to then set the pivot point to the blue line, it's actually way off to one side as the sprite is now backwards. More or less same thing when the sprite is rotated, then the x y positions relative to the sprite are all off axis and not feasible to manually adjust for. I'm hoping there is some "world space" pivot that can be done, or maybe a way to create a new sprite with the orientation of the existing one (so I can then set the pivot and all that on a fresh sprite that won't have the offset and off axis issues) and just swap them out every step. But I'm coming up empty.
  9. pivot, not using anchor at all. For example, this is how I set the pivot point for the rotation; this.gridShapeTarget.pivot.set(this.rotationPoint.worldPosition.x - this.gridShapeTarget.worldPosition.x, this.rotationPoint.worldPosition.y - this.gridShapeTarget.worldPosition.y); this.gridShapeTarget.position.set(this.gridShapeTarget.position.x + this.gridShapeTarget.pivot.x, this.gridShapeTarget.position.y + this.gridShapeTarget.pivot.y); this.gridShapeTarget.rotation += deltaDegrees;
  10. Hi all, I've been banging my head off the desk for days now and can't figure out how to go about accomplishing this. I've gotten to the point of being able to scale or rotate around a random pivot point, but only once, I need to be able to do it multiple times in a row. For example (in the GIF attached); I need to scale the box across the red line as the pivot point, and then scale the box along the blue line as the pivot point and then finally rotate the box around the green dot as the pivot point. I can do each step individually just fine, but the chaining together completely breaks as I can't figure out how to set the pivot point on the already manipulated sprite properly. Does anyone have any ideas on how to accomplish this? I really need to get this working asap and I'm at the end of my rope. Thanks.
  11. 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.
  12. 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?
  13. 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?
  14. 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
  15. Awesome, glad I could help! I hope it all goes well for you, definitely send me the link to your game after!