Name:     ID: 
 
    Email: 

Game Programming - Real Time Programming Test 4 (PW skilstu109)

True/False
Indicate whether the sentence or statement is true or false.
 

 1. 

Timing in Flash is not simple
 

 2. 

The problem with the frame rate is that when setting the property you set the maximum frame rate which guarantees you that your movie will not play more quickly than the setting you use. However, it may end up playing more slowly
 

 3. 

The speed of the computer has no effect on the game experience because slower computers play Flash movies at slower rates
 

 4. 

The’ setInterval function is not global and is not called on a reference
 

 5. 

The clearInterval function gets rid of a function that executes at a given time interval
 

 6. 

A stub is a function definition that has zero or minimal code in it.
 

 7. 

The frameCounter is used to display to the user or developer the frames per second (fps)
 

 8. 

The entire setBubble function is basically one big switch statement because it is the cleanest solution to implement a state machine where each state follows the previous one without backtracking or skipping ahead.
 

 9. 

The playIntro function’s only purpose is to check the game state and  either send lester on his current route or choose a new route for him
 

 10. 

In the game “Shoot ‘Em Up”, the gameState variable is used to keep track of what Lester is doing.
 

Multiple Choice
Identify the letter of the choice that best completes the statement or answers the question.
 

 11. 

The frame rate property
a.
allows you to set the frame rate of your movie
d.
all of the above
b.
Affects how many frames are processed in a second (fps)
e.
none of the above
c.
either speeds up or slows down the movie
 

 12. 

The setInterval Function
a.
calls a given piece of code once every so many milliseconds
d.
both a and b
b.
Is used to create a new interval event
e.
none of the above
c.
can be substituted through advanced mathematical functions
 

 13. 

Concerning the setInterval function the functionName can be
a.
the name of a built-in function or method,
a user-defined function or method, or
a value
c.
the name of a built-in function or method,
a user-defined function or method, or
a global method
b.
the name of a built-in function or method,
a user-defined function or method, or
an anonymous function
d.
none of the above
 

 14. 

State machines are useful because...
a.
you can more easily map out the changes that an object (perhaps a movie clip on the stage) goes through during its life in your game
c.
a finite state machine is a device that records its own current state
b.
you can map out behavior changes of elements
d.
all of the above
 

 15. 

When drawing a state machine, you draw a circle and inside the circle you name the state.  Between the states are lines that represent...
a.
data flow
c.
possible state changes
b.
game flow
d.
none of the above
 

 16. 

Concerning state machines, there can and will be code that exists...
a.
and is executed every frame the machine is in the given state
d.
none of the above
b.
in each state circle
e.
a, b, and c, are all correct
c.
when the proper input is given to spur a state change
 

 17. 

Laying out all of the functions before they are implemented...
a.
gives you a better idea of how everything is going to interconnect
c.
is rarely done
b.
should only happen with psuedocode
d.
both b and c
 

 18. 

In creating “Shoot ‘Em Up”, functions were organinzed into...
a.
3 groups
c.
5 groups
b.
4 groups
d.
their respective timelines
 

 19. 

Consider the following script...

timeInterval = setInterval(clockTick,1000);
a.
This script sets the clock into motion by creating an interval that makes a call to the clockTick function once every 1000 milliseconds (once per second);
c.
This script sets the clock into motion by creating an interval that makes a call to the timeInterval function once every 1000 milliseconds (once per second);
b.
This script sets the clock into motion by creating an interval that makes a call to the setInterval function once every 1000 milliseconds (once per second);
d.
none of the above
 

 20. 

The purpose in reducing Lester’s step count in the game “Shoot ‘Em Up” is to...
a.
adjust lester’s moves for slower CPU’s
c.
make lester move slower as the score remains low
b.
make lester move faster as the score increases
d.
none of the above
 

Short Answer
 

 21. 

Consider the following code and explain A.) what this script is doing step by step B). the result of the code in terms of output

c=0;
function count(){
      trace(“count#” + c++);
      }
setInterval(count, 500);
 

 22. 

Consider the following code...

1. msgInterval = setInterval(function(){trace(“hi”);}, 500);
2. clearInterval(msgInterval);

Describe what code is executed and what the output is. 10pts.
 



 
Submit          Reset Help