Game Engines D&P Apis and Sdks

Game Engines D&P Apis and Sdks

Stéphane GOBRON HES-SO – HE-Arc v.2014 Game technologies Game Engines Content Game engines (GE) . Game engines (GE) definition and purpose . Roll-your-own GE - GE dev. design - GE APIs . Mostly-ready GE . Point-and-click GE Today’s main keywords Game engines definition and purpose . Definition . GE purpose . One exception not to use a GE . GE includes . Game development . APIs and SDKs . List of GE . Types of GE Engines are powerful Interaction Explain how your GE help Game engines D&P From… …with… Definition . Game engine (GE) . Def: System designed for video games dev. Most are designed for video game consoles or PCs …to: / http://masseffect.bioware.com Game engines D&P GE purpose Here is the question you must ask yourself: Why pay… . …six programmers… . …for a year… . …to build an engine... …when you can… . …buy 90% of the features… . …from a proven technology… . …for less money… . …and have it NOW ?! E.g. of ref: Jason Gregory. Game Engine Architecture. AK Peters. ISBN 978-1-56881-413-1. Game engines D&P One exception Study hard, really, really hard…! « My 11 yo son likes very much video games and he can draw very well. How can he learn to develop his own GE?» Or «Is it possible not to use GE of any kind and to start from scratch?» Well … I dont’ think so . The exception been… …learning how hard it is Game engines D&P GE includes multiple engines Libs - Sound . Two main engines - Scripting - Animation - Rendering engine, for - Artificial intelligence 2D and/or 3D graphics - Networking including music and - Streaming sound effects - Memory management - Threading - Physics engine - Localization support - Scene graph . And many libraries! Game engines D&P Game development Game ecology in game development . Games are complex Game Recycling is surviving bricks . Recycling code! . By reusing/adapting GE to create dif. games reusable components http://www.gamecareerguide.com/features/529/what_is_a_game_.php Game engines D&P Game spec. Player Game A.I. GE complexity rendering mechanics cameras specific . An architecture that Front end Gameplay foundations Subsystème can be sorted in layers Game Visual effets Scene graph / culling Skeletal Online Audio optimizations animation multi-player Human Low level rendering Profiling & Collision & interface debugging physics device Resources: game assets e.g. 3D model and animation resources Core systems e.g. curves and surface lib Platform independence layer e.g. network (e.g. UDP/TCP) 3rd party SDKs e.g. OpenGL, Boost++ Operating System layer e.g. Win8 Driver & hardware layers Game engines D&P - full architecture, part I Game engines D&P - full architecture, part II Game engines D&P APIs and SDKs Unreal Engine API . Application Programming Interface software interfaces e.g. DirectX, OpenGL . Software Development Kit collection of libraries Unreal . Most GE have both Engine SDK concept Game engines D&P List of GE . Quite a lot indeed See Wiki . Development or pluggings Most are in C/C++ (80%)… At least 65 http://en.wikipedia.org/wiki/List_of_game_engines Game engines D&P Roll-your-own? Types of GE . Many different types . Many levels of programming expertise . Three categories OpenGL - Roll-your-own GE low level - Mostly-ready GE mid level -Point-and-click GE high level Unreal engine Re/use powerful tools? Roll-your-own GE Low level game engine development . Advantage / disadvantage . Usefull prerequested . A. Game engine design The realm of “do it yourself” Event base prog […] . B. APIs DirectX, Open GL […] Roll-your-own sushi… In 3D! Interaction Find some advantages of the roll-your- own GE Roll-your-own GE Advantage / disadvantage . Plus Master everything If not… No software cost Can reach very low level . Minus Require to know/master Must master all aspects involved in - game engine design your game - CG fundamentals experienced programmer “impossible” for big size game development Roll-your-own GE Usefull prerequested . Math Linear algebra Matrices Dif. equations . CS Master a C like language Real-time algorithm Computer graphics AI - 3d System & networks - Multimedia unbelievable HW & device - 763746452 - i - these - drawn . Design/art - 2D & 3D drawing skills actually - are - . Useful option gizmodo.com/wow drawings Liking coffee http:// Roll-your-own GE a. GE development design . The realm of “do it yourself” . Even-based prog . User and system events . Event capture . Callback abstraction . Event management . Real-time loop . Lag and latency . Multi-tasks Game development is not that easy… Roll-your-own GE a. GE dev. design The realm of “do it yourself” . Do it yourself, but not - yourself from scratch!!! - it - do - great . Experienced - programmer only . Potential to achieve …specific… …but efficient… try.html - to - …renderings www.modernisticmama.com/2012/08/4 http:// games . Going deep into “Mom! I made my own Angry Shaders and HW birds game!” . Even artistic rendering Roll-your-own GE a. GE dev. design Even-based prog . Event driven programming System behavior Initialize triggered by events User Does Something or . Event sources Timer Goes Off 1. User 2. System System Updates Roll-your-own GE a. GE dev. design 1. User events Multi-player FPS manage large amount . The OS handles events of user events Hardware interruptions Send to event queue Available to program . Application decides how to use events . APIs can manage events for the program Roll-your-own GE a. GE dev. design 2. System events . From system timer events . Application requests notification at future time . Possible semantic: guarantee arrival before the date fixed after arrival but as soon as possible at the precise moment . App. not interrupted System must often manage a lot of event types must fetch events Roll-your-own GE a. GE dev. design Event capture while ( true ) if ( e = checkEvent() ) . Waiting for switch ( e.type ) … the active events do more work… . "windowing systems" Looking for event provide a function- blocking wait events e = nextEvent(); switch ( e.type ) . Wait / block { case ENUM_1: . Coupling with timers break; case ENUM_2: break; … … default: … Event effects } Roll-your-own GE a. GE dev. design Callback abstraction . Applications register defining treatments to be associated with each event . Correspondence table: Events - Callback . Widely used in GUI "When this button is clicked, call this method” Degree of abstraction . Some systems offer methods "catch-all" Roll-your-own GE a. GE dev. design Real-time loop . Game “heart” . Pace: #of executions /s . called "frame rate” while ( true ) . fps 1. process events “frames per second” 2. update game world 3. render . Not to be mixed with First Person Shooter! Roll-your-own GE a. GE dev. design Latency computation Lag and latency . Latency: time between Process input user action and Frame Event displayed result time Update state time . High latency : Render loss of causality loss of control Process input death of gameplay!!! Lag Frame Update state . Variance in latency time User can adapt to 2 Render lagmax Constant latency fr Not to variable latency Process input 1.5 Up to 300ms? lag Frame average fr . Feeling of being drunk time … Roll-your-own GE a. GE dev. design Multi-tasks . Important: reduce latency between action and consequences at user’s level loop input / rendering must be optimum latency between actions and conse- quences can be larger time between action and reaction time to change animation sequence Latency can kills game play in action game => break in presence “BIP” issue Roll-your-own GE b. APIs . DirectX . OpenGL GLSL . Comparing both APIs . Hardware management . Coordinate systems . Shaders Some choices are difficult Interaction Who . Knows OpenGL . Developped with Direct-X Difference? Roll-your-own GE b. APIs Direct X . API: Microsoft «Direct3D» . Lower layer of XNA - see next section . Language: C / C++ . C# version => XNA . Major components - DirectDraw - 2D Graphics - Direct3D - 3D Graphics - DirectSound - 2D Sound - DirectSound3D - 3D Sound http://www.d-silence.com/feature.php?id=254&pn=1 - DirectMusic – Music - DirectPlay - Network/Multiplayer - DirectInput - Input Devices Roll-your-own GE b. APIs OpenGL . Open and «free» OpenGL . Cross-platform Rendering Pipeline . Language: C The blue boxes are . OpenGL extensions programmable shader and methods: stages Documented But patented!! . E.g. Mesa 3D Learning OpenGL? http://nehe.gamedev.net/ www.opengl.org/wiki/Rendering_Pipeline_Overview https:// Roll-your-own GE b. APIs WebGL HTML5 + OpenGL . Any browser . Any platform . Any OS . No compilation . No plugins . Free . Difficulties HTML + JS + CSS + OpenGL Shader M. Gutierrez Gobron,S. , Language Experienced programmers pratique la par WebGL Roll-your-own GE b. APIs Comparing both APIs . Both render 2D and 3D computer graphics . Direct3D designed to Direct3D OpenGL virtualize 3D hardware interfaces Platform Microsoft Windows Cross-platform . OpenGL designed to Mobile OpenGL for Embedded Direct3D Mobile be a 3D hardware- Platforms Systems, OpenGL ES accelerated rendering Open source or system License Proprietary trademark Roll-your-own GE b. APIs Comparing both APIs Hardware management . Direct3D: developer must manage hardware resources Easy implementation Allow flexibility to allocate resources . OpenGL manage hardware for you . Especially if using GLSL Roll-your-own GE b. APIs Comparing both APIs Coordinate system . OpenGL Right-handed 3D coord. system . Direct3D Left-handed 3D coord. system OpenGL Direct3D – DirectX right-handed left-handed Cartesian

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    55 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us