Version 4.0 ...The Smart Can Give You Solutions
Total Page:16
File Type:pdf, Size:1020Kb
version 4.0 ...the smart can give you solutions, ...the intelligent can give you answers, ...but, alas, the wise can only give you questions. Table of Contents About the author.........................................................................................................................................5 About this document...................................................................................................................................6 License........................................................................................................................................................6 Design.........................................................................................................................................................6 Acknowledgments......................................................................................................................................7 Introduction.................................................................................................................................................8 Source code...............................................................................................................................................9 Chapter 1: Theory.....................................................................................................................................10 What is a game?.........................................................................................................................................10 So what are video games then?..................................................................................................................10 How a videogame is created......................................................................................................................10 2D graphic design......................................................................................................................................12 3D graphic design......................................................................................................................................13 Audio design..............................................................................................................................................14 So many tools and so little time!................................................................................................................14 Game programming...................................................................................................................................15 The most important component to include in your video game: FUN!......................................................16 Chapter 2: Decision time..........................................................................................................................17 What programming language should I use for my game?..........................................................................17 Game engines............................................................................................................................................18 DirectX (Direct3D) versus OpenGL..........................................................................................................21 Final recommendations..............................................................................................................................22 My (very) own personal decision .............................................................................................................22 Chapter 3: Making a 2D game.................................................................................................................24 Computer game flow.................................................................................................................................24 Setting up the development environment...................................................................................................25 Making a puzzle game with GTGE............................................................................................................25 Chapter 4: Making a 2D multiplayer game...............................................................................................33 Networking basics.....................................................................................................................................33 Game server...............................................................................................................................................35 Puzzle game - multiplayer version.............................................................................................................35 Chapter 5: 3D games...............................................................................................................................39 3D basics...................................................................................................................................................39 Chapter 6: Making a 3D game.................................................................................................................43 Step 1: Prepare an empty screen................................................................................................................45 Step 2: Loading a map...............................................................................................................................46 Step 3: Moving around the map.................................................................................................................47 Step 4: Checking collisions........................................................................................................................47 Step 5: Adding the apple............................................................................................................................48 Step 6: Game Loop....................................................................................................................................48 Step 7: Final version of the game..............................................................................................................50 Chapter 7: Making a 2D multiplayer game - version 2.............................................................................53 A better network library.............................................................................................................................53 Why UDP?................................................................................................................................................54 Adding the ummi network library to the puzzle game...............................................................................54 Chapter 8: Making a 3D multiplayer game...............................................................................................58 Apple Chase - multiplayer design..............................................................................................................58 Making some improvements to our 3D game............................................................................................58 Adding server-side game logic..................................................................................................................59 Updating the game client...........................................................................................................................60 What's next?.............................................................................................................................................65 Appendix A: Extra Resources...................................................................................................................66 Library.......................................................................................................................................................66 Resources..................................................................................................................................................69 Appendix B: How to setup Slick framework with Eclipse.........................................................................71 Appendix C: How to setup GTGE inside Eclipse IDE..............................................................................79 Appendix D: How to setup Xith3D inside Eclipse IDE..............................................................................82 Installing the support libraries...................................................................................................................82 Adding Xith3D’s own files........................................................................................................................83 Adding the native libraries.........................................................................................................................84 Making sure Xith3D is installed correctly.................................................................................................86 Appendix E: Xith3D scenegraph..............................................................................................................87 Lucu guide for creating videogames – page 4 About the author Henry Tong (a.k.a. “Taksan”) is a software architect, who, as part of his job has used different computer technologies (not all of them voluntarily) in different software development projects. When he is not creating software for a bank or an enterprise