Presentation is loading. Please wait.

Presentation is loading. Please wait.

Princípios de Implementação de Jogos com Modelos 3D em C++ Marcelo Johann II Semana de Tecnologia Departamento de Tecnologia da UNIJUÍ

Similar presentations


Presentation on theme: "Princípios de Implementação de Jogos com Modelos 3D em C++ Marcelo Johann II Semana de Tecnologia Departamento de Tecnologia da UNIJUÍ"— Presentation transcript:

1 Princípios de Implementação de Jogos com Modelos 3D em C++ Marcelo Johann II Semana de Tecnologia Departamento de Tecnologia da UNIJUÍ

2 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 2 Outline for Introduction Introduction - how games evolved? Motivation - why teaching games? Goals - what to get from the course? Methodology - whats gonna happen here? Background - what are you expected to know? Infrastructure - HW and SW that we need… Interaction - Keep questioning me… Contents…

3 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 3Introduction Back to the 80s… http://www.mobygames.com/game/shots/gameId,575/ Moon Patrol Galaga http://spacemul.emu- france.com/screen.php3?id=13&lettre= G&lang=eng

4 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 4Introduction 1986: first 3D games appearing… http://spacemul.emu-france.com/screen2.php3?id2=14687&lang=eng Alien 8

5 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 5Introductionhttp://www.rottentomatoes.com/g/pc_games/half_life_2/images.php And today… Half Life 2

6 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 6Introductionhttp://www.mobygames.com/game/shots/p,3/gameId,3758/ Mobil 1 British Rally Championship

7 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 7Introduction Evolution of computer games From 1D, 2D to complex 3D universe Needs: hardware, software, artwork Trends: Continuous hardware evolution Engines - higher abstraction levels Professional programming techniques Extensive visual work -> $$$

8 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 8Motivation Computing requires Programming Learning how to program is not simple Difficulty to begin and to be professional time, interaction, experience Need for problems that justify complex programming languages and techniques Games: lot of fun and learning potential

9 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 9Goals Learning and Practicing Object-Oriented Programming – Professional C++, modular, O-O Learning technologies for the development of games that use 3D models – Engines, 3D modeling – Game architecture and timing – Game techniques with many other applications

10 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 10Methodology Hands-on based on step-by-step examples Test/Ask about everything At the beginning: – No class definitions! – Avoid using complex C++ constructions; – Emphasis on productivity Complexity is introduced when required

11 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 11Background Structured programming C language Basic data structures Not necessary: – experience on C++ programming – advanced computer graphics Ask about peoples background Should ask anything that you dont know!

12 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 12Infrastructure Fast computer with: OpenGL, Accelerated graphic card Linux with gcc, g++, make (Mac OS X now) Gizmo3D http://www.tooltech-software.com/ Crystal Space http://sourceforge.net/projects/crystal Open Dynamics Engine http://ode.org

13 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 13 Outline for Contents Introduction Main engine - Gizmo3D structure and start up 3D modeling - from triangles to transforms Events - how to read keyboard input Logic - game actions and control Simulation loop - structure, moves, timing Terrains and LODs - levels of detail Animation / levels - frame, skeleton concepts Collision and Physics - world behavior Things that we did not consider…

14 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 14 Main Engine Gizmo3D Features Tutorial slides: * skip gzApplication methods and task * skip gzGeometry and gzTransform * stop at the Expanding Scene start with exe00 Essential constructions of O-O Object *pt = new Object(...); – Just Object *pt = new Object(...); result = pt -> method(...); – And result = pt -> method(...);

15 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 15 3D Modeling Surfaces Triangles - the easiest way * exe01 Material Lighting * http://www.xmission.com/~nate/tutors.html * exe02 and exe03 * slides Gizmo Material

16 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 16 3D Modeling Texture * gizmo databases * exe04 to exe11 (0,0) (1,0) (0,1) (1,1)

17 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 17 3D Modeling Transformations * gizmo slides 66 to 76 * exe12 to exe14 Cloning * exe15 Groups * exe17 a exe19 Billboard * gizmos billboard and my tests

18 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 18 Control Events O-O * exe20 to exe21 app->run and onTick * gizmo slides 29 a 36 * exe22 app->run and onIdle onTick and onIdle have to call refreshWindow

19 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 19 Logic of the Game Logic Model may be different from 3D First City * exe25 Estoque: Sokoban * estoque Network * show socketControl in drive44

20 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 20 Simulation Loop void MyApp::onIdle() { if(m_win->m_key_left_is_down) car1->changeDirection(-1,m_win->getFrameRate()); if(m_win->m_key_right_is_down) car1->changeDirection(1,m_win->getFrameRate()); if(m_win->m_key_up_is_down) car1->speedup(1.3f); if(m_win->m_key_down_is_down) car1->slowdown(1.3f); car1->move( 1, m_win->getFrameRate()); car2->move(m_win->getFrameRate()); car3->move(m_win->getFrameRate()); cam->move(m_win->getFrameRate()); m_win->refreshWindow(); } Drive exe44

21 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 21 Playing with Models Take drive44 Take models from: www.3dtotal.com * sofa.3ds * speedboat.3ds * chevi_camaro.3DS * tiebomber.3ds

22 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 22 Terrain and LOD terrain.txt of the drive44 Window * gizmos window shows LOD Other example is broken (62)

23 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 23 Animation and Levels Frame Animation Map file of Crystal Space Flying Brick (exe57) Crystal Space map file

24 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 24 Skeleton Animation Types of Joints Open Dynamics Engine

25 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 25Animation Character Lara Croft http://www.3dkingdom.org

26 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 26 Frame sequences Pony Tail with a math model Animation Control

27 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 27Collision gzIntersector intersect(stuff,…) getResults

28 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 28Collision Car corners Simple Geometry

29 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 29Collision To collide is hard To know what to do next is even harder

30 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 30Collision stairs and floor vertical versus horizontal

31 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 31Physics How about collision with other objects? This is very hard to handle… Model what happens in a physical system * example odetest - from ODEs test_buggy

32 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 32Missing Sound Animation Control Explosions, particles Artificial intelligence Other Engines and Game Resources: www.3dlinks.com

33 UNIJUÍ 2004 - Marcelo Johann – Mini Curso de Games : 33 Thanks to PUCRS - Uruguaiana Marcus Kindel (kindel@pucrs.campus2.br) Cintya Bortolazzo UFRGS - Computação Gráfica Luciana Nelel (www.inf.ufrgs.br/~nedel) luque@inf.ufrgs.br, pelo ODE Gizmo3D & game community Anders Modén (anders.moden@sts.saab.se) Esteban G. Clua (esteban@inf.puc-rio.br)

34 Thank you! Marcelo Johann johann@inf.ufrgs.br www.inf.ufrgs.br/~johann Princípios de Implementação de Jogos com Modelos 3D em C++ II Semana de Tecnologia Departamento de Tecnologia da UNIJUÍ


Download ppt "Princípios de Implementação de Jogos com Modelos 3D em C++ Marcelo Johann II Semana de Tecnologia Departamento de Tecnologia da UNIJUÍ"

Similar presentations


Ads by Google