Game Development Reference
In-Depth Information
should be a simple ramp, which will create a nice movement when characters move
up and down stairs. The second collision hull for the stairway will look like stairs,
although perhaps a very low polygon version of them for efficiency. Using this sec-
ond collision hull, normal objects will roll and bounce, instead of sliding. Using two
hulls for stairways is a good economical trick to make your game look good for char-
acters and objects.
Get Character Movement Done Early
Your character movement really is at the heart of your game, if you think about
it. You should therefore make sure that your character movement system is
scheduled extremely early in development before the level geometry is built.
Then designers will be able to test everything against a completely final
character movement system. Wait too long, and the designers will have to
guess how high your character can jump or what slopes it can climb. Believe
me, you don
'
t want them to guess on stuff like that.
I like running through doorways in games, which is probably why I get fragged a lot.
Your artists probably don
s hard to
walk through by making it too small or by having odd door jamb geometry. Doors
should be a little bigger than you experience every day. This helps the player have
some leeway on either side when walking through. If the character is running all
the time, you ' ll want even more slop in the door size, or the collision hull will get
caught on the sides too easily. Rebounding is a possible solution, but if the door is
too small, you
'
t know this, but it
'
s easy to create a door that
'
ll just hit the other side and come to a complete halt.
Vegetation, especially trees, should have collision geometry for the big woody parts
like the trunk, but be sure to leave it completely off the foliage. These objects are
usually part of the physics simulation as static objects, and as such, they won
'
t
move even if they are hit by a huge force. This includes landing a 1969 Buick in the
canopy of something as wispy as an ornamental pear tree. Basically, any object stuck
in a tree in your game will likely look a little stupid or be annoying.
'
Using a Collision System
Any collision system worth its salt should be able to do a few basic things: report colli-
sion events, perform raycasts and shapecasts, and handle phantom objects. Collision
events have more than just a location and two objects, and this extra information will
help you spawn some important game logic changes or game view changes. Raycasting
and shapecasting are important for a number of reasons, some of which will become
apparent shortly. Phantom volumes that can detect entry and exit events, sometimes
called triggers, are usually simple enough to be handled with your own code, unless
 
 
Search WWH ::




Custom Search