1/25
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What is a canvas
A part of a display on which a gam runs
What is a screen
A large grid of pixels. Each pixel has a unique x and y coordinate
How do we give an illusion that an actor is moving fast
By increasing the canvas frequency and changing the x and y coordinates rapidly we can give the illusion of moving actors
getWidth() and getHeight()
To give us the full width and height of the canvas
getX()
To give the exact position of an actor
What does method do
A set of instructions an object has to follow
Constructor
Gives initial values for new object created
Getter
Is a method that allows you to access information on a field in a class
Setter
Changes a fields value
Helper
Supports all the other methods by breaking them into smaller parts
What is a class
A blueprint for creating an object, defining the field and method of each object
Field
A variable found in a class that contains values. Such as as: colour, number, size etc.
Object
A thing in code that contains a method and field
Comment (types)
Used to explain code, but is ignored by the computer.
// single line comment
/*
disfjosdif
*/
Vairable
A component that stores information that can change throughout the duration of the component
Data types
int, boolean, float, and doable
addObjects()
Adds objects to the world
getRandomNumber(x)
A method used to get a random number
What is a loop
To repeat code several times. Although undesirable in code it is essential when gaming
IDE
Intergrated Development Environment
API
Application Programme Interface
What is greenfoot
A gaming engine that allows you to create 2D animation through Java code
Import
Used to import additional code from libraries
Semicolons
Used to end code, to show the computer the instruction is complete
Curly brackets
To group code
If statement
Allows the program to make decisions