Game Development Reference
In-Depth Information
Start with:
Reference/Framework/bouncing3.gmk
Creating a Custom Mouse Cursor
1.
A mouse pointer uses a single pixel within its image as the tip with which you click
things. The tip can be set using the origin. We've used a tiny sword as our mouse
pointer: open
spr_mouse
and set the sprite's
Origin
's
X
to
15
and
Y
to
1
(the sharp tip of
the sword).
2.
Add an object and give it the name
obj_mouse
. Set the
Sprite
to
spr_mouse
and the
Depth
to
-1000
to make sure it is drawn in front of everything else.
3.
In the same object, add a
Step
,
Step
event and include the
Jump to Position
action.
Enter
mouse_x
for the
X
value and
mouse_y
for the
Y
value.
4.
Double-click on the
Global Game Settings
in the resource tree, select the
graphics
tab,
and switch off
Display the cursor
to hide the real mouse cursor.
Place an instance of
obj_mouse
anywhere in
room_first
. If you think the mouse moves
somewhat sluggish, try increasing the room's
Speed
to
60
.
5.
Result:
Reference/Result/mouse_cursor.gmk
■
Caution
It's not easy for game players to get accustomed to a mouse cursor that looks different from
what they are used to, so they may easily be annoyed by your choice. Only change the mouse cursor if it
makes sense within your game and make sure the player can easily guess where the tip would be.
Moving Through Rooms
No dungeon crawler or RPG can do without an extensive world. In Game Maker, we could make
one large room for this, but if the world becomes too big it may become too slow or too difficult
to organize. Instead, we will make a large area out of several rooms, and introduce a technique for
moving between the rooms where exiting one room will make you enter the next.
Start with:
Reference/Framework/explorer4.gmk
Before you do anything else,
make a map of how you want the game world to be
. It is going to
be vital once we get to the point of linking the rooms. It doesn't matter how you make your initial
map; you could draw it on a sheet of paper, draw it in your favorite drawing program, or by
stitching together the room screenshots. For our example game, in which the player must collect
amulets while avoiding enemies, we've done the latter.
Search WWH ::
Custom Search