Creating A Platformer in Game Maker: Foundations of Interactive Game Design Prof. Jim Whitehead February 7, 2007
Creating A Platformer in Game Maker: Foundations of Interactive Game Design Prof. Jim Whitehead February 7, 2007
Creative Commons
Attribution 2.5
creativecommons.org/licenses/by/2.5/
Gamelog
Still due Friday
Game of your choice
Collision Detection
Defined in object
Defined in object
Bounding Box
Visible sprite image
Bounding box
Game Maker selects this using the Automatic feature under Bounding Box in
the Sprite dialog
Example: if creating a bullet hell (manic) shmup, may want to make the
vulnerable region of the ship smaller than the visible sprite
Select Manual under Bounding Box in Sprite dialog, then fill in dimensions
If sprite is defined in 48x48 pixel box, Full image option would make bounding
box the full 48x48 pixels, even if sprite image is smaller
Bounding box
vspeed: 10
y: 105
y: 110
y: 110
y: 115
End of Tick 1
End of Tick 2
vspeed: 10
y: 105
vspeed: 10
y: 110
End of Tick 1
y: 105
y: 110
End of Tick 2
Set vspeed to 0
End of Tick 2
y: 100
vspeed: 20
y: 105
y: 110
y: 115
y: 110
y: 115
y: 120
vspeed: 20
y: 125
90o
180o
0o
270o
Gravity
Set speed to 2
Arbitrary value
This speed may vary with your gameworld, tune until it feels right
Jumping
Jumping behavior
Press a key, and player jumps up
Pressing key while in the air should not result in more jumping
Unless you intentionally want a double-jump, in which case you only want to
allow two, and only two jumps.
Not jumping
vspeed=0
gravity=0
Keypress
Jumping
vspeed > 0
gravity > 0
Variable: jumping
Value: 0
Applies to self
Variable: jumping
Value: 0
Operation: equal to
Means: group the following actions together until the end of block
That is, we have shifted to the jumping state in our simple state machine
Applies to self
Variable: jumping
Value: 1
Relative: unchecked
Applies to self
variable: jumping
value: 0
Gravity should cause player to fall, but gravity never has chance to affect position
Solid object behavior means collision event occurs before ball actually moved
Sets vspeed to 0
Cant distinguish between landing on platform, and jumping up into underside of platform