R0J0hound's Recent Forum Activity

  • megatronx

    Here's another iteration that adds other units (moving and not) that can push each other around. They're all circles.

    https://www.dropbox.com/s/98xzy7n9jrri6 ... .capx?dl=0

    Tokinsom

    If you're interested the smooth motion around the corners is done by using voronoi region around the polygon. The light blue region is closest to an edge and dark blue to a corner. It then finds the distance and angle between the object and that point or edge of that region. With that it can calculate how far to move away if too close.

    https://www.dropbox.com/s/ethfdnbvqlfij ... n.png?dl=0

  • [quote:8pibyrav]Then you can use the UID to pick them, and the sprite.count-1 to determine the last one.

    sprite.UID=Sprite.count-1

    that will select the last one created.

    That will only work if Sprite is the only object type you have in your game. Using iid might work though.

  • Bug. It pastes it regardless right now.

  • megatronx

    Here's the capx changed in a different way. It still uses imagepoints, but as long as there is three or more, and the points define a convex shape it will work. For isometric you could position the points in a diamond shape.

    https://www.dropbox.com/s/xvn63ri2yw9ir ... .capx?dl=0

  • Here's a non-regex way to do it. It just loops through the input a character at a time. It's longer but I do find it more readable.

    https://dl.dropboxusercontent.com/u/542 ... parse.capx

  • Mahbub918

    You can do it with the "take snapshot" action. Just set the canvas size to the layout size, capture, then set the canvas size back to normal. There's probably some browser limits to how big you can make the canvas though.

    start of layout

    system: set canvas size to layoutWidth x layoutHeight

    system: Take snapshot of canvas

    system: on canvas snapshot

    browser: invoke download of canvassnapshot with filename "layout.png"

    system: set canvas size to 640 x 480

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • That's odd, I haven't encountered that. Sounds like a bug since I'd assume no events run during loading. Also "getObjectByUID" isn't just called when using "pick by uid", it's a helper function that's used elsewhere.

    If you put a breakpoint inside the function definition of "assert2" (i think it's in common.js), you could then look at the call stack to see what functions were called before that. Still, that may not give you anything useful.

    If it's your events causing it, i'd be it would be under a trigger. If it happens in the "on created" or "on destroyed" triggers then I'd say it's a bug to report. What other triggers do you use?

  • Tokinsom megatronx and anyone else I linked here before.

    Update:

    Here's a more generic version of my above capx:

    https://www.dropbox.com/s/x68errm1tv6oh ... .capx?dl=0

    It no longer uses imagepoints, instead it calculates the corners regardless where the object's origin is. Also it's not tied to a particular sprite anymore, but you do have to duplicate an event or two to support more types (documented in capx).

  • tulamide

    QuaziGNRLnose

    I had a go at quazi's idea here:

    https://dl.dropboxusercontent.com/u/542 ... ordan.capx

    It was getting to tedious to get a nice formula from the equations, so I ended up putting all the formulas into a matrix and used guass-jordan to solve as a system of equations. Every time I change "m" I use that to recalculate the coefficients.

    Using an x^3 polynomial wasn't working right. It looked good when "m" was centered, but the amplitude would get crazy otherwise and the shape would lean. It ended up needing a x^4 polynomial, or 10 coefficients. For 10 unknowns I needed 10 equations: Three equations per piece (S0(x) and S1(x)) for the points. Two for the single derivatives between the pieces and two more for the double derivatives. That mess of formulas is in the bottom of js.txt.

    Anyways hat's off to quazi for the idea. Testing it it seems the limit for m is 0.5 to 1.5, beyond that the shape gets crazy.

  • Sourav21

    The canvas plugin is different, it can't paste effects.

  • Quansi's idea is probably the ideal way to go about it, since it's known to work.

    I came up with an iterative way here:

    https://dl.dropboxusercontent.com/u/542 ... g_sin.capx

    Changing the k parameter from 0 to 1 controls the center position. It has the desired shape, but it's not in a useful format yet.

    It still needs to be offset to align it, and it needs to be scaled to be the correct ranges.

    My guess is there may be a way to manipulate the equations to be in the form of one function that gives a y for an x. I may have a go at that later.

  • Sourav21

    This post has a fix for the bug of pasting stuff with effects. I've been lazy and haven't updated the plugin yet.

    By "canvas" it means the view, that's what it tries to load. If you mean the whole layout instead you could try changing the sytem->canvas size to 2000x2000, wait a frame, paste, then set the size back to the original window size.