-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating

GameMaker Cookbook
By :

Gravity can be a harsh mistress; if you've ever fallen from a height, you know what I mean. I often think it would be great if we could somehow lessen gravity's hold on us, but then I wonder what it would be like if we could just reverse it all together! Imagine flipping a switch and then walking on the ceiling! I, for one, think that it would be great. However, since we don't have the technology to do it in real life, I'll have to settle for doing it in video games.
For this recipe, let's simplify things and use the physics environment that we created in the previous recipe.
obj_control
, open the code block in the Create event.physics_world_gravity(0, -10);
That's it! Test the environment and see what happens when you create your physics objects.
GameMaker's physics world gravity is vector-based. This means that you simply need to change the values of x and y in order to change...
Change the font size
Change margin width
Change background colour