SC443:
Computer Game Programming
Assignment
#4: Go Cart Collision
The purpose of this assignment is to test
our knowledge on collision detection in games. In this assignment, a game
focused on collision detection is to be created. Using the wall and floor
created in the previous assignments, a sphere is created and used as the ggo-carth.
The purpose of this game is to score the
highest possible points. Points are scored by crashing the cart against the
wall. Each crash against the wall will give you 10 points. The game ends when
the time limit reaches zero.
As
you can see, the score and time limit is given on the ggo-carth.
Navigation buttons are supposed to be
provided in this assignment, however, it has already
been incorporated in the previous assignment, so the key navigations are still
the same.
New buttons have been added to move the
go-cart. The buttons eIf and eKf increases the speed of the ball along 1 axis,
while the buttons eJf and eLf increases it along the other axis. A friction
factor has been added in this programme, causing the speed of the cart to drop
after each bounce. Hence, you cannot simply just start the ball moving and
expect to score high points. At the end of the game, pressing the eRf button
will reset the game. Pressing any of the speed buttons will start the game.
The code and executable for this
assignment can be found here.