Gravitation Behavior - Beta

This forum is currently in read-only mode.
  • Although this object could pretty much qualify as done, I'm going to post it here as a beta for now to make sure the bugs are worked out. Anyways, onto what this plugin does.

    What it does:

    This is essentially a far more advanced version of my Orbiter behavior. BUT... instead of merely rotating an object around another object in a completely predictable/stable orbit, this acts more like a gravity well. You can set an object to act as a satellite, an attractor, or both, where every object could have it's own pull on the others and orbit the others as well.

    Also, you can apply forces to the objects(in a way similar to the physics behavior) to make them move in certain ways. You can use the movement actions to make a space ship movement, for example.

    Parameters:

    <img src="http://files.getdropbox.com/u/917406/parameters.png">

    Actions:

    <img src="http://files.getdropbox.com/u/917406/actions.png">

    Expressions:

    <img src="http://files.getdropbox.com/u/917406/expressions.png">

    Conditions:

    <img src="http://files.getdropbox.com/u/917406/conditions.png">

    Download:

    DOWNLOAD NOW - 102KB

    Examples:

    Gravitation example pack - 22KB

    Full documentation will come when I release the completed version. If you have any specific questions about what something does, go ahead and ask and I'll explain. Be sure to let me know about any bugs you find, and have fun with it.

    By the way, just thought I'd mention the speed impact of this object. I would keep the amount of objects simultaneously orbiting and attracting to around 100, depending on what type of processor you have. Although it's good to point out that this object is 5-10 times faster than doing the same thing through events.

  • hey link

    as a fellow plugin dev, when I get a chance to test it forreal I will, and give feedback

    but a tip I've noticed to get people to try your stuff, is to post an exe sample as well

    that way the lazier folks (myself included were it not for said plugin devness) can try it out before they install a new plugin they may not be interested in

    I know it only takes a few seconds to install a plugin, but it's just human nature.

    this sounds awesome btw, can't wait to try it when I have some more time

  • Looks pretty cool. Actually I can think of a lot of uses for it, especially for effects.

  • That's awesome . I've spent way too much time playing with your absorb.cap.

    In fact, looking at your absorb.cap I've been inspired to finish the microbe-shooter I started a long time ago. This plugin would be just about perfect for the enemy movement.

  • Awesome plugin! This'll be really useful for a few of my projects.

  • thats really cool, I like both those examples fairly awesome and simple.

  • Nice.

    p.s.: For STABLE examples use the STABLE version of Construct. I had to download Construct 99.3 for trying the examples.

  • Awesome!

    Question: Would collisions and bumping work or be possible?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks for the comments, guys. Glad you're all liking it so far.

    but a tip I've noticed to get people to try your stuff, is to post an exe sample as well

    that way the lazier folks (myself included were it not for said plugin devness) can try it out before they install a new plugin they may not be interested in

    This is a good point. I'll look into bundling a bunch of examples into an EXE later on.

    p.s.: For STABLE examples use the STABLE version of Construct. I had to download Construct 99.3 for trying the examples.

    Whoops, sorry. I always forget about this. I'll try and make all future examples for the current stable build.

    Question: Would collisions and bumping work or be possible?

    That's actually a good idea, and it should be rather easy to implement. I'll try and squeak that into the next build.

  • awesome stuff link

    question:

    when an object is absorbed, does supposed to add the mass of the object to the object that didn't get absorbed?

    also, an idea, could object size changing according to mass should be a multiplier you can set, to make it more general?

    like 0 would mean there would be no change in size regardless of mass,

    and 1 would be the way it is now

    10 would be 10 times more size difference per part mass

    I mean, what if you wanted to make super gravity guy, the tiny alien with gravitation powers, who can absorb objects at will, but you never wanted his size to change?

    and maybe a starting mass property, so you can decide the scale of your game, I might want a 10x10 pixel star to be an ultra heavy object in my game.

    supercool stuff though

    and it's interesting to see where that line of questioning in the plugins forums was leading

  • when an object is absorbed, does supposed to add the mass of the object to the object that didn't get absorbed?

    Yes. The smaller object's mass is added to the larger object.

  • Awesome. Really.

    Demo reminds me of this:

    Subscribe to Construct videos now
  • Again, thanks for all the feedback, guys. I've added some extra resizing options for the next version. There's now a "Resize" check box and a "Size multiplier" field for more(any) control over resizing.

    The bouncing is turning out to be harder to implement than I thought. And this is for true circle/circle bouncing, not just going back the direction the ball came. The math is pretty complex and I can't seem to find a good method that doesn't require really fancy stuff.

  • I think this may help linkman

    http://files.getdropbox.com/u/1013446/ballangles.cap

    left and right arrow aim

    mouse moves arrow

    left mouse button fires ball

    the only event that matters for your purposes is the "on collision" one

    I believe that is correct normal based reflection though

    basically :

    <img src="http://upload.wikimedia.org/wikipedia/commons/thumb/1/10/Reflection_angles.svg/170px-Reflection_angles.svg.png">

    normal = angle(object1.x,object1.y,object2.x,object2.y)

    angle r = normal - object1.angle (the angle it was moving)

    the normal is the angle between the centers of the two objects upon collision

    I have to minus 180 in my example so it's facing back outward

    then you just subtract angle r from the normal to get angle i

    I just noticed as I was typing this though, that your problem might have become complex because of the multiple balls being reflected and not stationary...but I think the same basic rules should apply

  • I was trying to make a Katamari kind of thing, but ran into a lot of flaws. If this had a compatability with the Physics behaviour, it would be really cool.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)