SCHOOL OF COMPUTING AND ENGINEERING SCIENCES
BACHELOR OF BUSINESS INFORMATION TECHNOLOGY
BBT 4106: SPECIAL TOPICS 1 - GAME PROGRAMMING
END OF SEMESTER EXAM
Date: 4th August 2022 Time: 2 Hours
This Examination consists of FIVE questions
Answer Question ONE (COMPULSORY) and any other TWO questions.
Use the Attached Case Study on Hardknocks game to answer ALL questions.
Question 1 [30 marks]
a. Discuss the genre and objective of the Hardknocks game. (4 marks)
b. Factoring in all the objects in this game, draw a sketch on the aerial view of the Hardknock scene.
(6
marks)
c. Assuming the entry point to the next level is a trigger zone, write a C# code snippet that emits the
confetti particles on progressing to the next level. (4 marks)
d. Discuss how closure as a game defining characteristic has been achieved in the Hardknocks game.
(3 marks)
e. Discuss two game design and two scene design principles have been achieved in Hardknocks game
that may impact on the player’s fun experience? (6 marks)
f. The deduction of a life is a rule that has been well elaborated in the Hardknocks game’s case study.
Design a rule mapping for this functionality, considering all the scenarios captured in the case.
(7 marks)
Page 1 of 3
Question 2 [15 marks]
a. It is noticed that when the Hardknocks game starts, one floating book object falls and bounces
off the ground indefinitely; instead of remaining suspended as described in the case. Describe the
steps you would take to make sure the book object remains suspended. (5 marks)
b. Two events in the Hardknocks game may make a book disappear. First is contact of the book with
the player object and second is when time elapses (assume 10 seconds). Write a C# script that
uses captures these two events to make the book object disappear. (10 marks)
Question 3 [15 marks]
a. The floor of Hardknocks game is said to be slippering while the wall is said to have a themed
wallpaper. Give a detailed description of how you would reduce the slipperiness of the floor and
how the wallpaper may have been applied to the wall. (5 marks)
b. On completion of a level, celebration voices are sounded and the scene switches to another level.
Write a C# code snippet for implementing these functionalities assuming that the new level has a
trigger zone. (10 marks)
Question 4 [15 marks]
a. The developer of Hardknocks notices that what they see in scene view is not similar to that in
game view as all he can see in the game view is the sky/horizon. Additionally, the Student game
object appears as a shadow in scene view and invisible in the game view. Explain simple Unity 3D
fixes for these errors. (5marks)
b. Assuming that the completion of a level in the Hardknocks game is controlled by a Boolean
variable name isComplete, write a C# that dulls or brightens the light intensity dims and changes
the lighting color based on the completion status of the player. (10 marks)
Question 5 [15 marks]
a. The Hardknocks implements both the concept of parenting a camera and the Camera Follow
functionality. Describe how both can be achieved with respect to Unity 3D. (5 marks)
b. It is indicated that the Student in the Hardknocks game is an animated humanoid. Write a C#
script that does the following:
On pressing a button, the primary camera is enabled and the Student moves forward.
On releasing a button, the side camera is enabled and Student moves sideways. (10 marks)
Page 2 of 3
HARDKNOCKS
Hardknocks is a game that mimics a high-end high school situation within the country. The player
object in this game is a student (animated humanoid) gone rogue. By the end of the game the
student should have been straightened out, either academically or with regards to their extra-
curricular activities. To this respect the game starts by first offering the student exercises. This is
designed through placing the student in a school building with floating book objects along the
school corridors signifying different assignments. The primary camera is parented to the player
object while other cameras exist in the different classrooms, and only follow the player when they
enter the respective classrooms. The corridors floors are smooth and sometimes slippering, while
the walls are covered with educational wallpapers.
On contact with the book objects, the book object disappears and an assignment in a text format
appears on the screen for the student to attempt. Time spans are located to each book object within
which the student should attempt the assignment. This goes on and on until all assignments are
complete and passed. The time span between each varies from the very start of the game, with
assignments sometimes becoming difficult on a short notice. The progress and aggregate for the
assignments done are well given for the player to see on their screen as the game progresses. Other
than activities that concern the player, other students can be seen entering and leaving the
classroom, with the teacher on duty giving orders.
Failure to meet the pass mark of all assignments attempted results into an extension but with a life
lost, yet with an easier assignment administered to the student. Should the student pass, they are
“graduated” into the next level which constitutes the next class or perhaps college level. In the
event that a student fails to attempt the assignment either because of an expired time span or
deliberately, a life is deducted, and a punishment given where the student is given “detention”.
Detention constitutes sitting in a room with a boring teacher and studying for the missed tests or
engaging in a compulsory extra-curricular activity.
Extra-curricular activities for detained students only includes running athletics as the school is
short of such. Excelling in the extra-curricular sport might exempt the student from doing the
required exam and land them a scholarship position in the next class or perhaps college. Failure to
excel to in the sporting activity results into more detention, loss of a life and redoing the missed
assignment. On completion of a class level confetti and celebration voices appear on the screen to
congratulation the player. Otherwise, the lighting of the game becomes red and dull with a message
“Try Again!” popping up.
Page 3 of 3