Vous êtes sur la page 1sur 33

Sajjad Hussain

Candidate No.
Centre No. 13230
Gaming Scenario

Controlled Assessment:
AQA Gaming Scenario
Name: Md Sajjad Hussain
Candidate Number: 2187
Centre Number:
13230

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario
Task No

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Task

Sub Task

Note/comments

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario
A

Read the scenario

Play game in partners

Read external file

Read and highlight question


Ask question for clarification
Play printed game
Summarise the task
Flowchart
Top down structure
Load list of 10 five letter words

Design Brief

1
2

Display the first grid with keywords

A Display in grid

Display 9 words in a 3x3 grid

Create a top down structure on mind


view
Mrs Shafi has external file

B - Randomize
3

Develop grid

Remove the first grid


Display second grid

Entering removed word

Repeat task 4 till the user matches the


removed word

User guesses substituted word

Repeat task 6 until user guesses correctly

Let the user guess the removed and


substituted word
Continue the program

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Position of word is random


Guessed correctly
Guessed incorrectly
Repeat 3 times
Guessed correctly
Guessed incorrectly
Repeat 3 times
Display the correct message
First grid is 3x3, now it will display a
4x4 grid

Remove first grid and display the second


grid
Program to allow user to guess the
removed word
Program to allow the user to guess until
they guess incorrectly 3 times or correct
the first time
Allow user to guess the substituted word
Allow user to guess until they guess
incorrectly three times or correct the first
time
Display you win or you lose if they
win/lose
Develop another program but containing
a 4x4 grid instead of 3x3.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Introduction: I have been asked to design an AQA Memory game which contains a 3
By 3 grid with two levels of difficulty (a 4 by 4 grid). This is to assess the players memory by presenting them 9 words to remember which is
usually shuffled to randomize the guesses. 16 words are used when on hard mode.
Design of solution
I used scratch instead of python because scratch allows users to express their coding language using images and colour. I used scratch because
its presents your ideas clearly and its much more formal in visual use than pythons plain text layout. I used scratch because it doesnt require
coding as its already coded and options are varied whereas in python its just type to text.
1.1Game outline
A grid consisting of a 3 by 3 grid is displayed to the player(s) in which one of the players will shuffle the objects that are used to play the game.
In the grid one of the word will be replaced with another new word. The user has to guess which word was extracted and replaced.
1.1.1The Grid
The words for the grid are imported from an external file. Then just display the words for 30 seconds for the user to memorise the position of the
grid and the objects that are there.
1.1.2Winning and losing
The position of all the words should be random. Develop a program that lets the user to enter the word that they think is the substituted word.
Give the player 3 chances to guess the substituted word. If they fail 3 times then the difficulty settings are reduced.
Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Solution development
I used scratch instead of python because scratch allows users to express their coding language using images and colour. I used scratch because
its presents your ideas clearly and its much more formal in visual use than pythons plain text layout. I used scratch because it doesnt require
coding as its already coded and options are varied whereas in python its just type to text.

Task 1

The first task was to


import the words that had
been given by our teacher.
The first grid must have
10 set of words and the
second set must have 17
set of words.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Code:

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Task 2

The 2nd task was to develop the part of


the program that shows 9 randomly
selected words from the list of 10 words.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario
Code;

Task 3

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

The third task was to program the game that


removes the 1st 9 words from the display to
display the second grid after. I programmed the
display to show for only 30 seconds and after
that the second grid will be displayed. Then I
programmed the display of the second grid to
be randomly shown to the user
Task 4

Code:

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

The fourth part of the program was


to develop the part where the user
matches the removed word and
sees if they guessed correctly or
not.
Task 5:
If the user guesses the removed word wrong
then you should reduce a life by 1. If they have
run out of all 3 lives then the game displays a
game over screen.

Code:

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

As you can see here, as the lives


decrease the game over screen is
displayed after all 3 lives are gone.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Task 6
The sixth part of the program
was to develop the part where
the user matches the
substitute word and sees if
they guessed correctly or not.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Code:

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Task 7
If the user guesses the substitute word wrong
then you should reduce a life by 1. If they have
run out of all 3 lives then the game displays a
game over screen.
Code:

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

As you can see here, as the lives


decrease the game over screen is
displayed after all 3 lives are gone.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Task 8

Code:

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

If the user gets both words correct, then


a congratulations screen will display

Task 9

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Programming techniques
Throughout my controlled assessment I have used a range of programming techniques
Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

External Data
The external data I was given was two separate lists of words that my teacher gave me. One
section contained 10 set of words which was imported into the easy selection of the AQA
Memory game. The second section contained 17 set of words which was imported into the hard
selection of the game.

Hard
mode

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Easy
mode

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Functions:
Custom blocks allow for one to make his or her own programming blocks. Using custom blocks,
large, similar scripts cane be combined into one reusable block. In some other programming
languages, custom blocks are called procedures, or methods.
Example of function

How I used it: In the example above, I linked the When I receive: Restart block to costume1
so that whenever you stop the game at any certain point, it will jump back to costume1 which
is the beginning of the script.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Motion:
Motion blocks is one of the ten selections of Scratch blocks. The blocks are colour-coded
medium blue and are used to control a sprites movement.
Example of Motion (Wasnt used in my work):

How I used it: I didnt include any motion blocks because they are mainly used for the movement
of a sprite or character which my script did not require.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Variable: In programming, a variable is a value that can change, depending on conditions or on


information passed to the program.
How I used it: In computer programming, a variable or scalar is a
storage location paired with an associated symbolic name (an
identifier), which contains some known or unknown quantity of
information referred to as a value.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Lists:
In computer science, a list or sequence is an abstract data type that represents an ordered
sequence of values, where the same value may occur more than once. An instance of a list is a
computer representation of the mathematical concept of a finite sequence; the (potentially)
infinite analog of a list is a stream.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

How I used it: The teacher gave us 2 sets of words, one with 10 words
and one with 17 words, 10 was implanted in scratch for the easy part
of the game and 17 for the hard part of the game.

Control command: Control blocks is one of the ten categories of Scratch blocks. They are colorcoded gold, and are used to control scripts. In Scratch 1.4 and earlier, this category also included
the blocks that are now Events Blocks. There is currently one Hat block, five C blocks, three Stack
blocks and two Cap blocks in this category.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

How I used it: I used command blocks to display the score of how many
times the player has guessed a word correctly

Broadcast: A broadcast is a message that is sent through the Scratch program, activating
receiving scripts. Broadcasts are sent with the blocks Broadcast () and Broadcast () and Wait, and
are received by the hat block When I Receive (). Broadcasts are useful in games and animations,
as they trigger specific scripts. They are similar to events, which are scripts triggered when certain
actions, like mouse moves or key presses, are performed.
Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

How I used it: I used a broadcast to show the player that


they are playing hard mode of the AQA Memory Game.

Loop: The Forever block is a Control block and a C block. Blocks held inside this block will be in a
loop just like the Repeat () block and the Repeat Until () block, except that the loop never ends
(unless the stop sign is clicked, the Stop All block is activated, or the stop script block is activated
within the loop). Due to this infinite loop, the block has no bump at the bottom; having a bump
would be pointless, as the blocks below it would never be activated.
Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

This block has a slight delay, so for optimum speed of execution, single frame block stacks should
be used.
How I used it: I used a forever loop to display the score forever
when playing the game.

Operator: Operators blocks is one of the ten categories of Scratch blocks. They are color-coded
light-green, and are used to script math equations and string handling. It was previously titled
Numbers Blocks, but was renamed in Scratch 1.4 due to new blocks that handled strings. There
Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

are currently six Boolean blocks and eleven Reporter blocks in this category. This and PicoBoard
Blocks are the only categories to contain no Stack blocks.
How I used it: I used an operator to pick a random selection of words
when the user is guessing the word that was taken out.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Data structure
Data type

What is it?
A particular kind of data
item, as defined by the
values it can take, the
programming language
used, or the operations
that can be performed on
it

Integer

a whole number

Boolean

a binary variable that can


have one of two possible
values, 0 (false) or 1
(true)

Arrays

an ordered arrangement,
in particular

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Where I used
it

Image

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario
Task number

Task

Sub task

Read external
file

Load a list of
10 five letter
words

Display the first


grid with
keywords

A Display in
grid
B - Randomize

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Test data

Expected
outcome

Words

Read easy
words

Norma
l

The words
are
displayed in
a grid

Norma
l

Randomize
grid and
words

Actual outcome

Types
of test

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario
If the words
are
randomised
and they
should get
replaced by
the
substituted
words

Replace first
grid with
second

Remove the
first grid
Display second
grid
Position of
word is random

Entering
removed word

Guessed
correctly
Guessed
incorrectly

The lives
and the
questions

Repeat until the


word is guessed
correctly

Repeat 3 times

Lives (3)

Continue the

First grid is

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

The game

The game
will display
grid 2 and
replace the
removed
word with
the
substitute
word after
30 seconds.
Game will
display the
what was
the removed
word
message.

Norma
l

In the game,
there will be
a 3 lives
icon.

Norma
l

The

Norma

Norma
l

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

program

3x3, now it will


display a 4x4
grid
Develop
another
program but
containing a
4x4 grid instead
of 3x3.

should
display the
question
and display
the amount
of lives
during the
game

question will
show up and
the lives will
decrease if
the question
is answered
wrong

Let the
user guess
the
substituted
word again

If wrong
3times,
display
game
over

Lives and
game
over

If wrong 3
times,
display the
game
over
screen

If the user
guesses
wrong then
display
incorrect, if
correct 3
times, display
you win
screen

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

If user
guesses
correct,
take
another
turn

Normal

normal

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario
9

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

normal

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Robustness and efficiency


For robustness I

For efficiency I used multiple features to make my work easier to use and work. I used a list to
compile all my words I used, this helped to make it easier to read and sort out, I also used arrays
to list the words down in a sequence and the commands. When I was creating multiple repeated
commands, I used a loop instead of repeating the commands to make my work neater and
conserve space.

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Sajjad Hussain
Candidate No.
Centre No. 13230
Gaming Scenario

Vous aimerez peut-être aussi