Game Development Reference
In-Depth Information
In this subsection, the body dynamics consid-
ered for the game simulation will be summarized.
It was considered that the billiard balls can be in
three states: stopped (initial and final positions),
sliding and running. The state sliding is assumed
as the moment when the ball initialized its move-
ment. This state will be short if the applied force
into the ball is high. The state running will be the
most common state when the ball is in motion. The
set of equations used were easily obtained (Danby,
1997; Newmann, Stoy, & Thompson, 1994;The
Physics Classroom (n.d.); The Math and Physics
of Billiards, n.d.). The physical equations used
describe the initial linear and angular velocities,
describing the first balls movement when the
cue touches the white cue ball. After that, the
balls can take several and different movements
and velocities. Knowing that, the velocity of a
ball decreases until stopped due to the frictional
force between the ball and green cloth (or felt) of
the table, the variation of the linear and angular
velocities must also be considered. Another aspect
that was taken into account was the possibility
of collision between the balls. It was considered
two types of collisions: between two balls and/or
between a ball and the walls of the table. To detect
a collision between two balls, the distance between
the two balls centers that can be at most equal to
the sum of two times its radius, is estimated. The
time to collide is also estimated and then the new
directions and velocities. This new calculus took
into account the normal and tangential velocity
components for each ball, being the new direction
the sum of these two components.
result (output), i.e. the new positions of the balls
on the table. The various factors adjacent to the
system are the movement of the balls, the friction
between the balls and the felt, the friction of the
ball when hit the table walls, the collision type, the
weight of the ball, the momentum of the cue ball,
gravity, among others. The friction coefficient and
the impetus time given by the cue to the ball were
approximately estimated due to the complexity to
determine exactly their values. Summarizing, (1)
the input parameters: balls position before making
the putt, force and direction applied to the white
cue ball; (2) adjacent factors: balls movement
kind, slide (friction coefficient with the felt=1),
rotate (friction coefficient with the felt=0.05), ball
hit the table walls (coefficient=0.1), ball weight
and diameters (0.5Kg and 57.15cm, respectively),
gravity (9.81m/s 2 ), time of momentum between
the ball and cue (0.005sec), collisions and linear
and angular velocities; (3) output parameters: new
balls positions on the table.
The application has a three dimensional represen-
tation, however, since the position of the camera,
that allows the visualization of the game, is a way
to visualize the top of the table, the application
looks to have only two dimensions (Figure 1). The
game has 16 balls placed at predetermined mark
on the table (1 white, 1 black, 7 red and 7 yellow).
Figure 1. Pool table and game balls just before
the break off
Game Input and Output Definition
The input parameters considered were the balls
positions before making the putt, the force applied
to the white cue ball and its related direction.
Thus, the player will be able to control these two
parameters each time he makes a shot. Then, due
to the various factors adjacent to the system and
game conditions, the balls stops producing the final
Search Nedrilad ::

Custom Search