Colludium's Recent Forum Activity

  • Problem Description

    The "update sine initial state" action causes the Init() function in the plugin to run to set the initial conditions. When angle sine is the selected mode, the Init() function converts the magnitude from degrees to radians, which is ok for the first Init() but for subsequent updates the function factors this.mag (already in radians) to radians again.

    Attach a Capx

    capx

    Description of Capx

    Two objects, one with sine (oscillate angle). Right arrow key to rotate second object and reset initial conditions of sine object.

    Steps to Reproduce Bug

    • Right arrow key
    • Observe the oscillation apparently stops

    Observed Result

    The object appears to stop oscillating because the sine oscillation angle size becomes very small.

    Expected Result

    The degrees to readians conversion in Init() should only run during OnCreate() and not when updating the initial prams, because the angles are already in radians.

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Internet Explorer: (YES)

    Operating System and Service Pack

    W10 x64.

    Construct 2 Version ID

    r247 64 bit.

  • I'll do it, no probs.

  • Ah, I see. It's a bug in the plugin - the Init() function converts the magnitude degrees to radians, but it's called every time that the initial state is updated.

  • It's updating to the initial state every tick that the right arrow key is held down.

  • Update: Gravitational attractor now added. There's an example on the above link (refresh to v1.0.0.3).

  • I can't submit this as a bug report because it's to do with the SDK and the closure compiler minfier. So, to all you javascript devs, just be aware that if you use the array.includes(x) method then it will become corrupted by the minifier (r246). Of course, you can work around using array["includes"](x).

    Just for info in case anyone else gets caught out by this (that's an hour of my life I shalln't get back)!

  • Now added a joints demo link. I'm discontinuing the rope joint because it's terribly inconsistent (often breaks and stretches). The revolute joint is far more reliable for making ropes and there's an example in the link to show this.

    Next on the todo list:

    Gravity attractor

    Tidy up code

    Make hull from image editor

    Make platform behavior (using events, so it can be user-adjusted).

    Start work on instruction manual

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • mekonbekon - thanks! Once I get this stable and c3 is out of beta then I'm planning on making a c3 port. But that'll be a long way off, I think.

    Prominent - Interesting. On my i5 laptop the old asm.js was pretty good up to 35 layers, then it would bulge and deform. Chipmunk would fall apart by itself, but my version ob box2d would be rock steady. I guess you're using a more powerful computer, so the stress is less stressful..?

  • Alrighty... Putting together the demos highlighted a limitation to how events work for this plugin. For example, on a collision trigger, if you want to use an Action on the object that was hit (not the one with the trigger condition) then you have to sort through the other box2d objects and identify the one associated with the uid obtained from the collision. You can get around this to some extent by using families, but that method can get complicated when filtering.

    So I'm going to make all Actions in this plugin 'global'. There will be a uid field that'll be auto-populated with Self.uid but you will be able to over type it if you wish to pick another object instead.

    If you think this is a crazy idea, please let me know now before I change too much! Thanks

  • - Thank you!!

  • this looks very promising, tell me you have some alpha/beta for people to use!

    Thanks! Not yet - I'm still trying to add features. But when I do I will announce it.

    New feature added - a c2 bespoke "Assimilate" joint. The weld joint suffers from the same problem that all physics library 'fixed' types of joints suffer from - because the engine iterates over each object in turn, the joints aren't truly solid because each object exerts slightly incorrect forces onto the others they are joined to. And lots of joints between lots of objects can cause joint fighting (it's spectacular, but frustrating).

    The cure: object assimilation. In this Box2d+ plugin you can assimilate an object as the child of another (in box2d language, you turn it into a fixture) - and back again, of course. Here's an example:

    *The cpu should read ~12%. I've been mixing up my c2 with my javascript...

    Try it out for yourselves: link

    Left mouse to drag, right click anywhere to toggle assimilate joints to join all of the icon squares to the round object.

  • Awesome work! look forward to updates

    Thank you

    Here you go: I've managed to get some joints to work!! Just some tweaking now, then I'll create a joint demo.

    Joints now working:

    Revolute / Limited Revolute / Revolute motor / Gear on revolute

    Prismatic

    Distance

    Pulley

    Weld

    Rope

    Wheel

    Joints not planned for inclusion:

    Mouse joint (no need, better done using events and hidden object)

    Friction joint

Colludium's avatar

Colludium

Member since 26 Aug, 2013

Twitter
Colludium has 11 followers

Connect with Colludium

Trophy Case

  • 11-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • x3
    Coach One of your tutorials has over 1,000 readers
  • Educator One of your tutorials has over 10,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies