First of all, most objects need some image to make them visible on the screen. Such images are called sprites. A sprite is often not a single image but a set of images that are shown one after the other to create an animation. In this way it looks like the character walks, a ball rotates, a spaceship explodes, etc. During the game, the sprite for a particular object can change. (So the character can look different when it walks to the left or to the right.) You can create you own sprites in Game Maker or load them from files (e.g. animated GIF’s).
Certain things will happen to objects. Such happenings are called events. Objects can take certain actions when events happen. There are a large number of different events that can take place and a large number of different actions that you can let your objects take. For example, there is a creation event when the object gets created. (To be more precise, when an instance of an object gets created; there can be multiple instances of the same object.) For example, when a ball object gets created you can give it some motion action so that it starts moving. When two objects meet, you get a collision event. In such a case you can make the ball stop or reverse direction. You can also play a sound effect. To this end Game Maker lets you define sounds. When the player presses a key on the keyboard there is a keyboard event, and the object can take an appropriate action, like moving in the direction indicated. We hope you get the idea. For each object you design, you can indicate actions for various events; in this way defining the behavior of the object.
Once you have defined your objects it is time to define the rooms in which they will live. Rooms can be used for levels in your game or to check out different places. There are actions to move from one room to another. Rooms, first of all, have a background. This can be a simple color or an image. Such background images can be created in Game Maker or you can load them from files. (The background can do a lot of things but for the time being, just consider it as something that makes the rooms look nice.) Next, you can place the objects in the room. You can place multiple instances of the same object in a room. So, for example, you need to define just one wall object and can use it at many places. Also you can have multiple instances of the same monster objects, as long as they have the same behavior.
Now you are ready to run the game. The first room will be shown and objects will come to life because of the actions in their creation events. They will start reacting to each other due to actions in collision events and they can react to the player using the actions in keyboard or mouse events.
So in summary, the following things (often called resources) play a crucial role:
Converted from CHM to HTML with chm2web Pro 2.85 (unicode) |