This is the game for people who don't already know it: youtube video

I am looking for theory about making an object move around another object and stay stuck to it. How would I implement something similar?


closed as off-topic by MichaelHouse Jan 14 '14 at 1:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started" or "what should I learn next" cannot reasonably be answered with anything other than opinion polling and therefore are off topic for the site. For more information on how to ask a better question, see the help center" – MichaelHouse
If this question can be reworded to fit the rules in the help center, please edit the question.


I saw the game first time from your link, so I might be making wrong assumptions about it's mechanics. But I still think that it could be done this way.

The game seems to be all about gravity. Every block the player can walk on has it's own gravity well, and player can jump out of it if there's another gravity block nearby enough. It's simple planet-like gravitation explained here: 2D Planet Gravity

Objects sticking to the block is done with collision detection.

  • \$\begingroup\$ if you want simpler gravity then you can use a Voronoi data structure and only attract to the closest object \$\endgroup\$ – ratchet freak Nov 14 '13 at 8:43
  • \$\begingroup\$ Thank you, those are information are enough to set me in the right path, i'll be back in case i faced some "direct" coding issues . have a nice day \$\endgroup\$ – alaslipknot Nov 15 '13 at 14:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.