Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Guide To Client Server Databases

Authors: Joe Salemi

2nd Edition

1562763105, 978-1562763107

More Books

Students also viewed these Databases questions

Question

Is SHRD compatible with individual career aspirations

Answered: 1 week ago