Virtual Reality Fundamentals
Game Objects
Because games are written within an object oriented framework it is fair to
say that everything in a game is an object. By this we mean that the game
world is composed of discrete entities, things that have a name, an appearance,
a set of behaviours, and so forth. Objects may be composed of other objects
either by attachment or containment. They may have visible attributes such
as location, orientation, and colour, and hidden attributes like age, buoyancy,
and hardness. Together these provide all those properties we might normally
ascribe to everyday things when talking about the real world.
Object Methods
So, our set of objects forms a model of a world. It can have trees, cars, build-
ings, animals, and people. Each may be created or destroyed, moved around, or
otherwise interacted with. Interactions take place through a system of
methods
.
Each object has a set of methods to provides its outward behaviour, whether
it can roll, break, float or sink, catch fire, be used as a vehicle, and so on.
Methods may also modify hidden attributes, such as damaging or repairing an
object. Objects may act on each other by performing an
action
. When a user
performs an action he or she interacts with an object and a method is invoked.
Often it sets in motion calculations which then modify the visual appearance
and hidden properties. For the visual domain, this activates computations in
the graphics engine, so objects may be seen to spin around, shatter, or bounce.
Object Views
Computer graphics have dominated games for almost two decades. Huge im-
provements have been made in creating photorealistic renditions of objects. I
will say little about this here other than to explain the general idea as far
as necessary to talk about sound. Each object with a physical appearance
has a
mesh
, a simplified three-dimensional structure that describes its outer
boundary. This can be interpolated to give apparent smoothness or deformed
to change the object during collisions or animated movement. The mesh only
describes the shape of the object; to give it visual substance it must be covered
in
textures
. These provide the exterior colours and patterns such as brickwork
patterns for a wall or the scales of a dinosaur skin. To create a view of the
world and the objects it contains two further pieces are needed. The first is a
viewpoint
or
camera
which acts as the eyes of the observer. The second is a
Do'stlaringiz bilan baham: |