This will simulate gravity on a large object, like a planet. You use the arrow keys to move the block around. (Literally) You can jump with the up key. You can change the size of the planet with the slider on the bottom-left corner. And, uh, if you want to, you can press space to turn on the pen thing. I'm not really sure why you would want to do that, but it's there. Also you can double jump. Actually, you can jump as many times as you want without touching the ground.
I left the variables visible so that you could try to figure out what's going on. If you want to use any part of the project for yourself, you can go ahead and take it, but be sure to credit me. @TheAverageTeen Actually, someone else may have already made something similar to this. Use the one you think is better. Here are my notes, since this is more of an experiment than a game. ~ When the block gets to the edge of the project, it cannot go any farther away from the planet and it messes it up. I think I know how I could fix it, but that would require math. ~ Although it's meant to accurately simulate gravity, it only looks like it does. If it really simulated gravity, the block should be able to orbit around the planet if it goes fast enough, but it won't. ~ You could probably use this to make a game, but It's kinda set so that the circle will always be the ground, so you can't add things for the block to stand on on whatever. ~ The smaller the planet, the faster the block seems to move, but that's just an illusion.