Question: MILESTONE 3 : UPPER SECOND CLASS ( 6 0 % + ) a . Rather than loading 4 cube models manually, use an array of

MILESTONE 3: UPPER SECOND CLASS (60%+)
a. Rather than loading 4 cube models manually, use an array of IModels to create and
store 12 cubemodels.
i. Using a loop and a random number generating function, create and place all 12
cubes at randompositions on the floor.
ii. Consider using C++'s rand() function.
iii. Does the scene look the same every time the game is executed? That is because
rand() is apseudo-random generator.
Note: checking for collisions between the sphere and 12 cubes will lead to a reduced FPS
rate, therefore it is recommended that you utilise variable timing when moving your sphere
from this point on.
b. Update your cube pickup code to use sphere-to-box collision detection to check for
contact between thesphere and the cubes. Remember all the cubes are axis-aligned.
Also remember that for every 4 cubespicked up, the sphere should be scaled to 1.2
times its size.
c. When a player accumulates 120 points, the game should enter a GameWon state. In
the GameWonstate:
i. The sphere should not be able to move.
ii. A congratulatory message should be displayed at the centre of the game
window.
d. The game should now have 4 states: Playing, Paused, GameWon and GameOver.
You may also want to display an appropriate message in the GameOver state, while
keeping the player fixed, instead of just stoping the game.
 MILESTONE 3: UPPER SECOND CLASS (60%+) a. Rather than loading 4

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To achieve the tasks outlined in Milestone 3 follow these steps a Cube Model Creation and Placement Create an Array of Cube Models Define an array to ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!