R0J0hound's Recent Forum Activity

  • The physics behavior would be the simplest way. Just use a bunch of circles. Do a search for liquid, fluid or water and you should find some examples, and even a way to make them look gelled together instead of being separate circles.

    To make it act like a thicker liquid like lava you could make an attraction force to nearby circles and walls.

  • It is still very accurate though. The error is at the 17th decimal place. The only inconvenience is making the number look cleaner when displaying it, which Aphrodite's equation will do.

  • On firefox I get 6fps moving and 50 standing. My pc is a dog.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Revisited and added collisions.

    https://www.dropbox.com/s/ftz0knyzl5fcm ... .capx?dl=1

    examples25/spring_ground2.capx

    Not perfect, because speed can explode colliding with corners and objects can pass through walls if moving too fast, but it works.

  • Chigabooga

    The easiest way to do that working with physics would be to use the tilemap object.

    To make it look nicer you could used a blend effect with it to show better graphics instead of a plain color.

  • For the jelly look of the platforms you can use equations for springs to get a nice effect. Canvas or Paster would be needed if you want a more pleasing appearance,

    /examples25/spring_ground.capx

    https://www.dropbox.com/s/w16s3j1kk5fol ... .capx?dl=1

    Drag the points around.

    Collision response with a player will require more math for the collision response, but it basically boils down to checking the player's collision with the edges and pushing each other out just enough so they are no longer overlapping. There is a bit more to it but it would have to wait till I revisit this and push it further.

  • The problem with making a plugin is the need of a way to specify which edges are snappable. Unless all edges should be. So defining the edges that snap would be the nearly the same, you'd still need to specify the normal.

  • The normal is just the angle perpendicular to the edge facing out. For instance the slope (rise/run or change in y divided by the change in x) or the right edge is 2/1 and the norm slope is 1/-2. The calculation of angle from slope is angle(0,0,run,rise). Another way is to guess the angles, test and re adjust

  • The event 11 trick was so the pinned connector sprite's positions would be updated before moving.

    The reason for this is the game flow is like the following and we have to wait for the next frame for pin to run again.

    behaviors -> event sheet -> draw -> repeat.

    Wait 0 or with a very low time can be ready by the end of the event sheet, so wait with a higher value or "wait signal" worked. Although I agree it's not a very clean solution.

    The clean solution would be to do pin in events so I can update the pinned objects whenever I need.

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

    But sometimes it's easier to just make do with exiting behaviors.

  • Well, take for instance a box rotated 45 degrees. Then if you stretched it vertically relative to the screen you would get an elongated diamond. There isn't a way in C2 to stretch the box like that. Other than that the math is not bad.

  • codah

    The math for the angle was simpler than I thought, but I was messing around with it blind for a bit.

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

  • My idea would be to first have a sprite pinned to the center of snap-able each edge center of each shape. Let's call them "edge".

    Then when a shape is dropped pick the closest other edge that's closest to each of the shapes edges. Of the two pairs of edges only keep the closest. A little tedious to make events for but that would give you the two edges that would need to snap together.

    The snapping could be done by moving the dropped shape by the offset of the edges and orienting them based on the normals of the edges.

    I'm attempting to come up with an elegant event setup, so stand by for a capx.