Shared Flashcard Set

Details

Fundamentals of Games and Graphical Systems
University level.
169
Computer Science
Undergraduate 1
04/09/2017

Additional Computer Science Flashcards

 


 

Cards

Term
How is information stored in a bitmap image?
Definition
Information is stored as the colour of each pixel across a 2D grid.
Term
What is colour depth?
Definition
Colour depth is the number of bits per pixel. With more bits per pixel comes more varieties of and better quality of colour.
Term
What are the disadvantages to using a bitmap image?
Definition
Unless compressed, they have large file sizes.

They don't resize well, developing jagged edges to compensate.

Individual elements cannot be changed.
Term
What are the advantages to using a bitmap image?
Definition
They don't need much processing.

Image processing such as smudging, blurring, and sharpening can be done easily.
Term
In what format are vector images stored?
Definition
Vectors are stored as a collection of shapes, the mathematical rasterisation instructions for which are what allows the computer to recreate the image.
Term
What values need storing for a vector image?
Definition
The only things that need storing are the colour, position, and size of each shape in a vector image.
Term
What are the advantages to using a vector image?
Definition
They have a much smaller file size.

Each component can be selected, edited, and resized individually.
Term
What are the disadvantages to using a vector image?
Definition
Vectors must be processed before being displayed, either through scan conversion or rasterisation.

It's hard to exactly the right image without making the image too complex.
Term
What is the graphical pipeline?
Definition
The process that data and commands go through when being rendered.
Term
What are the steps within the graphical pipeline?
Definition
[image]
Term
What is primitive data?
Definition
Primitive data specifies "geometric primitives", like points, lines, triangles, and polygons.
Term
What is vertex data?
Definition
Vertex data contains untransformed model vertices.
Term
What does the tessellation stage stage of the graphical pipeline do?
Definition
Tessellation divides models into triangles.
Term
What does the vertex processing stage of the graphical pipeline do?
Definition
Vertex processing processes the attributes of a vertex like position, colour, texture, and even lighting.
Term
What does the geometry processing stage of the graphical pipeline do?
Definition
Geometry processing sees algorithms applied on the now processed/transformed vertices. One of the algorithms includes rasterisation, which takes the three points of a triangle, and their attributes, and passes them forward to the pixel processor. This applies different looks to the same mesh for a varied and natural result.
E.G. Grass
Term
What does the pixel processing stage of the graphical pipeline do?
Definition
Pixel processing adds richness, depth, and immersion to an image.
Term
What does the pixel rendering stage of the graphical pipeline do?
Definition
Pixel rendering determines what objects to show and hide.
E.G. Occlusion, Backface culling, L.O.D.
Term
What are the different types of transformations?
Definition
Translations, Scale, Rotate, Reflect, Shear
Term
What is occlusion?
Definition
In 3-D graphic design, occlusion is the effect of one object in a 3-D space blocking another object from view.
Term
What is back-face culling?
Definition
Back-face culling determines whether a polygon of a graphical object is visible. I.E. Building interiors. The process makes rendering objects quicker and more efficient by reducing the number of polygons for the program to draw.
Term
What are Graphical APIs?
Definition
A package of protocols (classes, functions, structures, etc) for graphical programming.
Term
What does a Graphical API do?
Definition
A Graphical API can perform common operations such as scan conversions, transformations, and 3D projection.
Term
What benefits does a Graphical API have for a programmer?
Definition
The programmer does not need to know the specifics of display hardware.
Term
How is colour perceived?
Definition
Colour is perceived as the reflections of white light. Visible light is part of the EM spectrum and is characterised by wavelength and intensity.
Term
How do the rods in our eyes work?
Definition
  • Rods are sensitive to light intensity, not colour
    I.E. Black and White
     
  • Sensitive to low light levels
    I.E. Night vision
     
  • Located at the edges of the retina.
    I.E. Peripheral
Term
How many types of cones are there in our eyes?
Definition

3 types.

  • Red sensitive 
  • Green sensitive 
  • Blue sensitive
Term
If all three cones are equally stimulated, what colour does light appear to be?
Definition
White.
Term
What model is used to demonstrate the human colour vision?
Definition
The RGB model. [image]
Term
What is the reverse model of the RGB model?
Definition
The CYMK model.
Term
What are the three different types of colour blindness?
Definition
Protanopia
Deuteranopia
Tritanopia
Term
What is an alternative solution to reducing the size of a colour palette?
Definition
Optimisation or reduction.
Term
What is dithering?
Definition
The approximation of a colour not on the current colour palette by combining pixels of two (or more) colours that are.
Term
What do the letters HSL stand for in the respective colour model?
Definition
Hue, saturation, and luminosity (brightness).
Term
What is the definition for brightness?
Definition
The intensity of the light.
Term
What is the definition for saturation?
Definition
How washed out the colour is.
Term
What is the dominant frequency?
Definition
The determinant for which colours are seen within visible light.
E.G. Visible light with yellow as the dominant frequency will appear yellow.
[image]
Were there to be no dominant frequency - no curve to the graph - the light would look white.
Term
How does the printing of colour work?
Definition
Using a subtractive process. If white light is reflected off of a cyan coloured ink, the reflection has no red component.
Term
How many frames per second should a game have to avoid jerky motion?
Definition
Above 15 fps.
Term
How many times per frame does the Game Loop iterate?
Definition
Once.
Term
What is the first step of the Game Loop?
Definition
Initialisation.
Term
What is involved in the initialisation stage of the Game Loop?
Definition
  • Setting up of the graphics display.
  • Initialisation of input and audio modules.
  • Setting up of network components.
  • Loading data from files (3D models, 2D sprites and textures, level detail).
  • Performance of initial calculations.
Term
What occurs in the input stage of the Game Loop?
Definition
  • Get the current state of the joystick or gamepad each frame.
  • Process user events in event queue. 
  • If there's no input this frame, continue with the rest of the loop.
Term
What occurs in the input stage of the Game Loop?
Definition
  • Update remotely controlled objects in multi-player games, from message received across network.
  • Animate all objects.
  • Apply artificial intelligence, such as pathfinding and behaviour.
  • Collision detection.
Term
What stage occurs after the Game Loop has exited?
Definition
The cleanup stage.
Term
What happens in the cleanup stage?
Definition
Memory and resources are released.
Term
What are the steps of the Game Loop?
Definition
[image]
Term
What is a Game Engine?
Definition
A Game Program Skeletor or API (Application Programming Interface). They may have modules to handle input, physics, animation, AI, graphics, rendering, sound, etc. They're often a by-product of game development, and as a result are licenced for use by other developers.
Term
Give an example of a games engine.
Definition
  • Unreal
  • Cry Engine
  • Torque
Term
What are the advantages to using a game engine?
Definition
  • Tried and tested technology.
  • Can be specialised for one type of game.
Term
What are the disadvantages to using a game engine?
Definition
  • A new interface must be learnt. 
  • Licence fees and/or royalties must be paid.
Term
What are the advantages to developing a game from scratch?
Definition
  • There are no fees or royalties. 
  • There is greater flexibility and customisation for a game. 
  • There's a chance to develop new and better algorithms and modules.
Term
What are the disadvantages to developing a game from scratch?
Definition
  • It is time consuming.
Term
Give examples of APIs that will help build game engines/develop from scratch.
Definition
  • OpenGL
  • DirectX
  • Java3D
  • MonoGame
Term
What are the two different types of game time?
Definition
  • "Parallel", "Simultaneous", "Real Time"
  • Turn-based
Term
What is Delta Time?
Definition
Delta Time encourages frame rate independence. Objects update at the same speed on all types of hardware, and it's known as fixed time step. Delta time is the change in time since the last tick.
Term
What method is used to calculate the position of a point on a line?
Definition
Interpolation.
[image]
[image]
[image]
Term
Why don't curves have every point on them stored?
Definition
It is tedious and would have the same size and scaling problems as a bitmap.
Term
What values does a circle need stored?
Definition
The centre and a radius.
Term
What is the equation used to calculate any point on a circle's circumference?
Definition

[image]

Where the center point is:

[image]

Term
What is a conic section?
Definition
A figure formed by the intersection of a plane and a circular cone. The resulting section can be a circle, an ellipse, a parabola, or hyperbola, depending on the angle.
[image]
Term
What practical use does the parabola created by a conic section provide?
Definition
Mirroring the effect of gravity.
Term
What is a spline?
Definition
A spline is a straight line with points on it that dictate the shape of the curve.
Term
What are the types of points attached to a spline that dictate the curve's shape?
Definition
  • Control points
  • Tangent points
  • Weights
  • Knots
Term
What are some types of spline?
Definition
  • Bezier curve
  • Cardinal spline
  • B-spline
  • NURBs (Non-uniform rational b-splines)
Term
What is the maximum number of bends to be had between two ends of a bezier curve?
Definition
2
Term
Which applications utilise NURB splines?
Definition
Maya and 3DS Max
Term
What is a vertex?
Definition
A point in 3D space.
Term
How are 3D objects displayed?
Definition
They are represented by a set of vertices onto which a texture is applied.
Term
Which direction does the positive z-axis point in a left-handed co-ordinate system?
Definition
Into the screen.
Term
Which direction does the positive z-axis point in a right-handed co-ordinate system?
Definition
Out of the screen.
Term
Which co-ordinates system (left/right handed) does OpenGL use?
Definition
Right-handed.
Term
Why are triangles used to represent meshes?
Definition
They're guaranteed to be flat.
Term
What are the benefits to building up vertices from geometric primitives?
Definition
The position of the vertices can be calculated to any desired resolution. They also only need a few attributes defined.
Term
Primitive objects can be combined using boolean operations. Name two such operations.
Definition
  • Intersection
  • Difference
[image]
Term
How would one create a mesh using a curve?
Definition
Define the curve in 2D (such as a Bezier curve or NURB) and rotate or extend it to get a 3D shape.
E.G. Goblet.
Term
Why are less vertices on a mesh better?
Definition
Takes up less storage space.
Term
Where Java uses "import", what does C++ use?
Definition
#include
Term
What does string.size() do?
Definition
Sets/changes the number of characters, like string.length().
Term
What does string.find(x) do?
Definition
Finds a certain character within the character or word within the string and returns its position, returning npos if not found.
Term
What does string.insert(pos, x) do?
Definition
Finds a character or word and replaces it with x.
Term
What does string.append(pos, x) do?
Definition
Finds a character or words and adds in the value of x.
Term
What does string.erase(pos) do?
Definition
Removes a character or word.
Term
What does the getLine(cin, name) function do?
Definition
Reads multiple words.
Term
What does CG APIs stand for?
Definition
Computer graphics application programming interface.
Term
What is 3D viewing?
Definition
A 2D view of a 3D scene. The view depends on camera, parameters, properties of scene objects, and illumination.
Term
What are the main steps to 3D graphics viewing?
Definition
  1. Scene specification
  2. View specification
  3. View generation
  4. Display
Term
What does the object definition stage of 3D graphics viewing do?
Definition
Object definition specifies the modelling co-ordinates. It also looks at colours, textures, and surface characteristics.
Term
What does the view specification stage of 3D graphics do?
Definition
View specification sets up viewing parameters. It's similar to setting up the camera in terms of position, orientation, and zoom.
Term
What does the view generation stage of 3D graphics do?
Definition
View generation is when shading, projection, clipping, and culling are computed. It also computes coordinates relative to the camera.
Term
What are the main steps to coordinate transformations?
Definition
  1. Modelling transformation
  2. Viewing transformation
  3. Projection transformation
  4. Viewport transformation
Term
In what three ways can the camera position change?
Definition
Dolly, track, and tumble.
Term
What three things can light do when hitting a surface?
Definition
Reflect, transmit, or be absorbed.
Term
What about a surface determines the amount and direction of light that is absorbed, reflected, and transmitted?
Definition
The surface's material.
Term
What assists in replicating lighting laws, that would otherwise be too costly to replicate?
Definition
Lighting models.
Term
What does an illumination model do?
Definition
Provides a formula for calculating light intensity seen at a surface point.
Term
What does specular reflection model?
Definition
The bright spots on illuminated, shiny surfaces.
Term
What is ambient reflection?
Definition
The general brightness of the scene.
Term
Give the three most common shading algorithms in order of photorealism:
Definition
  1. Constant/Flat shading
  2. Gouraud shading
  3. Phong shading
Term
What are the types of collision detection?
Definition
Bounding boxes, and per-pixel collision.
Term
What is artificial intelligence?
Definition
An attempt to model aspects of human thought on computers.
Term
What is a seed?
Definition
A sequence of numbers that exhibit randomness but have been created entirely by deterministic means.
Term
What is the name of a more advanced form of AI?
Definition
Path prediction.
Term
What is pathfinding?
Definition
It allows for the patrolling of a series of waypoints.
Term
What is local pathfinding?
Definition
The selection of the best route at a current time, and repeats the process each time.
Term
What is global pathfinding?
Definition
The selection of the best route, having considered all other options.
Term
How is bitrate calculated?
Definition
((Sample rate x Resolution)/8) x 2
Term
When should pass by reference be used?
Definition
  • To change the values held by a function parameters
  • To return more than one value from a function
  • If a parameter is very large, so making a local copy in the functions would be wasteful
Term
What does the const keyword do?
Definition
indicates that something cannot be changed during program execution.
Term
What should be used instead of #define?
Definition
Const.
Term
If a program tries to modify a const, what happens?
Definition
Compile errors.
Term
What is a reference?
Definition
An alternate name for an object.
Term
What are the benefits of references?
Definition
They are cleaner and less error prone.
Term
What are the benefits of using the 'auto' keyword?
Definition
It is robust, performs better, has better usability, and is more efficient.
Term
When is a class constructor called?
Definition
When an object is first created.
Term
When is a class destructor called?
Definition
When an object goes out of scope (if on the stack) or when an object is deleted (if created on the heap).
Term
When isn't it acceptable for a class definition to go into a header file?
Definition
When it's too long. For example, if a method loads model data from file.
Term
What are prototypes?
Definition
A declaration of a function that specifies the function's name and type signature.
Term
What is winding order?
Definition
The order in which vertices are specified.
Term
What is the winding order convention in OpenGL?
Definition
Counter-clockwise.
Term
What is a better alternative to the painter's algorithm?
Definition
Z-buffer (depth buffer).
Term
What are the five steps of File I/O?
Definition
  1. Include fstream library.
  2. Declare the stream variables.
  3. Associate the file stream variable with the input/output sources.
  4. Use the file stream variable with <<, >> or other I/O functions.
  5. Close the files.
Term
What would "if(eof())" check for?
Definition
Whether there is more data to be found.
Term
What two properties are needed to map a texture to a polygon vertex?
Definition
(u, v)
Term
What is minification?
Definition
When a texture map is too detailed and several texels map onto one pixel. The object may shimmer as it moves.
Term
What is magnification?
Definition
When the texture map is too coarse and one texel maps onto several pixels.
Term
How does point sampling work?
Definition
Point sampling uses colour nearest to the pixel.
Term
How does bilinear filtering work?
Definition
Averages to the 4 nearest texels and smooths out mismatch between pixel and texel size.
Term
What is mipmapping?
Definition
The pre-computed hierarchy of texture maps of different resolutions.
I.E. Brick wall
Term
What is the simplest texture file type to read in?
Definition
.raw data
Term
What must be done before texturing will work?
Definition
glEnable(GL_TEXTURE_2D);
//Enable textures.
Term
What is polymorphism?
Definition
When an object can be of multiple types. E.G. SceneObject of type Cube or Pyramid
Term
What is inheritance?
Definition
When a subclass inherits public/protected properties and methods from a superclass.
Term
In OpenGL, what are the four light components?
Definition
Emissive, specular, diffuse, and ambient
Term
What is emissive light?
Definition
Light that is emitted by a scene object.
Term
What is specular light?
Definition
Light reflected from a smooth polished surface.
Term
What is diffuse light?
Definition
Light striking the surface from a given direction, partly absorbed, and partly reflected.
Term
What is ambient light?
Definition
Light coming from all directions, simulating light that bounces in varying directions before hitting the object.
Term
What colour will specular light typically be?
Definition
The same colour as the light source's specular, as little to no light is being absorbed.
Term
How is specular light affected by the smoothness of the material?
Definition
If the material is smoother, the light is more concentrated.
Term
What is a normal?
Definition
A normal is a vector perpendicular to a surface.
Term
What two pieces of data must go in the struct for a linked list node?
Definition
  • Data
  • Pointer to next node
Term
What benefit do arrays have that linked lists do not?
Definition
An array is easy to access.
Term
What are the advantages to a linked list?
Definition
  • Not fixed in length
  • Amount of storage is equal to the size of the list
  • Can grow and shrink
  • Inserting and deleting nodes is straightforwards
  • Inserting and deleting nodes does not shuffle other elements
Term
What are the disadvantages to a linked list?
Definition
  • Can't access individual elements easily
  • Searching requires examining every element in turn
  • Storage space is higher than arrays as data and pointer is needed, doubling size
Term
What does ADT stand for?
Definition
Abstract Data Types.
Term
What is a pointer?
Definition
A variable that holds a memory address.
Term
What does a void pointer do?
Definition
Points to data of any type.
Term
What data type is a Stack?
Definition
(LIFO) Last In, First Out.
Term
What data type is a Queue?
Definition
(FIFO) First In, First Out.
Term
What is recursion?
Definition
The act of a function calling itself.
Term
What must a recursive function have to avoid an infinite loop?
Definition
A base case.
Term
What is the difference between a binary tree and a linked list?
Definition
A binary tree can link to two or more node.
Term
What is the head of a binary tree known as?
Definition
The "root".
Term
In what direction is a binary tree traversed?
Definition
From the root, and from left to right (if present).
Term
How does pre-order traversal work?
Definition
It starts at the root and visits each node the first time it is encountered, before any of its children.
Term
How does in-order traversal work?
Definition
It starts at the root, traverses to the left, visits the node, and then to the right (if present), before returning to the parent. If there is no unvisited parent, the traversal is finished. Each node is visited the second time it is encountered, after the left child but before the right.
Term
How does a post-order traversal work?
Definition
It starts at the root, traverses to the left, traverses to the right (if present), then visits the parent. If there's no parent, the traverse is finished. Each node is visited the last time it is encountered, after both children.
Term
How does depth first binary tree searching work?
Definition
Searching each branch to the end before moving onto the next branch.
Term
How does breadth first binary tree searching work?
Definition
All nodes at a given level are visited before moving onto the next level.
Term
What is a binary search tree?
Definition
A binary search tree is a binary tree where the left subtree of a node contains only nodes with data less than the node's data, and the right contains only nodes with data greater than the node's data.
Term
What type of data structure is used to represent a hierarchical scene?
Definition
Scene graph.
Term
If a node needs two or more children, a traditional binary tree scene graph cannot be used. What is the alternative?
Definition
Left-child, right-sibling.
Term
In a left-child, right-sibling scene graph, what type of data structure is each child node?
Definition
Linked list.
Term
In a graphics application, what would be used to ensure that child nodes have the same transformations as their parents?
Definition
Transformation matrices.
Term
What are the various transformation matrices?
Definition
[image]
Term
Give an example of an implementation of a scene graph.
Definition
The Java3D library.
Term
Under what circumstances has a collision between two bounding volumes not occurred?
Definition
  • XmaxA < XminB
  • XminA > XmaxB
  • YmaxA < YminB
  • YminA > YmaxB
Term
Which methods are the easiest for selecting an object in 3D space?
Definition
Via a menu or key press.
Term
Which method is the most difficult for selecting an object in 3D space?
Definition
Clicking with the mouse.
Supporting users have an ad free experience!