Recent Question/Assignment

Assignment 2 – Interactive Game
Due: Friday 17 May 2019 Individual assignment
For Assignment 2 you will be required to build an interactive game. The purpose of the assignment is to assess your ability to use arrays, objects, images, sounds, videos, etc. in JavaScript and p5.js.
There is some latitude in the design of the game however it must comply with the following requirements:
The game must draw shapes (2D or 3D) and images. More than one shape type must be used to draw the game, e.g. lines and ellipses. The game must also use and draw images and/or videos. The images and videos must be drawn at an appropriate size.
The game must support interaction with the user either via the mouse/trackpad/touch or keys (or both).
There must be some animation in the game. At least two objects must move in different directions. The animation may be at a fixed speed.
Collision Detection
The game must support some kind of collision detection, with a visible and/or audible result of collision. Collision may be with an object or with the edge of the canvas.
The game must have some kind of scoring system, e.g. counting clicks or collisions. The score must be displayed on the screen using text and a font different to the default font.
Colours and sounds
Custom colours should be used for all drawing, unless the default colours fit the colour scheme of the game. The game must use at least three audio files as well.

The game must include some randomness, such as random positioning of objects, or random colours.
Marking Scheme
Novice Competent Proficient
Array Points: Points: Points:
0 (0%) .5 (1.67%) 1 (3.33%)
Program uses an array to
manage a list of objects visible on the screen.
Drawing shapes Points: Points: Points:
0 (0%) .5 (1.67%) 1 (3.33%)
Game draws more than one type of shape
images and
videos Points: Points: Points:
0 (0%) .5 (1.67%) 1 (3.33%)
Game draws an image
and a video at an
inappropriate size. Game draws at least one image and one video at an appropriate size
Interactivity Points: Points: Points:
0 (0%) 1 (3.33%) 2 (6.67%)
Game supports interactivity
either by mouse or keys.
Mouse interaction must use at least two of mouseX, mouseY,
mouse button. Keyboard
interaction must use at least 3 keys.
Animation Points: Points: Points:
0 (0%) 1 (3.33%) 2 (6.67%)
Game must support some form
of animation, i.e. an object
moving across the screen or
changing size. Two objects
must animate independently.
Collision Detection Points: Points: Points:
0 (0%) 1.5 (5%) 3 (10%)
Game must support some form of collision detection. This may also be in the form of detecting whether the mouse has detect an object.
Scoring Points: Points: Points:
0 (0%) 1 (3.33%) 2 (6.67%)
Attempt to score but not working correctly The game must keep track of a score using a numeric variable. The highest must be stored in a file.
Text display Points: Points: Points:
0 (0%) .5 (1.67%) 1 (3.33%)
Only score is displayed
without label, or vice
versa The game must display the score using a non-standard font as well as some label text

Novice Competent Proficient
Randomness Points: Points: Points:
0 (0%) 1 (3.33%) 2 (6.67%)
Randomness attempted
but not working
correctly. The game must use
randomness in some way such as the positioning of objects,
the direction of animation,
colours, timing, etc.
Objects Points: Points: Points:
0 (0%) 1.5 (5%) 3 (10%)
The mage must use at least 2 objects.
Visual design Points: Points: Points:
0 (0%) 1 (3.33%) 2 (6.67%)
Rudimentary visuals
based solely on shape primitives and loaded whole images Game components
consisting of complex
shapes and/or dynamic image modifications, or
with modified overall
layout Consistently applied aesthetic using complex visual elements and appropriate usable layout
Originality in Game
Production Points: Points: Points:
0 (0%) 1 (5%) 3 (10%)
Replicates an existing game’s look and feel Predominantly remakes
an existing game but
with some new
components such as
modified visuals, screen layout, and scoring Exhibits original game
concepts or ways of playing, and with predominantly new visual elements
Originality in Game
Mechanics Points: Points: Points:
0 (0%) 1.5 (5%) 3 (10%)
Replicates the play
mechanics of existing games Introduces some
variations on existing
mechanics or an
unusual combination of existing mechanics Predominantly new form of
interactive behaviour or game response to user
Complexity Points: Points: Points:
0 (0%) 1.5 (5%) 3 (10%)
These marks are for the overall complexity of the game as judged by the marker.
Code neatness Points: Points: Points:
0 (0%) 0.5 (1.67%) 1 (3.33%)
Code is indented, well
named functions and variables, all functions, global variables,
objects, and algorithms
All of the assignment files must be zipped and uploaded to the portal through the assignment 2 submission link. The zipped folder, once decompressed, must run by opening the index.html file. Marks will be deducted if the unzipped project cannot be run successfully.

Looking for answers ?