Seperate gravitational forces?

Hi there, by what I mean, is I have a game idea, I am hoping to make a sandbox game, but I think it would be cool to have the game kind of like Super Mario Galaxy.
I really could use some help on:

How to set separate gravitational forces on separate little worlds ( i.e Mario Galaxy, how you can jump from world to world, and mario will basically get sucked to the mini world)

thanks for your help.

you need to apply the forces by Python. There are some threads with this topic already. I think something like planetary gravity or so.