Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSC 343/642 Interactive 3D Game Development George J. Grevera, Ph.D. George J. Grevera, Ph.D.

Similar presentations


Presentation on theme: "CSC 343/642 Interactive 3D Game Development George J. Grevera, Ph.D. George J. Grevera, Ph.D."— Presentation transcript:

1 CSC 343/642 Interactive 3D Game Development George J. Grevera, Ph.D. George J. Grevera, Ph.D.

2 GAME DEVELOPER ROLES

3 Game developer roles Producer Producer Designer Designer Programmer Programmer Visual artist Visual artist Audio artist Audio artist QA specialist QA specialist

4 Game developer roles Producer Producer project leader project leader scheduling, management, budget scheduling, management, budget nontechnical nontechnical

5 Game developer roles Designer Designer decides theme and rules of game decides theme and rules of game lead designer, level designer, designer-writer, character designer, etc. lead designer, level designer, designer-writer, character designer, etc. good communicators good communicators design document: design document: maps, sketches of game objects, descriptions of plot devices, flow charts, tables of characteristics maps, sketches of game objects, descriptions of plot devices, flow charts, tables of characteristics narrative text of how all this fits together narrative text of how all this fits together

6 Game developer roles Programmer Programmer combines ideas, artwork, sound, and music into game combines ideas, artwork, sound, and music into game translate user input into visual and audio experiences translate user input into visual and audio experiences game rules, character control, game event management, scoring game rules, character control, game event management, scoring online games involve client and server code online games involve client and server code

7 Game developer roles Visual artist Visual artist draws sketches and storyboards draws sketches and storyboards creates models and texture artwork for characters, buildings, vehicles, icons creates models and texture artwork for characters, buildings, vehicles, icons three principle types of 3D art: three principle types of 3D art: 1. models (created by modelers) 2. animations (created by animators) 3. textures (created by texture artists)

8 Three principle types of 3D art 1. 3D modeler designs and builds player-characters, creatures, vehicles, etc. designs and builds player-characters, creatures, vehicles, etc. tradeoff between realism and performance tradeoff between realism and performance 2. Animator makes models move. 3. Texture artist wraps (2D) images around (3D) models.

9 Game developer roles Audio artist Audio artist composes music and creates sound composes music and creates sound intensifies game experience intensifies game experience

10 Game developer roles QA specialist QA specialist tester tester Most problems (bugs) are visual or behavioral. Most problems (bugs) are visual or behavioral.

11 ELEMENTS OF A 3D GAME

12 Elements of a 3D game 1. Game engine 2. Scripts (code) 3. GUI 4. Models 5. Textures 6. Sound 7. Music 8. Support infrastructure

13 Elements of a 3D game Game engine Game engine provides 3D scene rendering, networking, graphics, scripting, etc. provides 3D scene rendering, networking, graphics, scripting, etc. sophisticated rendering of game environments sophisticated rendering of game environments textured polygon rendering textured polygon rendering physics (time, motion, gravity, etc.) physics (time, motion, gravity, etc.) collision detection collision detection

14 Elements of a 3D game: Game engine components User input User input Graphics Graphics Audio Audio Event timing and synchronization Event timing and synchronization Scene graph Scene graph Networking Networking Scripting Scripting Objects and resources Objects and resources File I/O File I/O

15 Elements of a 3D game Scripts (code) Scripts (code) used to bring different parts of engine together used to bring different parts of engine together provide game play functions provide game play functions enable the game world rules enable the game world rules examples: examples: scoring, managing players, defining player and vehicle behaviors, controlling GUI elements scoring, managing players, defining player and vehicle behaviors, controlling GUI elements Unity supports Javascript, C#, and Boo (similar to Python). Unity supports Javascript, C#, and Boo (similar to Python).

16 Elements of a 3D game: Scripts //PlatformMover.js var targetA : GameObject; var targetB : GameObject; var speed : float = 0.1; function FixedUpdate ( ) { var weight = Mathf.Cos(Time.time * speed * 2 * Mathf.PI) * 0.5 + 0.5; var weight = Mathf.Cos(Time.time * speed * 2 * Mathf.PI) * 0.5 + 0.5; transform.position = targetA.transform.position * weight transform.position = targetA.transform.position * weight + targetB.transform.position * (1-weight); + targetB.transform.position * (1-weight);}

17 C# Example using UnityEngine; using System.Collections; public class GameObjectScript : MonoBehaviour { void DoMyWindow ( int windowID ) { void DoMyWindow ( int windowID ) { if (GUI.Button(new Rect(10, 20, 100, 20), "Hello World")) if (GUI.Button(new Rect(10, 20, 100, 20), "Hello World")) print( "Got a click" ); print( "Got a click" ); } private Rect windowRect = new Rect( 20, 300, 120, 50 ); private Rect windowRect = new Rect( 20, 300, 120, 50 ); void OnGUI ( ) { void OnGUI ( ) { print( "in GameObjectScrip.cs:OnGUI()" ); print( "in GameObjectScrip.cs:OnGUI()" ); GUI.Box( new Rect(10,10,100,90), "Menu" ); GUI.Box( new Rect(10,10,100,90), "Menu" ); if (Input.GetKey(KeyCode.Escape) || GUI.Button( new Rect(20,40,80,20), "Quit" )) { if (Input.GetKey(KeyCode.Escape) || GUI.Button( new Rect(20,40,80,20), "Quit" )) { Application.Quit();//only works when game.exe is running Application.Quit();//only works when game.exe is running Debug.Break();//only works when debugging Debug.Break();//only works when debugging } GUI.Window( 59, windowRect, DoMyWindow, "My Window" ); GUI.Window( 59, windowRect, DoMyWindow, "My Window" ); }}

18 Elements of a 3D game GUI (graphical user interface) GUI (graphical user interface) a combination of graphics and scripts that carries the visual appearance of the game and accepts the user’s control inputs a combination of graphics and scripts that carries the visual appearance of the game and accepts the user’s control inputs examples: examples: buttons, menus, messages, dialog boxes, etc. buttons, menus, messages, dialog boxes, etc.

19 Elements of a 3D Game: GUI

20

21 Elements of a 3D game Models Models 3D models such as player’s character, buildings, trees, lampposts, vehicles, world, etc. 3D models such as player’s character, buildings, trees, lampposts, vehicles, world, etc.

22 Elements of a 3D game Textures Textures a.k.a. skins a.k.a. skins define visually rendered appearance of all models define visually rendered appearance of all models enhance performance (by reducing the need for geometric detail) enhance performance (by reducing the need for geometric detail) basically 2D images mapped onto 3D geometry (polygons) basically 2D images mapped onto 3D geometry (polygons)

23 Elements of a 3D game Sounds Sounds provide contextual flavoring provide contextual flavoring provide audio cues to events (you shoot) provide audio cues to events (you shoot) provide audio cues to environment (twigs snap as you run in the forest) provide audio cues to environment (twigs snap as you run in the forest) background sounds (birds in a forest) background sounds (birds in a forest)

24 Elements of a 3D game Music Music used to establish a mood used to establish a mood used to establish context (you enter a dance hall) used to establish context (you enter a dance hall) examples: examples: http://www.youtube.com/watch?v=pKf4Dk80E94 http://www.youtube.com/watch?v=pKf4Dk80E94 http://www.youtube.com/watch?v=pKf4Dk80E94 http://youtube.com/watch?v=zFEepARd81g http://youtube.com/watch?v=zFEepARd81g http://youtube.com/watch?v=zFEepARd81g http://youtube.com/watch?v=h5fYwiXZeFU http://youtube.com/watch?v=h5fYwiXZeFU http://youtube.com/watch?v=h5fYwiXZeFU http://youtube.com/watch?v=aZpD0btOZx8 http://youtube.com/watch?v=aZpD0btOZx8 http://youtube.com/watch?v=aZpD0btOZx8 http://www.youtube.com/watch?v=zD-aeaE8lJs http://www.youtube.com/watch?v=zD-aeaE8lJs http://www.youtube.com/watch?v=zD-aeaE8lJs http://www.youtube.com/watch?v=LetrpQ5m9Hw http://www.youtube.com/watch?v=LetrpQ5m9Hw http://www.youtube.com/watch?v=LetrpQ5m9Hw

25 Elements of a 3D game Support infrastructure Support infrastructure important for persistent multiplayer games important for persistent multiplayer games game servers game servers web sites web sites updates and support updates and support administrative tools administrative tools database database

26 How to pick a game engine? Top game engines: Top game engines: http://www.devmaster.net/engines/ http://www.devmaster.net/engines/ http://www.devmaster.net/engines/

27 GAME ENGINE CONCEPTS

28 Game engine concepts Basic control flow Basic control flow Platform layer Platform layer Console Console Input model Input model Simulation Simulation Resource manager Resource manager Graphics Graphics 3D rendering 3D rendering Terrain Terrain Interiors Interiors Shapes and animation Shapes and animation Networking Networking

29 Game engine concepts Basic control flow Basic control flow Mouse movement Mouse movement Other input-related events Other input-related events Elapsed time Elapsed time Manages server and client objects Manages server and client objects Network packets Network packets Render current frame Render current frame

30 Game engine concepts Platform layer Platform layer Cross platform interface to game engine Cross platform interface to game engine Linux, Mac, Windows, Wii, Xbox 360, etc. Linux, Mac, Windows, Wii, Xbox 360, etc. Responsible for: Responsible for: File I/O File I/O Network I/O Network I/O Graphics Graphics User input User input Events Events

31 Game engine concepts Console Console Compiler and/or interpreter Compiler and/or interpreter Handle GUI, game objects, game logic, and interfaces Handle GUI, game objects, game logic, and interfaces Languages such as Javascript, C#, and Boo Languages such as Javascript, C#, and Boo

32 Game engine concepts Input model Input model translates Win32, X Windows, or Mac events into Torque events translates Win32, X Windows, or Mac events into Torque events action maps translate platform input events to specific function calls action maps translate platform input events to specific function calls

33 Game engine concepts Simulation Simulation Game is driven by a stream of events. Game is driven by a stream of events. Some engines allow the events to be journaled and replayed for debugging or demos. Some engines allow the events to be journaled and replayed for debugging or demos.

34 Game engine concepts Resource manager Resource manager Resource: terrain files, bitmaps (images), shapes, material lists, fonts, interiors, etc. Resource: terrain files, bitmaps (images), shapes, material lists, fonts, interiors, etc. Managed by Resource Manager so only one instance of each is present. Managed by Resource Manager so only one instance of each is present.

35 Game engine concepts Graphics Graphics Rasterization via OpenGL Rasterization via OpenGL Texture Manager Texture Manager

36 Game engine concepts 3D rendering 3D rendering 3D world rendering system 3D world rendering system camera orientation, FOV, and then render camera orientation, FOV, and then render Scene graph library traverses the world scene to determine which objects need to be rendered. Scene graph library traverses the world scene to determine which objects need to be rendered. zones: zones: World is divided into zones and/or levels (volumes of space bounded by solid areas and portals) World is divided into zones and/or levels (volumes of space bounded by solid areas and portals) The outside world is one zone. The outside world is one zone. Interior objects can have multiple interior zones. Interior objects can have multiple interior zones.

37 Game engine concepts Terrain library Terrain library outside world outside world skybox, animates and renders cloud layers, fog, etc. skybox, animates and renders cloud layers, fog, etc. Water is often rendered with LODs based on distance. Water is often rendered with LODs based on distance.

38 Game engine concepts Interiors Interiors Loading, rendering, and collision services need to be managed by the game engine for interior objects such as buildings. Loading, rendering, and collision services need to be managed by the game engine for interior objects such as buildings.

39 Game engine concepts Shapes and animation Shapes and animation manage the display and animation of shape models in the world manage the display and animation of shape models in the world manage mesh data, animation keyframes, material lists, decal information, triggers, and LODs manage mesh data, animation keyframes, material lists, decal information, triggers, and LODs multithreaded animations multithreaded animations

40 Game engine concepts Networking Networking Client/server framework is typical. Client/server framework is typical. Some engine allow an instance of a game to be a client, a dedicated server, or both. Some engine allow an instance of a game to be a client, a dedicated server, or both. Some support up to 128 or more clients per server. Some support up to 128 or more clients per server. Packet loss, latency, and bandwidth can be a problem. Packet loss, latency, and bandwidth can be a problem. interpolation = smoothly move an object from where the client believes it is to where the server says it is. interpolation = smoothly move an object from where the client believes it is to where the server says it is. extrapolation = guess where object is going extrapolation = guess where object is going prediction = educated guess where object is going (more “intelligent” than extrapolation) prediction = educated guess where object is going (more “intelligent” than extrapolation)

41 Next: Installing Unity3d assi Next: Installing Unity3d assigment http://vimeo.com/10879508 http://unity3d.com/ Then email a screen dump of Unity running on your computer to me.


Download ppt "CSC 343/642 Interactive 3D Game Development George J. Grevera, Ph.D. George J. Grevera, Ph.D."

Similar presentations


Ads by Google