Game Development Reference
In-Depth Information
Figure 2. Player interface
Figure 3. Player 2 white cue ball direction
Game Interface Development
For the user interface, functions were de-
veloped which interact with the computer
accessories(mouse, keyboard). The interface indi-
cates the state of the game every time (Figure 2).
The mouse becomes an important peripheral
to control the direction that the white cue ball will
take (Figure 3). The two parallel lines represent
the direction of the ball; the color indicates which
player to play (player 1: blue line, player 2: red
line) and the line within represents the force ap-
plied to the ball. It is also available to the players
a summary of the keys and correspondent actions
that can be taken.
During the development of the game, several
problems were solved with varying difficulty,
however the problem related to the holes in the
table. In the game, the boundary zones were
considered straight and not round. To detect
whether a ball was inserted into a hole, a function
was defined and the help of a sphere to determines
whether the ball has or not pass its limit. If the
limits were passed through, indicates that the ball
was inserted. In Figure 4 the function and the
spheres were represented.
Rules
The developed game supports two players, and
first to play can choose the color. The game be-
gins with seven red and seven yellow balls in the
table. The number of balls will diminish as they
are inserted or increasing (up to a maximum of
seven) when a fault is committed. On each turn,
it is determined if the player continues to play or
changes. For this, a set of rules were defined, like
the color of the first ball that contact the white cue
ball, if it was inserted a ball of the other player, if
the white cue ball did not touch any other ball in
the table. The application of the rules must fol-
low a certain order. To know: if the white cue ball
does not touch any other ball or, after assigned a
color to each player, a player hit a ball of differ-
ent color, a new ball must be inserted in the table
(maximum of seven for each of the two colors)
and the player looses the turn. If the white cue
ball hits the right player' ball, but no ball enters
or a different one enters, the player looses the
turn. At this time if the white cue ball enters, a
new ball must be inserted in the table, the player
looses the turn and the white cue ball returns to
the initial point. If the player chooses the right ball
and inserts the right ball, he continues to play. All
these conditions are tested through variables and
then the rules applied.
Tests and Results Analysis
The students' perspectives were reached. This
work was very interesting in the student point of
view, since it provides the possibility by a real
Search Nedrilad ::




Custom Search