experiment

SocksSocks London, UK.Member Posts: 12,822

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 Member Posts: 738

    Cool

  • HopscotchHopscotch Member, PRO Posts: 2,782

    @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 Member Posts: 504

    Ha ha! that's awesome!

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

    @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 ?

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

    Here's another experiment with a circular path where the radius is tied to a sine wave:
    (the lines are very thin, so you'll have to hit the HD 720p setting - and maybe even go full screen).

    Here's the path I was using (on a landscape iPad project - hence the '512' and '384')

    Constrain X to (10 *sin( self.Time *330)+190) *cos( self.Time *30)+512
    Constrain Y to (10 *sin( self.Time *330)+190) *sin( self.Time *30)+384

    Obviously if you want to see the actual path you'd need to stick in a timer that spawns a little dot every 0.01 seconds along the path.

  • TosanuTosanu Member, PRO Posts: 388

    Neat, you made spirographs.

  • gingagaminggingagaming FREELANCE GS DEV Member Posts: 1,685

    Spider-mans testicles!

  • ForumNinjaForumNinja Key Master, Head Chef, Member, PRO Posts: 554

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

  • HopscotchHopscotch Member, PRO Posts: 2,782

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

    Flexible HTML5 then...

    You walked into that one @ForumNinja‌ :D

  • ForumNinjaForumNinja Key Master, Head Chef, Member, PRO Posts: 554

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

  • allc1865allc1865 Member, PRO Posts: 777

    That's pretty neat!

  • UtopianGamesUtopianGames Member Posts: 5,692

    Love it :)

    Darren.

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

    @DeepBlueApps said:
    Love it :)

    Darren.

    Cheers ! :)

    @jonmulcahy said:
    very cool!

    Cheers !

    @gingagaming said:
    Spider-mans testicles!

    :| lol.

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

    People still using screen savers !?!?! :smiley:

    @Tosanu said:
    Neat, you made spirographs.

    My life is now complete.

    @allc1865 said:
    That's pretty neat!

    Cheers !!!!

    More maths experiments and a couple of old ones . . . they run really smooth on the Mac and on an iDevice, but when recording the screen you get all sorts of annoying glitches !!

  • ProPro Member Posts: 16

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

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

    @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 Member, Sous Chef, PRO, Bowlboy Sidekick Posts: 9,271

    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.Member Posts: 12,822

    @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 Member Posts: 16

    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.Member Posts: 12,822

    @Hopscotch said:
    Exquisite Socks!

    Idea for Christmas present.

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

    :wink:

  • SocksSocks London, UK.Member Posts: 12,822
    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 Member Posts: 16

    @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.Member Posts: 12,822

    @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 Member Posts: 16

    @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.Member Posts: 12,822

    @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 Member, PRO Posts: 1,598
  • LoadedLoaded Member Posts: 240

    @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 Member Posts: 1,610

    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.Member Posts: 12,822
    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.