Game Development Reference
In-Depth Information
Empowering Up
So we need to provide Zool with an empowering movement mechanic that makes it easy to
fluidly navigate the landscape of the level. We'll aim to make movement as unchallenging as
possible, as the game's real challenge will come from the mobile enemies and platforms that we
will add in the next chapter. That way, the player should feel appropriately empowered, but still
get an enjoyable challenge from playing the game.
The main problem with Zool's movement at the moment is that every time he bumps into
anything mid-jump, he comes to a dead stop and falls to the ground (see Figure 4-3, left).
Figure 4-3. Zool's jumping mechanic as it is (left) and as we would like it to be (right)
Even landing back on the ground after a running jump awkwardly breaks Zool's stride by
bringing him to a stop for an instant. This is pretty unusual for platform game characters and it's
easy to see why. The more common approach is to get the character to slide against solid objects,
continuing to move in whatever direction of movement is not blocked. The red arrow in the right
panel of Figure 4-3 shows a basic sliding effect, but we'd like to go one stage further for our game,
as indicated by the yellow arrow. More about how to achieve that later, but we'll start by
implementing the basic (red arrow) form of wall sliding.
Making the Zool Air State Object Slide Against Solid Objects
1.
We're continuing from where we left off in the last chapter, so either reopen your saved
file, or start from zool2.gmk in the Chapter04/Games directory on the CD.
Reopen obj_zool_air and select the Collision event with obj_solid . Select the Move
Fixed action that stops Zool moving and delete it.
2.
3.
Include a Check Object action ( control tab) at the end of the list to check for Object
obj_solid at a position of X = x , Y = yprevious+vspeed .
 
Search WWH ::




Custom Search