Game Programming Provmoment: Ladokkod: Tentamen ges för: Tentamen NGP012 Systemarkitektprogrammet 7,5 högskolepoäng Namn: (Ifylles av student) Personnummer: (Ifylles av student) Tentamensdatum: 2013-03-27 Tid: 09.00 12.00 Hjälpmedel: Inga hjälpmedel Totalt antal poäng på tentamen: För att få respektive betyg krävs: G=12 VG=18 24 poäng Allmänna anvisningar: Skriv dina svar på svarsblanketten Rättningstiden är som längst tre veckor Viktigt! Glöm inte att skriva namn på alla blad du lämnar in. Lycka till! Ansvarig lärare: Rikard König Telefonnummer: 033 435 5945
Answers (swe. svarsblankett) Namn: (Ifylles av student) Personnummer: (Ifylles av student) Question 1: Question 2: Question 3: Question 4: Question 5: Question 6: 2
1. Answer with one or more of the given answers for the following questions. (a) Which of the following are parts of the content pipline? A. The DOM. B. The Complier. C. The Assembler. D. The Content Manager. (b) What is true regarding Conditions of Satisfactions (CoS) for user stories? A. CoS helps understanding of the ultimate goal. B. CoS does not need to be testable. C. CoS should be used of a story doesn't fit in a sprint. D. "When the enemy is shot in the head, they stumble back" is a possible CoS. (c) What is true regarding the sales of used video games in the last years? A. The sales of video games have increased exponentially. B. The sales of used games have grown exponentially! C. The development cost of games has increased linearly. D. The development cost of games has increased exponentially! (d) What is true regarding friction and weight on incline depicted in the figure below? A. If no other forces are applied B is the force created by friction. B. The frictional force can never be larger than B C. The frictional force is not dependent on the sides of the triangle h and w. D. The frictional force is dependent on C. 3
2. Answer with one or more of the given answers for the following questions. (a) What is true about the ten most Influential AI in Games mentioned in the AI lesson. A. Facade is the first popular application of machine learning into an interactive simulation. B. Total war models the emotions of groups of soldiers, essential for simulating battles accurately. C. Thief uses an accurate sensory model, allowing the AI actors to respond realistically to light and sounds. D. F.E.A.R uses an underlying behavior language which provides ways to specify the behavior of characters in terms of a dynamic story. (b) Fuzzy reasoning is normally done in the following order? A. Fuzzification, Inference, Composition, Defuzzification B. Fuzzification, Composition, Inference, Defuzzification C. Composition, Fuzzification, Inference, Defuzzification D. Inference, Fuzzification, Composition, Defuzzification (c) To provide a fun experience for your players, ideally you want the AI to be: A. Intelligible, i.e. the AI should be easy to understand B. Interactive, i.e. all in-game actors should focus on the player C. Predictable, i.e. the game play should become repetitive to facilitate learning. D. Complex, i.e. the AI should be sufficiently advanced to be hard to understand (d) A member function young(x) yields 0.2 for X=20. What would the fuzzy value for the expression below be if very(x) is defined as X 2 : (very(very(young(20))) or not(very(young(20)) and not(young(20))) A. 0.0016 B. 0.04 C. 0.8 D. 0.96 4
3. Answer with one or more of the given answers for the following questions. (a) The bandwidth constraints for commercial Xbox games are? A. 8 Mbit/s per user. B. 8 Mbit/s for all. C. 8 kb/s per user. D. 8 kb/s for all. (b) Allowing a considerable amount of packet loss while providing a Microsoft Live game that appears consistent to the involved players, can be achieved using? A. Peer to Peer and UDP. B. Cyclic redundancy check (CRC) and Prediction. C. Prediction and Smoothing. D. Randomness and Smoothing. (c) Data packets to send within the network component of the XNA framework, can be sent using the options? A. UnReliable, OutOfOrder, Reliable, InOrder. B. None, UDP, InOrder, TCP. C. None, InOrder, Reliable, ReliableInOrder. D. None, Chat, InOrder, Reliable, ReliableInOrder. (d) The state and virtual place in a XNA network game, where gamers are joining and waiting for a multi-player game to start is called the? A. Bar. B. Lobby. C. Void. D. Entrance. (4p) 5
4. Answer with one or more of the given answers for the following questions. (a) Some of the properties with the Simultaneous Multi-Threading type of threads are that they? A. Are synonymous with the concept of cores, performance-wise. B. Exploit the possibly idle parts of a processor and therefore avoid scheduler latency. C. Can cause a performance drop in total if fully utilized. D. Can commonly contribute with some gain in performance. (b) The core idea of the asynchronous function-parallel model is that it? A. Splits tasks into independent parts that can run in parallel. B. Allows independent tasks to run in parallel. C. Enables interdependent tasks to run in parallel. D. Splits threads into interdependent tasks that can run in parallel. (c) The main difference between the Semaphore and the Mutex class is? A. The semaphore applies blocking if it is busy, whereas the mutex always applies spinning. B. The semaphore applies spinning if it is busy, whereas the mutex always applies blocking. C. The semaphore has a count of number of threads allowed to enter a critical section, whereas the mutex only allows one. D. The mutex has a count of number of threads allowed to enter a critical section, whereas the semaphore only allows one. (d) The methods of the Interlocked class can be used to? A. Atomically update a single variable (int, float) but not double or references types. B. Atomically update a single variable (int, float) including double or references types. C. Atomically update multiple variables (int, float) but not double or references types. D. Atomically update multiple variables (int, float) including double or references types. (4p) 6
5. Answer with one or more of the given answers for the following questions. (a) Which of the following statements describe a particle system in 3d graphics? A. Particles are used in small numbers due to their cost. B. Particles are animated using procedural animation. C. Particles are always independent of each other. D. Many particles can usually be drawn with the same draw primitive call. (b) Which of the following statements apply to billboards in XNA 4.0? A. Four vertices per billboard are enough. B. It is suitable to draw one billboard with each draw primitive call. C. Billboards can be drawn as point sprites. D. The vertex buffer does not need to change when the viewer moves. (c) Which of the following statements apply to procedural animation? A. The motion is time-interpolated between key poses. B. The motion is computed online from computational rules. C. The animator defines the motions using paths. D. Variable frame durations during an animation may cause different animation results. (d) A particle system where the particles are independent and subjected only to gravity is to be implemented. Which of the following statements apply? A. For this type of particle system the particle state should be computed on the CPU. B. For this type of particle system the particle state should be computed on the GPU. C. The most suitable computational model for a particle s state is one where the state is updated time step by time step. D. The most suitable computational model for a particle s state is one where the state is recomputed from its initial state and the elapsed time each time it is drawn. (4p) 7
6. Answer with one or more of the given answers for the following questions. (a) Which of the following statements apply to alpha-testing in XNA 4.0? A. Alpha-testing is available via the AlphaTest pipeline setting on the GraphicsDevice object. B. Drawing both the translucent and opaque pixels of a mesh with alpha-testing requires the mesh to be drawn twice. C. Alpha-testing allow opaque pixels of translucent objects to be depth sorted using the Z-buffer. D. With alpha-testing some translucent pixels could be drawn as opaque. (b) Which of the following statements apply to software view frustum culling? A. Meshes are associated with a bounding volume enclosing the mesh. B. Software view frustum culling is applied for each pixel. C. Meshes whose bounding volumes intersect the camera view frustum are not sent to the graphics hardware. D. The vertex shader removes hidden vertices from further processing. (c) Which of the following statements apply to a bounding volume hierarchy (BVH) data structure? A. A BVH is a collection of items organized by their name. B. BVHs can be used to speed up intersection testing between the actual meshes of objects. C. A BVH is a recursive data structure. D. The bounding volume of a node in a BVH is enclosed by the bounding volume of its parent node. (d) Which of the following statements apply to the bounding volumes provided by XNA 4.0? A. The XNA BoundingSphere structure represents a spherical volume that can be translated, rotated and arbitrarily scaled. B. The intersection and containment tests provided by the XNA bounding volumes require that the volumes are in the same frame of reference. C. The XNA BoundingBox structure represents a rectangular box volume of arbitrary position that is always aligned with the axes of the coordinate system. D. The XNA Ray structure represents an infinite line with a certain direction that extends from a specified point to infinity. 8