Presentation is loading. Please wait.

Presentation is loading. Please wait.

استاد درس: دکتر نورحسینی ارائه کننده: مریم یوسفی پاییز 89 1.

Similar presentations

Presentation on theme: "استاد درس: دکتر نورحسینی ارائه کننده: مریم یوسفی پاییز 89 1."— Presentation transcript:

1 استاد درس: دکتر نورحسینی ارائه کننده: مریم یوسفی پاییز 89 1

2 Introduction  Recently, games have become one of the most profitable factors in the software industry.  More specifically, during the last few years the game industry has been considered to produce revenue greater than the movie industry and its development rate has been one of the most fast growing in the United States economy.  Furthermore, game design and the methods used for easier and more efficient development constitute a very interesting open research field. 2

3 Game development group The distinction between games and other forms of software is that, In games, the development groups consist of people with different fields of expertise. 1. First of all, a script writer is required; this person will write the game script and fill in a document usually called ‘‘concept paper’’. 2. The lead game designer will convert information from the concept paper into another called ‘‘design document’’ which will be the guide throughout the development process. 3. Apart from that, the company employs a group of programmers with several skills and expertise, such as engine and graphics programmers, artificial intelligence programmers, sound programmers and tool programmers. 4. Finally, the company must hire testers who would play the game in order to find bugs and make suggestions for changes in gameplay, graphics and the story. 3

4 Game architecture  One of the most interesting aspects of game research is the architecture that the developer will use.  Designing and programming large-scale software is a very complicated job that requires many human work hours.  Consequently, software is usually divided, logically, into subprograms that are autonomously designed, programmed and tested by separate programmers’ groups.  These subprograms are called modules.  Decomposing software into modules is an important decision that plays a main role in the architecture and further design of the program. 4

5 Game architecture 5 The game logic is the part that holds the game’s story. The audio and graphics are the modules that help the writers narrate the story to the player. The event-handler and the input modules, supply the game logic with the player’s next action. The level data module is a storage module for details about static behaviour and the dynamics module configures dynamic behaviour of game’s characters.

6 Pattern  Patterns can also be used in software architecture and, if applied properly, they increase the flexibility and reusability of the underlying system.  Such solutions are especially geared to improve adaptability, by modifying the initial design in order to ease future changes.  Each pattern allows some aspect of the system structure to change independently of other aspects.  if patterns are used properly and in appropriate cases, they prove extremely beneficial regarding maintainability and comprehensibility. 6

7 Design patterns for games  Design patterns for games can be approached from two different perspectives; firstly as patterns used for describing the game mechanics (gameplay and game rules) and secondly as the use of object-oriented design patterns in programming games.  The proposed patterns are collected from interviewing professional game programmers, from analyzing existing games and from transforming game mechanics.  As mentioned, ‘‘The way to recognize patterns is playing games, thinking games, dreaming games, designing games and reading about games’’. 7

8 design patterns in game logic  The strategy pattern  The strategy pattern, defines a family of algorithms, encapsulates each one, and makes them interchangeable.  Every player uses a different heuristic algorithm to calculate the min–max value in order to decide the next computer move.  This pattern could have also been used in games such as backgammon, card games and anywhere artificial intelligence algorithms can be applied. 8

9 design patterns in game logic Strategy pattern – chess example 9

10 design patterns in game logic  Observer pattern  the observer pattern defines a one-to-many dependency between objects that when one object changes state, all it’s dependants are notified and updated automatically. 10

11 design patterns in game logic Observer pattern – football manager example. 11

12 design patterns in game graphics  State pattern  The state pattern allows an object to alter its behavior when its internal state changes.  This pattern can be used in games where an object changes the level of detail (LOD)of its appearance with respect to its distance from the camera. 12

13 design patterns in game graphics State pattern – first person shooter example. 13

14 design patterns in game graphics  Bridge pattern  The bridge pattern decouples an abstraction from its implementation so that the two can vary independently.  This pattern can be used in any game with 3D objects that can be painted in multiple ways (texture, material etc).  At the same time the 3D object might also vary since it can be a primitive (sphere, cube, etc) or an export from a 3D package (.3ds file,.m2 model, etc). 14

15 design patterns in game graphics Bridge pattern – 3D game example. 15

16 Software quality metrics The software metrics : 1. Size metrics LOC(Line Of Code) NOC(Number Of Class) 2. Complexity metrics AC(Attribute Complexity ) WMPC1(Weighted Methods per Class 1) WMPC2(Weighted Methods per Class 2) 3.Coupling metrics CF(Coupling Factor ) 4.Cohesion metrics LCOM(Lack of Cohesion Of Methods ) 16

17 Example 1 – Cannon smash  The game is currently in version and supports multiplayer gaming. This feature was added in version where the programmers used an ExternalData class in order to handle messages coming from the network, such as instructions from remote players (this operation belongs to the input module of the game).  The Event class, which is used as an event-handler, using openGL input functions, had an association through reference to an ExternalData structure.  The drawback in the presented approach is that the incoming data could be received in three different types and according to the current type a different reading strategy should be used. In this version the programmers used a switch statement to implement this mechanism. 17

18 Example 1 – Cannon smash Cannon smash approach for multiplayer. 18

19 Example 1 – Cannon smash Cannon smash approach for multiplayer – source code. 19

20 Example 1 – Cannon smash Cannon smash multiplayer approach. 20

21 Example 1 – Cannon smash Metrics cannon smash project 21

22 Example 2 – ice hockey manager  Ice Hockey Manager (IHM) is a simulation of coaching a hockey team. The game’s current version is 0.2. In version the developers used eight (8) instances of design patterns.  Even though that version’s design was extremely well-structured, some packages and some classes suffered from increased WMPC1.  This problem was alleviated with the use of more design patterns despite the fact that additional functionality was applied. In version twenty-six instances of design patterns have been identified. 22

23 Example 2 – ice hockey manager Ice hockey manager – version bridge-state pattern. 23

24 Example 2 – ice hockey manager 24

25 Example 2 ice hockey manager Metrics for ice hockey manager project 25

26 26

27 Sound Layers and Semantics  Context: In a project with a holistic approach to sound, it is necessary to manage diverse sound purposes that imply different categories of decisions.  Problem: It is hard to manage the amount of decisions and implementation aspects regarding sound to consider in the course of a project. Yet, it is imperative to have an early perception of what kind of sounds can be designed. Also, it is fundamental that coherent treatment is assured for aspects that share close semantic relationship. 27

28 Sound Layers and Semantics  Solution: Sounds can be structured in layers according to its semantics and communicative purpose: 1. Dialog: characters’ discourse about the action; communicates story, what characters think and what they feel. 2. Music: sets the emotional tone of the scene; tells the audience what to feel. 3. Foley: sound of actions; makes visual field more believable or enhances perception of ongoing actions. 4. Ambiance: sounds of the environment; tells the audience where the action takes place; usually perceived when other layers are absent or low volume; 5. Sound effects: make abstract or imaginary objects concrete (e.g., sound of a laser sword) by enabling a multisensory perception. 28

29 Sound Decoys  Context: A customary component of the gameplay is to deal with enemies along the game space.  Problem: In some situations it is convenient to divert enemies’ attention and possibly to influence them to change their positions, either to be able to deal with one at time or to avoid confrontation at all.  Solution: Diverse forms of decoy can be included in the gameplay. Sound is particularly suitable for integrating meaningful decoy actions since it allows launching the decoy whilst avoiding visual contact. It also brings advantages both for the plausibility of the decoy and for its usefulness in spaces with reduced visibility. 29

30 Imminent Death  Context: Many games implement death through decrements in health as a result of repeated injury. Recovery may depend on self-administering some kind of remedy and/or spending time enough without taking damage. Recovery often comes at a cost, so it is inevitable to manage some level of injury.  Problem: Unless there are clear indicators of current health state, a player may inadvertently let the character die just because she was not aware that death was imminent. For that contributes the fact that the player may be so deeply focused in other aspects of the conflict – timing, moves, tool selection, etc. – that her attention is diverted from the health indicators. Furthermore, both health and death are concepts with profound semantics and prominent association to emotions and values. That, at least, calls for a meaningful signaling. 30

31 Imminent Death  Solution: Health status can be communicated diegetically. Diegetic indicators have a couple of advantages: they allow a more direct understanding of the situation; and they avoid the need to be attentive to some health monitor.  Solutions include using the sound of the heartbeat, which constitutes an evocative and powerful indication of risk, particularly when it becomes the dominant sound.  Affecting global sound as if senses (namely hearing) became severely compromised is very indicative of the need to find a remediation for that condition. 31

32 Horse Hooves  Context: Horses are one possible element in narratives and games. The sound of horse hooves is an integral part of the perception of a horse – it is hardly omissible.  Problem: It is not practical to record a real horse’s hoofbeats particularly in an isolated setting with the optimal acoustic conditions.  Solution: A very “low tech” technique that proved to be efficient consists in banging two halves of a coconut in each other. For better results bang the coconut halves against a mixture of dirt and straw in a box. Padding the coconuts with foam also improves the sounding. 32

33 references  Apostolos Ampatzoglou and Alexander Chatzigeorgiou Evaluation of object-oriented design patterns in game development. Inf. Softw. Technol. 49, 5 (May 2007),  Valter Alves and Licinio Roque A pattern language for sound design in games. In Proceedings of the 5th Audio Mostly Conference: A Conference on Interaction with Sound (2010). ACM, New York, NY, USA,, Article 12, 8 pages. 33

34 با تشکر از توجه شما 34

Download ppt "استاد درس: دکتر نورحسینی ارائه کننده: مریم یوسفی پاییز 89 1."

Similar presentations

Ads by Google