386 - Game Design ?'s

¡Supera tus tareas y exámenes ahora con Quizwiz!

1) In class, several different file based storage interfaces were explored such as serialization (pickle), shelve, dbm, and sqlite. Amongst these, which are databases?

1)Serialization is the only one out of the list that isn't explicitly a collection of organized data.

10)Illustrate at least two examples where someone can see or hear aliasing.

10)• Moiré patterns - produce from under sampling high frequency details in an image. • wheels turning backward - the shutter on the camera samples something in motion (a wheel) and due to the sampling rate incorrectly shows the objects motion to be illogical • audio aliasing - a signal is under samples so when the signal is reconstructed the original pitches are rendered as aliases of other pitches • jaggies - the source digital image is resampled and displayed at a resolution higher. Jagged pixels Appear.

11)Let us imagine a Python object that is use to model the inventory of the player in an RPG-style game. Compare and contrast the benefits and drawbacks of serializing the object to a file versus writing the data to an easy to parse text file.

11)assume the player's inventory is an easy to parse text file. Let's also assume that it is not in a format that has a canned parser such as XML, HTML, INI, etc. Since this is the case, then a parser must be written. Let's assume that the inventory is not just a collection of integral types such as chars and integers. Then additional parsers must be written to load the data from the text file back into memory. Additionally, the routines for writing the data to the text file has to be written. (In effect, serialization has to be invented for this text file.) Using Python's serialization, All our data can be contained within a single object which is written to a file. Upon deserialization, we get the same object back. We do not have to write any routines to parse anything. Regardless of how easy it is to parse the text file, the limiting factor is what kind of data we need to store persistently. This is what should guide our decision and not the other way around.

12)According to Juul, what are the characteristics that are common between the seven game definitions he identifiesl? (7 features)

12)-All definitions agree that games are rules based -each game has outcomes that are quantifiable. -Goals and conflict are also present in games. -All games would also be voluntary -Players seek out less efficient means to reach goals. -Games also have some form of fiction -Games also promote social groupings *** the only real common feature though would be that they all have rules as other definitions don't all agree on the rest***

13)What is Juul's new game definition? How is this different from his traditional/classic game definition? (6 features)

13)i. The game is rule-based ii. The game must have variable, quantifiable outcomes iii. These outcomes need to have different values, some positive, others negative. iv. Player effort must be used. there is challenge in getting to the outcomes. v. The player feesl attached to outcomes vi. Any consequences present are negotiable, meaning without any real life consequences. Both definitions agree that games are rules based and that the outcomes, but in Juul's new definition he elaborates that these outcomes needs to have value to them, not just a conflict between players. Instead of voluntary, no real negative outcomes

14)According to Juul, what is gameplay?

14)Gameplay according to Juul is a dynamic aspect of the game that does not reflect on the rules, game tree, or game's fiction, but instead looks at the way the game is played. Juul states that it is the degree and interactivity that is included with the game. It looks at how players are able to interact with the game's world while looking at how the game reacts to the player's actions. He feels that gameplay is more important than the graphics, voice actors or music of a game.

15)List and describe Juul's five types of games.

15) 1. Abstract games: The rules stay the same but the fiction can change without having to change the rules. (tic tac toe fiction) 2. Iconic games: symbols or icons have a specific meaning to them and there are relationships between them. (i.e chess pieces and moves) 3. Incoherent world games: Have some fiction to them, but the fictional world does not explain it all and in some cases does not have to really make sense to the player. (For example in the game of Pacman) 4. Coherent world games: Games where the rules fit the fictional world, they relate to one another. The player knows why things within the game exist and these things are either directly explained or inherently understood.(RPG games tend to be coherent world games.) 5. Staged games: games within games. The games within the game do not relate to each other or do not contain a connected story among them all. (board game collections with multiple board games)

2)What language constructs or modules are there in Python that allow us to have an in-core or out-of-core database?

2)• shelve • andydbm and family • sqlite • pickle/marshall

3)Can a list in Python be used as a database? What is the worse-case running time for a key insertion, deletion, and lookup into a Python list?

3)A list can be used as a database so long as the entries in the list are organized - and kept organized - in some fashion by the programmer. Worse-case running time for insertion is O(1). For deletion and lookup, the worse-case running time is O(n). (The organization of the data may positively effect the worse-case running time of deletion and lookup, for example a binary tree embedded in a list.)

4)What is the worse-case running time for a key insertion, deletion, and lookup into a hash table?

4)Insertion, deletion and lookup are all O(1) (assuming finite length collisions resolution) which means constant time. If there are collisions (multiple keys mapping to the same location in memory) then the collision resolution policy will impact the worse-case performance of insertions, deletions and lookups.

5)What is the purpose of the setup.py file?

5)The setup.py file is a the file that controls how a module is built, distributed, and installed using Python's Distutils. The author of the module can encode the process of building the software and where it is to be installed into the routines of the setup.py file.

6)Why is it a good practice to include a setup.py?

6)It is a good practice to include a setup.py ?le so that there is an easy and reproducible way to build and install your software. Additionally the setup.py includes routines that will create archives of your software for distribution either in source or binary form.

7)Is a Microsoft Visual Studio Project or Solution file similar or different to a setup.py file?

7)A Microsoft Visual Studio Project/Solution file is very similar to a setup.py file. Both include ways that the software is to be built and installed. A Project/Solution file does not always include information about how to archive and distribute the software.

8)In sampling theory what is the significance of the Nyquist frequency with respect to audio?

8)The Nyquist Frequency is the frequency that we must sample a signal in order to reproduce it without any aliasing. For example, to reproduce an audio signal that ranges from 0 Hz to 22 KHz, we must sample at 44 KHz. In other words, we must sample at twice the highest frequency we wish to reproduce.

9)How does the Nyquist frequency apply to images?

9)This relates to images because an image is a 2D signal whereas an audio signal is a 1D signal. We can have aliasing artifacts with images. For example, the jaggies that you see in a digital image that is 'zoomed' in is from aliasing. In essence, you need to make sure the resolution of your image is high enough to be able to print or display correctly.


Conjuntos de estudio relacionados

135 Linux-Pro Chapter 2 to 9 & 13

View Set

Communicating effectively Chapter 12

View Set

Social and Behavioral Research - Belmont Report and It's Principles

View Set

Principles of Financial Accounting Chpt 8

View Set

UNIT 5 CH 23-3 AND 23-4 question from text book

View Set

Chapter 24: Alterations in Genitourinary Function

View Set