Sprite/Object Interaction




Game Maker's School


Lesson 1
In this lesson, we will be discussing sprite/object interaction. I know this sounds crazy for lesson 1, but it's not. First you must know that a sprite is an image. The image could be anything from a character, to a wall, to a bush. An object is the host of the sprite, and an object runs the given commands. Big words aren't scary so just take a breath and keep on reading!

The tutorials presented to you will eventually create a game for you, so just follow the steps and soon you will have an RPG (Role Playing Game). Once you've done that, then you will be ready to break off on your own.

- Your humble servant, AIDestroyer (AID)
Head of Games Dept.




Figure 1-1First, open Game Maker 7 to a new file. You will se the basic layout (See image 1.1). On the left side of the window is the file manager, where the majority of the work will be done. Above that is the tool bar. This includes buttons such as, create sprite, object, ect, Play, Save, Open, ect. In the center is the work plain. This is where you will do the work.

Go to the tool bar and click the button that says "Create a Sprite" and has a picture of a red Pacman. A box should apear that says Sprite Properties. You should also see a black that says "Name:" and is followed by a blank. Enter the name "Player1" into the box. Later when we asign this sprite to an object, we will locate it by the name.

Now press "edit sprite" in the sprite properties window. A new box called "Sprite Editor" will open and in it you will see a green square labeled "image 0". Double click this box. The sprite editor changes into an image editor. You will se many colors to use, tools, and options at the top. I would sugest that you make the window full screen by clicking the window button by the "X". Now use the zoom tool found to the left to zoom in on the image map.



Figure 1-1Now is your time to free draw a main character, but be sure to follow the following guidlines. #1 - Be sure the character is centered. #2 - Leave enough room on both sides to draw a sword in later (swinging straight out). #3 - Do not change the image size. #4 - No poses. leave arms at his/her sides and have him looking past the screen. (at you). (See fig. 1.2)

When you are done, simply "X out" of the editor and you will be returned to the page with the little green square you clicked on earlier. Now inside of the square, you will see the image you made. "X" out of that menu until you return to the box that you named the sprite. You will see the image to the right side of the box. You will notice that there is a small grey box around the character. This is the collision box, which we will discuss in a later tutorial. Now look to the left at the file manager. Under the sprites folder, you will se a sprite titled "Player1" and you will see the image you created, but the green color is gone! This is because the green was in the bottem left corner. What ever color occupies this space will becom invisible, so never add part of the sprite to this corner.

"X" out of the sprite menu and go to the toolbar button that says "Create an Object" and has an image of a blue sphere. When you click it, a box called "Object Properties" will apear. In the name blanck, title it "Player1" like the sprite. Bellow the name black is a blank that says Sprite. To the right of the part saying " is a little menu button. Click it and select Player1. Now the sprite "Player1" is used by object "Player1". Finally, check the box by the word "Solid" beneath the sprite selection menu. Now the object is solid. With that you have have finished Tutorial One. If you were to tun the game, it would not work as we have not placed the object in a room yet. This will be discussed in Tutorial 2. If you are sad that it still does nothing after all this work, don't be. You just finished the most basic step in game development, and now you are ready for 1000s of sprites (Good luck finding the time!). Soon you will have your own RPG so dont give up on the vocabulary! It is easier then you think so Good Luck, and Happy Gaming!

- Your humble servant, AIDestroyer (AID)
Head of Games Dept.