Skip to content

Instantly share code, notes, and snippets.

@localhostdotdev
Last active May 3, 2019 21:29
Show Gist options
  • Save localhostdotdev/fbff0e91d1b2d66bfd6dadfe84e01ccb to your computer and use it in GitHub Desktop.
Save localhostdotdev/fbff0e91d1b2d66bfd6dadfe84e01ccb to your computer and use it in GitHub Desktop.
  • there is a fixed width/height rectangle board
  • players are circles
  • every player start at size 10 let's say
  • when somebody goes off the board (player B) the last player (A) who touched player B gets half of its "weight" added
    • perimeter is pi * r**2
    • so the new perimeter is (pi * rA**2) + (pi * rB**2)/2
    • new radius is pi * r**2 = (pi * rA**2) + (pi * rB**2)/2
    • r = sqrt(((pi * rA**2) + (pi * rB**2)/2)/2)
  • acceleration is proportional to weight (so the larger the slower)
  • when touching another player forces are distributed by weight (e.g. small player can't push large player much)
  • they are bots that can easily be killed
  • anybody can join/leave anytime

artist's impression :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment