Download
csc 343 642 n.
Skip this Video
Loading SlideShow in 5 Seconds..
CSC 343/642 PowerPoint Presentation
Download Presentation
CSC 343/642

CSC 343/642

176 Views Download Presentation
Download Presentation

CSC 343/642

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

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

  2. Game developer roles

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

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

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

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

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

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

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

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

  11. Elements of a 3d game

  12. Elements of a 3D game • Game engine • Scripts (code) • GUI • Models • Textures • Sound • Music • Support infrastructure

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

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

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

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

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

  18. Elements of a 3D game • 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 • examples: • buttons, menus, messages, dialog boxes, etc.

  19. Elements of a 3D Game: GUI

  20. Elements of a 3D Game: GUI

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

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

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

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

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

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

  27. Game engine concepts

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

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

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

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

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

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

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

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

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

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

  38. Game engine concepts • Interiors • 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 • manage the display and animation of shape models in the world • manage mesh data, animation keyframes, material lists, decal information, triggers, and LODs • multithreaded animations

  40. Game engine concepts • Networking • Client/server framework is typical. • 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. • 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. • extrapolation = guess where object is going • prediction = educated guess where object is going (more “intelligent” than extrapolation)

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