Game Development Reference
In-Depth Information
4. Sound Effects. We have swapped these for more appropriate ones.
5. View. The size of the main view into the room has been expanded from 512x300 pixels
up to 1024x600. The size of the port on the screen remains at 1024x600, so this means
our view is no longer being scaled up as it is drawn to the screen. We scaled up the
view in Zool because the sprites were so small, but we don't need to scale up Shadows
on Deck because the sprites and view are much larger to begin with.
6. Grid. As a result of scaling up the view, we're also going to scale up the grid size. So all
the basic collision objects (platforms, slopes, and so forth) that were 16x16 pixels are
now 32x32 pixels. Our Room Editor is now also set up to use a 32x32 grid, accordingly.
So how does the game play after these quick modifications? Well, the level design is clearly
no longer appropriate for a character Flynn's size, but it does actually help us identify (and fix)
some initial problems. If you try and make your way toward the right side of the room (the long
way around), then you should find that you can jump and climb your way across most of the
landscape fairly well. Clearly, there are some adjustments we need to make for climbing walls,
and the sliding animation doesn't work particularly well for Flynn, either. Nonetheless, it's
certainly a good basis for developing Flynn's movement mechanic. Unfortunately, once you
eventually make it to the collection of ledges on the far right of the room, you are likely to
encounter a serious problem (see Figure 11-7).
Figure 11-7 . Flynn can't move into contact with the ground because of ledges going through his body
It's not difficult to get completely stuck amongst either set of ledges, as there is a
fundamental problem with using such a relative giant under our existing “engine”. The
problem is that many of our collision events use the move_to_contact_with scr i pt to pl a ce the
character on the surface of the landscape. This script works by moving the object one pixel at a
time until it collides with something solid, but it doesn't account for the possibility that the
object is already in contact with something solid, because it has a ledge through the middle of it!
(See Figure 11-7). In these situations, the move_to_contact_with script does absolutely nothing,
and so the character ends up being stuck, unable to make contact with the ground.
This is a similar problem to the “The Ninja Elbow Walk” issue from earlier: it's just that our
new character is so much bigger. We solved that problem by inventing a new script called
check_standing_on that performed collision checks in a small area beneath the character's
bounding box. We can partly solve this problem by expanding upon that with a new version of
move_to_contact_with that only checks for collisions beneath the character's bounding box in
exactly the same way.
 
Search WWH ::




Custom Search