GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

experiment

SocksSocks London, UK.Posts: 12,822Member

Here's a little experiment I was playing with.

3 balls forming a triangle.

Each ball is attracted to its neighbouring ball like this: - A is attracted to B - B is attracted to C - C is attracted to A.

So each ball always wants to move towards the ball it is attracted to - but as A moves towards B then C tries to keep up with A, and when C moves B must try and keep up with it, which just drags B away from A . . . and so on . . .

There is also an elastic thing between each of them which only forms when they are close enough.

Not sure there's a game in it, I just enjoy watching them fight it out :)

«13456710

Comments

  • zweg25zweg25 Posts: 738Member

    Cool

  • HopscotchHopscotch Posts: 2,782Member, PRO

    @Socks, you may have stumbled upon the missing link needed to unify gravity with the other three natural forces. One step closer to the Grand Unified Theory.

    Another feather in the cap for GameSalad.

    (Secret message: Roemve veido and go witre a pepar.)

  • gamestudentgamestudent Posts: 504Member, PRO

    Ha ha! that's awesome!

  • SocksSocks London, UK.Posts: 12,822Member

    @Hopscotch said:
    Socks, you may have stumbled upon the missing link needed to unify gravity with the other three natural forces.

    Cheese, mayonnaise and egg ?

  • TosanuTosanu Posts: 388Member, PRO

    Neat, you made spirographs.

  • ForumNinjaForumNinja Posts: 543Key Master, Head Chef, Member, PRO GameSalad Employee

    Looks like they could be used as sweet screen savers ;)

  • HopscotchHopscotch Posts: 2,782Member, PRO

    @ForumNinja said:
    Looks like they could be used as sweet screen savers ;)

    Flexible HTML5 then...

    You walked into that one @ForumNinja‌ :D

  • ForumNinjaForumNinja Posts: 543Key Master, Head Chef, Member, PRO GameSalad Employee

    @Hopscotch‌ Hey I'm just saying what it reminded me of ;)

  • allc1865allc1865 Posts: 777Member, PRO

    That's pretty neat!

  • UtopianGamesUtopianGames Posts: 5,686Member

    Love it :)

    Darren.

  • ProPro Posts: 16Member

    I wish I had your skills so I can stop getting frustrated with my own simplistic game. :neutral_face:

  • SocksSocks London, UK.Posts: 12,822Member

    @Pro said:
    I wish I had your skills so I can stop getting frustrated with my own simplistic game. :neutral_face:

    It's all very simple stuff ! I rarely use attributes, never use tables, pretty much all this kind of stuff (in the videos above) can be done with just a couple of actors and just a few basic rules, let maths do all the hard work !

  • Braydon_SFXBraydon_SFX Posts: 8,964Member, Sous Chef, PRO, Bowlboy Sidekick GameSalad Employee

    Nice stuff, @Socks ! I'm tempted to give you a "like" or something, but considering how close we are, I think I'll pass....this time. ;)

  • SocksSocks London, UK.Posts: 12,822Member

    @Braydon_SFX said:
    Nice stuff, Socks ! I'm tempted to give you a "like" or something, but considering how close we are, I think I'll pass....this time. ;)

    Lol . . . . go on, you know you want to . . .

  • ProPro Posts: 16Member

    I can't even figure out how to make an enemy spawner (if it spawns actors randomly) spawn faster by 0.5 seconds every 5 seconds then stops once it's dropping every 0.7 seconds.

  • SocksSocks London, UK.Posts: 12,822Member

    @Hopscotch said:
    Exquisite Socks!

    Idea for Christmas present.

    @Hopscotch said:
    The slinkys are so lifelike you hardly see the thread. :)

    :wink:

  • SocksSocks London, UK.Posts: 12,822Member
    edited July 2014

    @Pro said:
    I can't even figure out how to make an enemy spawner (if it spawns actors randomly) spawn faster by 0.5 seconds every 5 seconds then stops once it's dropping every 0.7 seconds.

    All those kinds of things are usually quite straightforward, unfortuntely I don't understand the question, lol :smile: . . . . if something is spawning 'faster' by 0.5 every 5 seconds then it can't be spawning every 5 seconds ?!? After the first 5 seconds it will be 4.5 seconds, then 4 seconds, then 3.5 seconds and so on . . . . (if I understand the question correctly ?)

    Quick example:

    https://www.mediafire.com/?m0fqbfehd5t82pg

    This spawns an enemy then another after 6.2 seconds, then another after 5.7 seconds (0.5 seconds faster) then another after 5.2 seconds (0.5 seconds faster) . . . and so on until it stops at 0.7 seconds.

  • ProPro Posts: 16Member

    @Socks‌

    Basically I have an Actor named "spawner" which is off-screen. It spawns a random actor (I named 3 of them 1, 2 and 3) every 3 seconds to begin with.

    The random chooser runs off of a "game.random" real attribute that chooses a random number every .5 seconds, so whatever number is chosen at the time of the spawning (3 seconds) it will spawn that actor.

    I want that spawner to increasingly spawn actors faster and faster (so, every 5 seconds the timeToSpawn decreases by 0.5 from the original 3 value).

    Then I just want it to stop decreasing the time to spawn once it reaches 0.7 seconds to spawn.

  • SocksSocks London, UK.Posts: 12,822Member

    @Pro said:
    Socks‌

    Still not sure I understand the question, maybe I'm being slow tonight, might need more coffee . . . .

    I want that spawner to increasingly spawn actors faster and faster (so, every 5 seconds the timeToSpawn decreases by 0.5 from the original 3 value).

    This is the part I find confusing. Could you type out what this would look like . . .

    0.0 seconds: Randomly spawn 1 of 3 actors
    3.0 seconds: Randomly spawn 1 of 3 actors
    5.0 seconds: Change time gap by -0.5 seconds
    7.5 seconds: Randomly spawn 1 of 3 actors

    . . . . etc etc . . ?

  • ProPro Posts: 16Member

    @Socks‌

    Every 3 seconds, a random actor is spawned. The 3 seconds are an attribute, named timeToSpawn.

    I want a separate timer that will change the attribute timeToSpawn (which is a REAL value which is 3) to become timeToSpawn - 0.5 seconds every 5 seconds.

    I tried this but it doesn't work, so it's frustrating. It seems so logical to work, but it doesn't.

  • SocksSocks London, UK.Posts: 12,822Member

    @Pro said:
    I want a separate timer that will change the attribute timeToSpawn (which is a REAL value which is 3) to become timeToSpawn - 0.5 seconds every 5 seconds.

    This is the part I find confusing. Could you type out what this would look like . . .

    0.0 seconds: Randomly spawn 1 of 3 actors
    3.0 seconds: Randomly spawn 1 of 3 actors
    5.0 seconds: Change time gap by -0.5 seconds
    7.5 seconds: Randomly spawn 1 of 3 actors

    . . . . etc etc . . ?

  • lycettebroslycettebros Posts: 1,598Member, PRO

    Hairy Caterpillars Batman!

  • LoadedLoaded Posts: 240Member

    @Socks That caterpillar is awesome dude!

    Website » Twitter » Facebook » Loaded Arts - Fun for thumbs.

    Developer Blog » 08/01/2015 - Week 72 – Apple, the great dictator…

  • colandercolander Posts: 1,610Member

    Very cool. I have learnt quite a bit from your posts @Socks keep em coming. Because of an earlier post of yours in another thread I have been reading up on angles, cos, sin, etc and getting a basic understanding of it. It is cool what can be done with it, love it.

  • SocksSocks London, UK.Posts: 12,822Member
    edited July 2014

    @colander said:
    Very cool. I have learnt quite a bit from your posts Socks keep em coming. Because of an earlier post of yours in another thread I have been reading up on angles, cos, sin, etc and getting a basic understanding of it. It is cool what can be done with it, love it.

    Yes, you can use cosine and sine for all sorts of trickery, from sweeping colours through the colour spectrum to generating pseudo-random paths for characters, and a million other things inbetween ! You can even - in theory - get GameSalad to produce a form of FM synthesis using sine waves . . . . . hmmmmm, might try that one tonight . . .

Sign In or Register to comment.