Top Banner
Labyrinth Labyrinth Zhou Zhen Zhou Zhen Barry Allison Barry Allison Stephen Kao Stephen Kao Rex Ma Rex Ma
27
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

LabyrinthLabyrinth

Zhou ZhenZhou ZhenBarry AllisonBarry AllisonStephen KaoStephen Kao

Rex MaRex Ma

Page 2: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Software EnvironmentSoftware Environment OpenGL (Graphics)OpenGL (Graphics) OpenAL (Sound)OpenAL (Sound) C++C++ Windows Environment – desirable portable codeWindows Environment – desirable portable code Source Control (e.g Visual SourceSafe)Source Control (e.g Visual SourceSafe) Games Engine at least should be portable with Games Engine at least should be portable with

wrapper for Environment specific codewrapper for Environment specific code Coded with Multi Processor / Dual Core PC’s in mindCoded with Multi Processor / Dual Core PC’s in mind Client Server (MMOG)Client Server (MMOG) Efficiency - Trade-offs if 60fps is goal, Full Screen Efficiency - Trade-offs if 60fps is goal, Full Screen

more efficient, Compromises to Software more efficient, Compromises to Software EngineeringEngineering

Staged realeases – e.g. box without textures, no Staged realeases – e.g. box without textures, no holes, no friction etc.holes, no friction etc.

Page 3: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

ArchitectureArchitecture

Page 4: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Engine ComponentsEngine Components Renderer – First thing we need to see anythingRenderer – First thing we need to see anything Texture Maps (MIP mapping), bump mapping (for Texture Maps (MIP mapping), bump mapping (for

ball)ball) Model of World (Objects) – polygons (triangles), Model of World (Objects) – polygons (triangles),

patches/surfaces, LODpatches/surfaces, LOD PhysicsPhysics Collision DetectionCollision Detection SoundSound

Spatial Partitioning / Culling, Use view frustrum Spatial Partitioning / Culling, Use view frustrum (volume) with Octrees, Binary Space Partitioning (volume) with Octrees, Binary Space Partitioning (BSP), Portals.(BSP), Portals.

AI – Covered in other projectsAI – Covered in other projects Animation/Simulation - Mesh, Skeletal Animation/Simulation - Mesh, Skeletal

(hierarchical), Inverse Kinematics(hierarchical), Inverse Kinematics Network/Internet (MMOG)Network/Internet (MMOG)

Page 5: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

SoundSound OpenAL or Commercial (Licensed)OpenAL or Commercial (Licensed) Stereo, Surround Sound – positional (but not Stereo, Surround Sound – positional (but not

above/below)above/below) Mood Music – can depend on what is happening Mood Music – can depend on what is happening

(e.g. search, fight)(e.g. search, fight) Filters due to environment (e.g. under water)Filters due to environment (e.g. under water) Use samples or procedurally generated soundsUse samples or procedurally generated sounds Complications - Mixing sounds, volume of each Complications - Mixing sounds, volume of each

and synchronizing with events (e.g. collisions).and synchronizing with events (e.g. collisions). Occlusion (blocking – muffled & muted), Occlusion (blocking – muffled & muted),

obstructed (hear reflections) obstructed (hear reflections) WAV, MP3, WMA, MIDI Samples – Maximum WAV, MP3, WMA, MIDI Samples – Maximum

Memory vs. ChannelsMemory vs. Channels Labyrinth – Mono (stereo if time allows), Rolling based Labyrinth – Mono (stereo if time allows), Rolling based

on speed, Collision with wallson speed, Collision with walls

Page 6: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

References (Game Engine)References (Game Engine) ““Game Development – Harder Than You Think”Game Development – Harder Than You Think” (2004) (2004)

ACM Digital Library (See last years notes) ACM Digital Library (See last years notes)

““Designing a PC Game Engine” (1998)Designing a PC Game Engine” (1998)IEEE Digital LibraryIEEE Digital Library

Last Years 777 NotesLast Years 777 Notes

COMPSCI 715 ResourcesCOMPSCI 715 Resources

Game Engine Anatomy 101Game Engine Anatomy 101www.extremetech.com/article2/0,3973,594,00.aspwww.extremetech.com/article2/0,3973,594,00.asp

Page 7: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Modeling Modeling

Three Stage of Development Three Stage of Development Stage One: Simple Model Stage One: Simple Model

Single colour model Single colour model No hole in the labyrinth.No hole in the labyrinth.

Stage Two: Texture Stage Two: Texture Put the basic texture into the labyrinth Put the basic texture into the labyrinth

and ball. and ball. To have proper reflection on ball. To have proper reflection on ball.

Page 8: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Modeling Modeling

Stage Three: The complete labyrinth Stage Three: The complete labyrinth Build the complete labyrinth. Build the complete labyrinth. With friction With friction

Enhancement (If we have time) Enhancement (If we have time) Different environment (i.e. on the moon Different environment (i.e. on the moon

or Mars or Mars

Page 9: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Texture mappingTexture mapping

Aims Make it as realistic as possible Make it as realistic as possible Provide more details on the surfaceProvide more details on the surface

Page 10: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Texture mapping cont..Texture mapping cont..

Ideal Provide multiple choProvide multiple cho

ice for userice for user (ie Labyrinth can hav(ie Labyrinth can hav

e multiple skins, user e multiple skins, user even can design their even can design their own skin)own skin)

Page 11: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Texture mapping cont..Texture mapping cont..

Ideal First step First step Only use Phong shading Only use Phong shading

algorithm for the ballalgorithm for the ball

Second stepSecond step Texture map a certain Texture map a certain

pattern on the ball, from pattern on the ball, from that we can see how the that we can see how the ball actually rolling. ball actually rolling.

Third stepThird step Produce reflect image on Produce reflect image on

the ball at real timethe ball at real time

Page 12: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Texture mapping cont..Texture mapping cont..

Technologies BitmapBitmap A traditional texture A traditional texture

mapping methodmapping method

Bump mappingBump mapping Creates apparent Creates apparent

alteration to the geometry alteration to the geometry of the object surfaceof the object surface

Page 13: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Texture mapping cont..Texture mapping cont..

Technologies Procedural

textures

Can get arbitrarily Can get arbitrarily high resolution 3D high resolution 3D textures for natural textures for natural materials like wood materials like wood and marble.and marble.

Page 14: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

InterfaceInterface

Simple DirectMedia Layer (SDL)Simple DirectMedia Layer (SDL) A cross-platform multimedia library designed to A cross-platform multimedia library designed to

provide low level access to audio, keyboard, provide low level access to audio, keyboard, mouse, joystick, 3D hardware via OpenGL.mouse, joystick, 3D hardware via OpenGL.

http://www.libsdl.org/index.phphttp://www.libsdl.org/index.php For Labyrinth user input: For Labyrinth user input:

KeyboardKeyboard MouseMouse Command base user interface Command base user interface Windows menu user interfaceWindows menu user interface

Page 15: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

References (texture References (texture mapping)mapping)

"Texture Mapping" Techniques"Texture Mapping" Techniques (2004) (2004)http://undergraduate.csse.uwa.edu.au/units/233.413/Handouts/Lehttp://undergraduate.csse.uwa.edu.au/units/233.413/Handouts/Lectures22and23.htmlctures22and23.html Burkhard's Burkhard's Lectures Texture MappingLectures Texture Mapping (2005) (2005) http://www.cs.auckland.ac.nz/compsci372s1c/burkhardLectures/3http://www.cs.auckland.ac.nz/compsci372s1c/burkhardLectures/372Handout6_1up.pdf72Handout6_1up.pdf Nvidia Nvidia (1999) (1999) Demos: BubbleDemos: Bubble

http://www.nvidia.co.uk/object/IO_20011113_6700.htmlhttp://www.nvidia.co.uk/object/IO_20011113_6700.html Solid Texturing of Complex Surfaces D. R. Peachey Solid Texturing of Complex Surfaces D. R. Peachey

(SIGGRAPH 1985) (SIGGRAPH 1985)

Reading materialReading materialAndy G. Ye & David M. Lewis Lewis Procedural texture mapping on FPGAsProcedural texture mapping on FPGAshttp://www.hwswworld.com/downloads/y13/05_2.PDFhttp://www.hwswworld.com/downloads/y13/05_2.PDF

Page 16: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Physically based modellingPhysically based modelling

Physically based modelling is important in Physically based modelling is important in game development nowadays.game development nowadays.

Laws of physics evaluated by the most Laws of physics evaluated by the most modern 3D games for both motion and modern 3D games for both motion and graphics calculation.graphics calculation.

E.g. Collisions detection, Movement, E.g. Collisions detection, Movement, Weather.Weather.

Physically based modelling engine has Physically based modelling engine has been used by many of simulator program been used by many of simulator program too.too.

Page 17: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Games in 1980s Vs NowGames in 1980s Vs Now

In 80s, games is 2D In 80s, games is 2D and simple. and simple. Colourful, Colourful, interesting game interesting game style and system style and system requirement are requirement are the number of the number of main factor to main factor to develop game.develop game.

Now, many games Now, many games use 3D engine and use 3D engine and physics engine to physics engine to model. “Realistic” model. “Realistic” is the main factor is the main factor for the game.for the game.

Page 18: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Games in 1980s Vs Now Games in 1980s Vs Now (Cont’d)(Cont’d)

Page 19: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Physics ChipsPhysics Chips

Because physics Because physics factor become factor become more important in more important in games today. games today. Some computer Some computer add-on card for add-on card for physics calculation physics calculation have been have been developing too.developing too.

Page 20: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Particle systemsParticle systems

We will use Particle Systems to We will use Particle Systems to evalute our physical model.evalute our physical model.

It need many of particle to support It need many of particle to support our the calculation.our the calculation.

But it have many of advantages:But it have many of advantages: Reduces need for human animatorsReduces need for human animators Reusable and react whatever user inputReusable and react whatever user input

Page 21: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Physics model evaluationPhysics model evaluation

We will use some We will use some formula in formula in Newton’s laws and Newton’s laws and Circular motion to Circular motion to evaluate our evaluate our physical model.physical model.

Page 22: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Labyrinth ball modelLabyrinth ball model

There are 3 stage There are 3 stage of the ball:of the ball: RollingRolling

We need to find out We need to find out the location, the location, velocity, velocity, acceleration.acceleration.

StableStable When and why it is When and why it is

not rolloing.not rolloing. CrushingCrushing

Collisions detectionCollisions detection

Page 23: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

ChallengeChallenge(Realistic Vs Performance)(Realistic Vs Performance)

In real world:In real world: The movement of The movement of

the ball is curve.the ball is curve. Friction on the Friction on the

wood plate.wood plate. Collisions when ball Collisions when ball

crush the wall.crush the wall. Wood is not Wood is not

“perfectly” hard.“perfectly” hard.

In Computer:In Computer: The movement is The movement is

not curve but close not curve but close to curve if large to curve if large number of time number of time calculation in a calculation in a second.second.

Friction and Friction and Collision detection Collision detection model model development.development.

Page 24: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

Another challenge in Another challenge in developmentdevelopment

How many percentages of the ball, or How many percentages of the ball, or which part of the ball on the hole to which part of the ball on the hole to represent the ball is drop in the hole represent the ball is drop in the hole or just roll around it?or just roll around it?

When the ball is fly over the hole but When the ball is fly over the hole but not drop?not drop?

Page 25: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

References (Physical Model)References (Physical Model) “Approximate and Probabilistic Algorithmn for

Shading and Rendering Structured Particle Systems” in SIGGRAPH 1985 porject

Notes of Physically-Based Modelling for Compsci 777 2004 in University of Auckland http://www.cs.auckland.ac.nz/compsci777s2c/

archive/lectures/Burkhard/777Handout6.pdf Introduction to physically-based animation

http://www.cg.tuwien.ac.at/courses/Animation/http://www.cg.tuwien.ac.at/courses/Animation/I_Physically_Based.pdfI_Physically_Based.pdf

Page 26: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

References (Physical Model)References (Physical Model) Microsoft Flight Simulator Century of Microsoft Flight Simulator Century of

FlightFlight http://www.microsoft.com/games/http://www.microsoft.com/games/

flightsimulator/flightsimulator/ EA - Battlefield 2EA - Battlefield 2

http://www.eagames.com/official/http://www.eagames.com/official/battlefield/battlefield2/us/features.jspbattlefield/battlefield2/us/features.jsp

80’s games in 80’s games in 80s Music Lyrics80s Music Lyrics http://www.80smusiclyrics.comhttp://www.80smusiclyrics.com

Page 27: Labyrinth Zhou Zhen Barry Allison Stephen Kao Rex Ma.

References (Physical Model)References (Physical Model)

PC Hardware: Ageia PhysX InterviewPC Hardware: Ageia PhysX Interview http://www.gdhardware.com/http://www.gdhardware.com/

interviews/agiea/001.htminterviews/agiea/001.htm