-1
\$\begingroup\$

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?

\$\endgroup\$

1 Answer 1

4
\$\begingroup\$

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.

\$\endgroup\$
2
  • \$\begingroup\$ if you want simpler gravity then you can use a Voronoi data structure and only attract to the closest object \$\endgroup\$ Commented Nov 14, 2013 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\$ Commented Nov 15, 2013 at 14:16

Not the answer you're looking for? Browse other questions tagged .