Gamemaker
=========
Welcome To Chapter 1! In This Article, These Things Will Be Explained:
Simple And Advanced Mode
Sprites
Sounds
Backgrounds
Paths
Scripts
Fonts
Time Lines
Objects
Rooms
GM Paint Program
Sndrec
Making An Application
Basic GML
Misc
Simple And Advanced Mode
------------------------
Gamemaker Comes In Four Modes, Lite-Simple, Lite-Advanced, Pro-Simple And Pro-Advanced. Simple Mode Is Usually Used For Those Who Are New To GM While Advanced Is Used For The More Experienced. Pro Is For The Experts And Comes At The Cost Of $20.00
Sprites
-------
These Are What You're Game Relies On For Graphics. Without Them, The Room Is Blank.
Sounds
------
What's A Game Without Sounds? Get Some Nice BGM (Background Music), Or Some Jumpy SE (Sound Effects)
Backgrounds
-----------
In <[(PRO ALERT!!)]>FPS's (First Person Shooters)<[(PRO ALERT OVER!)]> Backgrounds Are Used As Textures, In 2-D Games, The Ones My Tutorials Will Be Explaining, They Are Used As Some Nice Back-Graphics (Below The Game Graphics) And Can Be Used As Foregrounds (In Front Of The Game Graphics)
Paths (Advanced Mode)
---------------------
I Prefer Time Lines To Move Things But Paths Make Objects Move (Unreliable Though...)
Scripts (Advanced Mode)
-----------------------
Using GML, You Can Extend The Possibilities Of You're Game Creation Career!
Fonts (Advanced Mode)
---------------------
Create Fonts And Customise Their Size, Font Type And Amount Of Characters, You Can Change The Font Color In The Set Color Event In The Draw Actions.
Time Lines (Advanced Mode)
--------------------------
I Use These Instead Of Paths Because They Are Easier To Use, Select How Many 'Step' And Put In Some Actions.
Objects
-------
These Are The Things That Rely On Sprites And Are Placed In The Rooms
Rooms
-----
Make You're Levels Here.
GM Paint Program
----------------
The Paint System Gm Uses Is Alot More Flexible Than Paint. Under The Image Tab, You Can Fill It With A Gradient, Colorize It And More. It Also Has The Same Features As Paint. I Strongly Reccomend It.
Sndrec
------
GM Comes With Sndrec, I Strongly Reccomend This To Record Sounds.
Making An Application
---------------------
Here, We Will Make A Simple Game.
Let us first make the sprites. From the Resources menu select Create Sprite (you can also use the appropriate button on the toolbar). A form will open. In the Name field type “wall”. Select the Load Sprite button and choose an appropriate image. That is all, and you can close the form. In the same way, create a ball sprite.
Next, we make the sound. From the Resoources menu select Create Sound. A different form opens. Give the sound a name and choose Load Sound . Pick something appropriate and check whether it is indeed a nice sound by pressing the play button. If you are satisfied, close the form.
The next step is to create the two objects. Let us first make the wall object. Again from the Resources menu choose Create Object. A form will open that looks quite a bit more complex than the ones we have seen so far. At the left there is some global information about the object. Give the object an appropriate name, and from the drop down menu pick the correct wall sprite. Because a wall is solid, you should check the box labeled Solid. That is all for the moment. Again create a new object, name it ball, and give it the ball sprite. We don't make the ball solid. For the ball, we need to define some behavior. In the middle you see an empty list of events. Below it there is a button labeled Add Event. Press it and you will see all possible events. Select the Create event. This is now added to the list of events. At the far right you see all the possible actions in a number of groups. From the move group choose the action with the 8 red arrows and drag it to the action list in the middle. This action will make the object move in a particular direction. Once you drop it in the action list, a dialog pops up in which you can indicate the direction of motion. Select all 8 arrows to choose a random direction. You can leave the speed as 8. Now close the dialog. So now the ball will start moving at the moment it is created. Secondly, we have to define what should happen in the case of a collision event with the wall. Again, press Add Event. Click on the button for collision events and in the drop down menu select the wall object. For this event we need the bounce action. (You can see what each action does by holding the mouse cursor still above it.) Finally, we need to define what to do when the user presses the left mouse button on the ball. Add the corresponding event and select the left mouse button from the pop-up menu. For this event we need a few actions: one to play a sound (can be found in the group of main1 actions) and one to change the score (in the group score) and two more to let the ball jump to a new random position and moving in a new direction (in the same way as in the creation event). For the sound action, select the correct sound. For the score action, type in a value of 1 and check the Relative box. This means that 1 is added to the current score. (If you make a mistake you can double click the action to change its settings.)
Our objects are now ready. What remains is to define the room. Create a new room in the game, again from the Resources menu. At the right you see the empty room. At the left you find some tabs, one for setting the background, one for setting some global properties like the width and height of the room, and one where you can add instances to the room. At the bottom you can select an object in the pop-up menu. By clicking in the room you can place instances of that object there. You can remove instances using the right mouse button. Create a nice boundary around the room using the wall object. Finally, place 1 or 2 ball objects in the room. Our game is ready.
Now it is time to test our game. Press the Run button (the green triangle on the button bar at the top of the window) and see what happens. If you made no mistakes, the ball starts moving around. Try clicking on it with the mouse and see what happens. You can stop the game by pressing the <Esc> key. You can now make further changes.
(Taken From The Table Of Contents)
Basic GML
---------
GML Is A Programming Language Used In The Creation Of More Advanced Games. Staements Are Put Inbetween { And } Symbols. For Example, If I Did
{
instance_create(x here,y here,objectnamehere);
}
It Will Create Whatever Object I Specified, I Could Also Modify It To Do This:
{
repeat(2) instance_create(x here,y here,objectnamehere);
}
The Repeat Statement Will Repeat The Following Code However Many Times It Is Put In The ( And ). I Could Make It Repeat Three Times By Going: repeat (3). You Should Also Know How To Comment You're Work, This Is Very Useful For Leaving Tags That You Can Reflect To Later Or If You Have Made An Engine Or Something, To Make The User Understand It. To Comment, There Are Two Ways You Can Do //Comment Here Or [gml]/*Comment Here*/[gml].
Note:GML Will Be Explained In More Depth In Chapter 4B
Misc
----
Game Information
----------------
You Can't Just Expect The Player To Understand You're Game Instantly, Thats Why GM Has It's Own Built-In Game Information System Wich Allows You To Make Game Information. It Is Found Under The Rooms Folder. This Is Alot Like A Miniature Word Application, You Can Select The Font Size Underline, Bold, Italic Even Color! You Can Also Select A Background Color For The Game Info, And Select Other Settings.
.
Users logged in:
Comments
Loading comments...