Physics gravity conundrum

This forum is currently in read-only mode.
From the Asset Store
Simple yet very life-like rag doll made with Physics!
  • The reason it's not working right is you're doing the physics calculations wrong

    http://en.wikipedia.org/wiki/Newton's_law_of_universal_gravitation

    http://www.quozzzigcs.cap%20NO%20THIS%20IS%20CRAP

    EDIT: Though it does tend to flail around in circles a bit if you have loads of circles.

    EDIT2: Also, since it resets the force each tick so it can work out the new gravity force, (as the gravity force shouldn't accumulate) if you set the force to something else (like if you wanted to shoot them and they break apart) it will just not work. I'll try to remedy this.

    EDIT3: http://www.quotecats.com/what/phyuiziixckzxez.cap

    much better, though I can't manage to add the ship to the family "Blue" (this has gotta be a bug?) It's especially cool if you ramp up the ship's mass and force towards the mouse, then you can smash apart the asteroid clumps.

  • Hell yeah faggatron! That's awesome! Good job

    Made some small changes:

    http://www.fileshack.us/get_file.php?id ... eroids.cap

    Left/right to turn, up to thrust, space to fire.

    Clicking adds more asteroids, the ship's bullets blow them apart.

  • What's this eh?? EH?!?

    A WHAT? A COMMUNITY BUILT GAME YOU

    SAY?!?!

    THIS IS INSANE!

    THIS....

    IS SCIRRA!!!!!!!!!!

    ~Sol

  • Well if anyone's interested in turning this into a community project I'm down for it. We might want to move away from the whole Asteroids style gameplay though, I don't want to step on Graviroid's toes. I mean, that dude just released his game like a few days ago.

    Would be interesting to see what other styles of gameplay we could come up with while still using the gravity thingumer though. Some kind of puzzle game maybe?

    Edit: I mean community project like how it's been going so far, kinda casual style. I don't want to commit to anything, but if I feel like it I might tweak it a bit or add some graphics now and then or something.

  • Yeah I'm cool to try and contribute where possible on a strictly platonic level... I guess we could have some kind of "gravity herding" puzzle fest where the player has to coax the gravitons into a, or several "goal" areas? We could even change it from a spaceship to something like a little dude using a "ghostbusters gun"... or bacteria in a petree dish being zapped with antibiotics?

    I dunno, but it sounds like we could have some casual fun messing around with this!

    ~Sol

  • I like the bacteria thing, that's a cool idea. Like you could be a medical nanobot or something swimming around in someone's bloodstream and you have to blast away bacteria that are going for healthy blood cells, but you have to be careful not to blast the blood cells themselves.

    Seems like it would be a good chance to show off some sprite distortion and have some neat effects going on to make wiggly little ameoba bacteria things too. And the levels could be the insides of twisty veins and things and the whole level kind of undulates around.

    The gravity sim would have to be slowed down and made "looser" to get the floaty effect of cells in liquid though.

  • I like the idea you've got going there, deadeye. By the way, to get the floaty feeling of being inside a liquid, you can just increase the world scale for the physics object. I've used it plenty with this simulation for when I have smaller/bigger particles than usual, which usual will move to slowly/fast reletive to their size.

  • That idea reminds me of this game:

    http://www.experimentalgameplay.com/game.php?g=22

  • Well if anyone's interested in turning this into a community project I'm down for it. We might want to move away from the whole Asteroids style gameplay though, I don't want to step on Graviroid's toes. I mean, that dude just released his game like a few days ago.

    Would be interesting to see what other styles of gameplay we could come up with while still using the gravity thingumer though. Some kind of puzzle game maybe?

    Edit: I mean community project like how it's been going so far, kinda casual style. I don't want to commit to anything, but if I feel like it I might tweak it a bit or add some graphics now and then or something.

    that pm i sent you, i think it would be quite good for this dont you eh? i myself have thought of using it in THIS EXACT SAME WAY after seeing your thread.

  • that pm i sent you, i think it would be quite good for this dont you eh? i myself have thought of using it in THIS EXACT SAME WAY after seeing your thread.

    HOLY CRAP that was awesome!

  • The gravity sim would have to be slowed down and made "looser" to get the floaty effect of cells in liquid though.

    The way to this would be, either to change the constant at the start of the set velocity equations, or to (increase that and) raise the power of the distance formula. So for example:

    instead of the formula being a=Gm/r^2 it's a=Gm/r^3(or more) where G is a constant m is the mass of the sprite it's being attracted to and r is the distance.

    The effect of this would be that when the sprites are far away the force is lower, and when they're closer the force is higher. In fact this is why what you were doing before was really weird, the force of attraction was actually higher when they were far away.

    I was thinking more along the lines of gRAVTARDEROIDZZZZZZ... but yeah whatever

    The other issue with it is it would be nice to have tons of asteroids, but this isn't feasible with it having a loop with (number of objects)^2 iterations, I'm sure something could be done to make this better, such as adding a "pick by distance<200" or something between the two loop conditions. Though this might cause other issues (like them not attracting far away )

    One other thing I thought would be cool (and briefly tried, failing horribly) would be to somehow treat all the clumps as one object, then shove a big bubble or something on top of it, using mesh distortion to give it the shape. This is probably too insanely difficult though, I couldn't make it work out which clump was which at all.

  • I was thinking more along the lines of gRAVTARDEROIDZZZZZZ

    http://www.quotecats.com/what/gRAVTARDEROIDZZZZ.cap

    Nice and unplayable like the original.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • > I was thinking more along the lines of gRAVTARDEROIDZZZZZZ

    >

    http://www.quotecats.com/what/gRAVTARDEROIDZZZZ.cap

    Nice and unplayable like the original.

    Crashes for me when I try to run it... loads in Construct fine but won't play. D:

    ~Sol

  • Thats weird it runs fine for me. maybe the plasma objects I made are doing something weird I dunno.

    Screenshots, just because its quite pretty:

    http://www.quotecats.com/what/grav1.PNG

    http://www.quotecats.com/what/grav2.PNG

    http://www.quotecats.com/what/grav3.PNG

    http://www.quotecats.com/what/grav4.PNG

    Combining with the quaziblob effect: http://www.quotecats.com/what/fireblob.cap

    (heh that effect's quickly becoming a cliche)

  • Thats weird it runs fine for me. maybe the plasma objects I made are doing something weird I dunno.

    Screenshots, just because its quite pretty:

    http://www.quotecats.com/what/grav1.PNG

    http://www.quotecats.com/what/grav2.PNG

    http://www.quotecats.com/what/grav3.PNG

    http://www.quotecats.com/what/grav4.PNG

    Combining with the quaziblob effect: http://www.quotecats.com/what/fireblob.cap

    (heh that effect's quickly becoming a cliche)

    I can has EXE file plox?

    ~Sol

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