Introduction to Computer Programming (WCOM115)
Unit Name: Introduction to Computer Programming Unit Code: WCOM115
Assessment Task: Assignment 2 (Clumsy Ramsy in a cave) Term & Year: T4, 2018
Total # Pages: 10 Total Marks: 100 Weighting: 20%
Check point Due Week 6, Monday ( 3 / 9 / 2018 ), 23:55 (11:55 PM)
Final submission Due: Week 6, Wednesday ( 5 / 9 / 2018 ) 23:55 (11:55 PM)
Write a Processing program that meets the following requirements. Sample output on
Task A (20 marks)
1. A window of size 800 X 400.
2. The background colour outside the cave is black.
3. The background colour inside the cave is grey.
4. The upper and bottom edges of the cave consist of stones (30 X 30) rectangles, with
repeated colour pattern (dark red, dark green then dark blue).
5. When the program starts, there are two values the number of lives (starting with 3) and the
number of collected points (starts with zero). These two values should be displayed on the
top left corner of the window (outside the cave).
6. When the program runs, Clumsy Ramsy appears at the left of the bottom edge of the cave.
Clumsy Ramsy will continuously move to the right direction.
Note: To achieve this task, cave stones need to be drawn using a loop in a user-defined function with
inputs/parameters that should be called in draw function.
2 | Page
Task B (10 marks)
7. When SPACE key is pressed, Clumsy Ramsy should pause/stop moving. When SPACE key is
pressed again, Clumsy Ramsy should continue moving.
8. When Up key is pressed, Clumsy Ramsy will jump in one step to the upper edge/side of the
cave if he is on the bottom side; otherwise, nothing will happen.
9. When DOWN key is pressed, Clumsy Ramsy will jump in one step to the bottom edge/side of
the cave, if he is one the upper side; otherwise, nothing will happen.
3 | Page
Task C (15 marks)
10. There are two bombs on each edge of the cave. These bombs are rectangles 20X20 coloured
11. All the bombs get random horizontal positions each time the game starts or restarts.
Note: The positions of these bombs should be stored in array(s). Drawing these bombs should be
done in a user-created function(s) with inputs/parameters.
4 | Page
Task D (15 marks)
12. There are five golden coins that are randomly positioned on either edge of the cave. So, each
time the game starts or restarts, the five golden coins should be all randomly positioned on
ONE randomly selected edge.
Note: The positions of these coins should be stored in array(s). Drawing these coins should be done
in a user-defined function(s) with inputs/parameters.
5 | Page
Task E (20 marks)
13. When Clumsy Ramsy hits/collides with a coin, that coin should disappear (it means it is
collected). Collecting one coin should increase coin counter by 10 points.
14. When Clumsy Ramsy hits/collides with a bomb, the game should restart, and all the bombs
and coins will be randomly positioned. (So, it is something that should be avoided by jumping
to the other edge, is possible).
Note: collision with bombs or with golden coins should be done in a user-defined function
6 | Page
Task F (10 marks)
15. When Clumsy Ramsy hits/collide with a bomb, if there are enough coins, the number of coins
will decrease by 50 points; otherwise, Clumsy Ramsy will lose one life.
Task G (10 marks)
16. The game is over, when the number of lives is zero. A game over screen should appear (dark
blue background with coloured text of your preference) that summarises the number of lives
(should be zero) and the number of remaining coins.
Note: drawing game over screen should be done in a function.
7 | Page
NATURE OF THE TASK
This is an individual task.
This is NOT a hurdle assessment.
MATERIALS REQUIRED / SUGGESTED RESOURCES
Lectures week 1 to 5, Textbook chapters 1 to 10.
HOW TO PRESENT YOUR ASSIGNMENT
Write your assignment as a Processing source file with the name
Submit the source file StudentName_StudentID.pde on iLearn under Assignment 2
Submission (draft and final) as mentioned in the first page in assignment details.
Late submissions are possible and will be penalised at 20% of assignment total mark per day
up to 4 days (weekend inclusive).
If a student submits an assessment 5 or more days a after the due date without grounds for
special consideration (See Disruptions to` Studies Policy) a record or submission will be made
student will receive zero marks for the assessment task.
RETENTION OF RECORDS
Student are required to keep a copy of all items submitted or completed for the purpose of
assessment or evaluation until the end of the grade appeal period.
INFORMATION ABOUT HOW AND WHEN FEEDBACK WILL BE PROVIDED
Marks and feedback will be provided via iLearn.
Using the work or ideas of another person, whether intentionally or not, and presenting them
own without clear acknowledgement of the source is called Plagiarism.
Macquarie University promotes awareness of information ethics through its Academic
This means that:
• all academic work claimed as original must be the work of the person making the claim
• all academic collaborations of any kind must be acknowledged
• academic work must not be falsified in any way
• when the ideas of others are used, these ideas must be acknowledged appropriately.
All breaches of the Academic Honesty Policy are serious and penalties apply. Students should
8 | Page
aware that they may fail an assessment task, a unit or even be excluded from the University
for breaching the Academic Honesty Policy.
EXPECTATIONS OF STUDENTS
Students are responsible for their learning and are expected to:
• actively engage with assessment tasks, including carefully reading the guidance
provided, understanding criteria, spending sufficient time on the task and submitting
work on time; Read, reflect and act on feedback provided;
• Actively engage in activities designed to develop assessment literacy, including taking
the initiative where appropriate (e.g. seeking clarification or advice, negotiating
learning contracts, developing grading criteria and rubrics);
• Provide constructive feedback on assessment processes and tasks through student
feedback mechanisms (e.g. student surveys, suggestions for future offerings, student
representation on committees);
• Ensure that their work is their own; and
• Be familiar with University policy and faculty procedures and act in accordance with
those policy and procedures.
9 | Page
You will be assessed according to the criteria provided below.
Marking Criteria Mark
TOTAL TASK A 20
window size, Background outside the cave, background inside the cave 2
stones (30 X 30), with repeated colour pattern (red, green then blue) 4
Cave stones are created using loop(s) inside a created function 10
The correct number of lives and coins are displayed in the right corner 4
TOTAL TASK B 10
When SPACE key is pressed, Clumsy Ramsy will stop moving. With another SPACE pressed will
continue moving 2
When UP key is pressed Clumsy Ramsy jump to the upper edge of the cave 3
When DOWN key is pressed Clumsy Ramsy jump to the bottom edge of the cave 3
When UP or DOWN key is pressed otherwise, nothing will happen 2
TOTAL TASK C 15
two bombs on each edge of the cave. 3
The coordinates of these bombs are randomly selected. 5
The coordinates of these bombs are stored in arrays. Stones drawn in a user-defined function 7
TOTAL TASK D 15
five golden coins that randomly positioned on either side 2
The coordinates of these coins are randomly selected. 3
The edge of coins is randomly selected. 3
The coordinates of these coins are stored in array(s). Drawing golden coin should be done in a
user-defined function 7
TOTAL TASK E 20
When Clumsy Ramsy hits/collides with a bomb, the game restarts 5
When Clumsy Ramsy hits/collides with a coin, the coin disappears. 5
Collision is done in a function with parameters 10
TOTAL TASK F 10
When Clumsy Ramsy hits/collide with a bomb, if there are enough coins, the number of coins
will decrease by 50; otherwise, Clumsy Ramsy will lose one life. 10
TOTAL TASK G 10
Game over correctly appears, and it is done in a function. 10
10 | Page
**NOTE: a user-defined function is a function made by the programmer and it is not one of the
build-in function is processing such as setup(), draw(), muoseClicked(), keyPressed()…
• Up to 10 marks penalty will be applied if coding style is not good. This includes:
o Variable names
• 10 marks penalty will be applied if the submitted file does not have the correct name
• Any submission with compilation error(s) will not be marked. It is the responsibility of
students to ensure that the uploaded code has zero syntax error is your