Project Number: MXC-1065 Phantasm: a Game Engine A

Total Page:16

File Type:pdf, Size:1020Kb

Project Number: MXC-1065 Phantasm: a Game Engine A Project Number: MXC-1065 Phantasm: A Game Engine A Major Qualifying Project Report Submitted to the faculty of the Worcester Polytechnic Institute in partial fulfillment of the requirements for the Degree of Bachelor of Science by ___________________________ Andrew Zafft Date: Friday, August 22, 2008 __________________________ Professor Michael Ciaraldi, Advisor (This page is intentionally left blank) Abstract A game engine containing OpenGL 1, the Win32 API, C++ and common RPG themes was developed. Research into graphics and physics models was performed and then implemented. Fully customizable graphics, storyline development, and internal objects were created using a model-view-controller architecture. 1 OpenGL® is a registered trademark of Silicon Graphics Inc i Acknowledgements I would to thank Professor Mike Ciaraldi for his time and guidance on this project. Without his efforts this project would not have been as successful as it was. ii Table of Contents Abstract................................................................................................................................ i Acknowledgements............................................................................................................. ii Table of Contents...............................................................................................................iii Chapter 1 Introduction..................................................................................................... 1 1.1 Project Description.............................................................................................. 1 1.2 Goals and Plan of Action.................................................................................... 2 Chapter 2 Research.......................................................................................................... 4 2.1 Games in General................................................................................................ 5 2.2 Programming Video Games................................................................................ 6 2.3 Role Playing Games............................................................................................ 7 2.4 Game Engine Structure & Elements................................................................... 8 2.5 Rendering............................................................................................................ 9 2.6 Animation ......................................................................................................... 11 2.7 OpenGL Programming Language..................................................................... 13 2.7.1 Rendering Pipeline.................................................................................... 15 2.7.2 Selection.................................................................................................... 16 2.8 Physics Modeling.............................................................................................. 17 2.9 Artificial Intelligence........................................................................................ 18 2.10 Win32 API Programming Concepts ................................................................. 19 2.11 Model-View-Controller Architecture ............................................................... 23 Chapter 3 Methodology................................................................................................. 24 Chapter 4 System Design .............................................................................................. 25 4.1 Basic Elements.................................................................................................. 26 4.2 Organizational Structure................................................................................... 29 4.3 User Interface.................................................................................................... 30 4.4 OpenGL Graphics............................................................................................. 32 4.5 Physics Modeling.............................................................................................. 34 4.6 Artificial Intelligence........................................................................................ 35 4.7 Game Elements................................................................................................. 36 4.8 Random Map Generation.................................................................................. 37 Chapter 5 Manual .......................................................................................................... 39 5.1 User Interface & Commands ............................................................................ 39 5.2 Creatures ........................................................................................................... 41 5.2.1 Basic Attributes......................................................................................... 41 5.2.2 Advancement & Experience ..................................................................... 41 5.3 Items.................................................................................................................. 41 5.4 Skills ................................................................................................................. 42 5.5 XML File Usage ............................................................................................... 42 5.5.1 Configuration Files ................................................................................... 43 5.5.2 Object Files............................................................................................... 44 5.5.3 Common Base Objects.............................................................................. 47 5.5.4 Adding New Object Files.......................................................................... 51 Chapter 6 Future Plans .................................................................................................. 53 iii Appendix A UML.......................................................................................................... 54 A.1 Class Models..................................................................................................... 54 Appendix B Use Case Scenarios................................................................................... 60 B.1 User Interface Use Cases .................................................................................. 60 B.2 In-Game Use Cases........................................................................................... 64 B.3 Developer Use Cases ........................................................................................ 76 Appendix C Class Descriptions..................................................................................... 79 C.1 Model................................................................................................................ 79 C.2 View.................................................................................................................. 83 C.3 Controller.......................................................................................................... 90 Appendix D Files........................................................................................................... 92 iv Chapter 1 Introduction Games have existed for as long as human beings have lived. The act of entertaining oneself through exercises that serve primarily for self enjoyment is a purely human trait. Through the years, human beings have raised entertainment to an art form. Video games are the latest evolution of the concept. The power of the computer has allowed entertainment and gaming to be taken to a whole new level. We have new technologies that can expand and develop the gaming experience. Game engines are the core of video games. These pieces of code display the virtual world to the computer screen, capture the frantic mouse clicks and keyboard commands from the user and manage the computer artificial intelligence, all to create an enjoyable experience. Advances in game engines create advances in video games, leading to better and better gaming experiences. In fact, it could be argued that since entertainment is exclusively a human trait, advances in entertainment are actually advances to the human race as a whole. The goal of this project was to expand my own personal understanding of game engines and maybe even advance game engine development. 1.1 Project Description I have created a fully functioning role playing game engine. Its features include allowing future users to easily design and import custom graphics, objects and storyline development into the game. The game engine was developed with C/C++ code and interacts with the OS through the Win32 API. The 3-D graphical portion of the game was written using the OpenGL libraries. The game engine was developed and tested on Windows based systems, specifically in the Windows 2000 and Windows XP 1 environments. The game engine can load game data from several different customizable configuration files that are easy to expand and develop. The game engine is designed for use as a single player game. Character development is in the same spirit as the Diablo™ 2 series. The player's character advances in power as they interact in evermore difficult environments. A system to develop character growth has been partially created, and future version will need to finish and polish these aspects of the game engine. The engine presents
Recommended publications
  • Audio Middleware the Essential Link from Studio to Game Design
    AUDIONEXT B Y A LEX A N D E R B R A NDON Audio Middleware The Essential Link From Studio to Game Design hen I first played games such as Pac Man and GameCODA. The same is true of Renderware native audio Asteroids in the early ’80s, I was fascinated. tools. One caveat: Criterion is now owned by Electronic W While others saw a cute, beeping box, I saw Arts. The Renderware site was last updated in 2005, and something to be torn open and explored. How could many developers are scrambling to Unreal 3 due to un- these games create sounds I’d never heard before? Back certainty of Renderware’s future. Pity, it’s a pretty good then, it was transistors, followed by simple, solid-state engine. sound generators programmed with individual memory Streaming is supported, though it is not revealed how registers, machine code and dumb terminals. Now, things it is supported on next-gen consoles. What is nice is you are more complex. We’re no longer at the mercy of 8-bit, can specify whether you want a sound streamed or not or handing a sound to a programmer, and saying, “Put within CAGE Producer. GameCODA also provides the it in.” Today, game audio engineers have just as much ability to create ducking/mixing groups within CAGE. In power to create an exciting soundscape as anyone at code, this can also be taken advantage of using virtual Skywalker Ranch. (Well, okay, maybe not Randy Thom, voice channels. but close, right?) Other than SoundMAX (an older audio engine by But just as a single-channel strip on a Neve or SSL once Analog Devices and Staccato), GameCODA was the first baffled me, sound-bank manipulation can baffle your audio engine I’ve seen that uses matrix technology to average recording engineer.
    [Show full text]
  • DXF Reference
    AutoCAD 2012 DXF Reference February 2011 © 2011 Autodesk, Inc. All Rights Reserved. Except as otherwise permitted by Autodesk, Inc., this publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose. Certain materials included in this publication are reprinted with the permission of the copyright holder. Trademarks The following are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and other countries: 3DEC (design/logo), 3December, 3December.com, 3ds Max, Algor, Alias, Alias (swirl design/logo), AliasStudio, Alias|Wavefront (design/logo), ATC, AUGI, AutoCAD, AutoCAD Learning Assistance, AutoCAD LT, AutoCAD Simulator, AutoCAD SQL Extension, AutoCAD SQL Interface, Autodesk, Autodesk Intent, Autodesk Inventor, Autodesk MapGuide, Autodesk Streamline, AutoLISP, AutoSnap, AutoSketch, AutoTrack, Backburner, Backdraft, Beast, Built with ObjectARX (logo), Burn, Buzzsaw, CAiCE, Civil 3D, Cleaner, Cleaner Central, ClearScale, Colour Warper, Combustion, Communication Specification, Constructware, Content Explorer, Dancing Baby (image), DesignCenter, Design Doctor, Designer's Toolkit, DesignKids, DesignProf, DesignServer, DesignStudio, Design Web Format, Discreet, DWF, DWG, DWG (logo), DWG Extreme, DWG TrueConvert, DWG TrueView, DXF, Ecotect, Exposure, Extending the Design Team, Face Robot, FBX, Fempro, Fire, Flame, Flare, Flint, FMDesktop, Freewheel, GDX Driver, Green Building Studio, Heads-up Design, Heidi, HumanIK, IDEA Server, i-drop, Illuminate Labs
    [Show full text]
  • An Embeddable, High-Performance Scripting Language and Its Applications
    Lua an embeddable, high-performance scripting language and its applications Hisham Muhammad [email protected] PUC-Rio, Rio de Janeiro, Brazil IntroductionsIntroductions ● Hisham Muhammad ● PUC-Rio – University in Rio de Janeiro, Brazil ● LabLua research laboratory – founded by Roberto Ierusalimschy, Lua's chief architect ● lead developer of LuaRocks – Lua's package manager ● other open source projects: – GoboLinux, htop process monitor WhatWhat wewe willwill covercover todaytoday ● The Lua programming language – what's cool about it – how to make good uses of it ● Real-world case study – an M2M gateway and energy analytics system – making a production system highly adaptable ● Other high-profile uses of Lua – from Adobe and Angry Birds to World of Warcraft and Wikipedia Lua?Lua? ● ...is what we tend to call a "scripting language" – dynamically-typed, bytecode-compiled, garbage-collected – like Perl, Python, PHP, Ruby, JavaScript... ● What sets Lua apart? – Extremely portable: pure ANSI C – Very small: embeddable, about 180 kiB – Great for both embedded systems and for embedding into applications LuaLua isis fullyfully featuredfeatured ● All you expect from the core of a modern language – First-class functions (proper closures with lexical scoping) – Coroutines for concurrency management (also called "fibers" elsewhere) – Meta-programming mechanisms ● object-oriented ● functional programming ● procedural, "quick scripts" ToTo getget licensinglicensing outout ofof thethe wayway ● MIT License ● You are free to use it anywhere ● Free software
    [Show full text]
  • Opera Acquires Yoyo Games, Launches Opera Gaming
    Opera Acquires YoYo Games, Launches Opera Gaming January 20, 2021 - [Tuck-In] Acquisition forms the basis for Opera Gaming, a new division focused on expanding Opera's capabilities and monetization opportunities in the gaming space - Deal unites Opera GX, world's first gaming browser and popular game development engine, GameMaker - Opera GX hit 7 million MAUs in December 2020, up nearly 350% year-over-year DUNDEE, Scotland and OSLO, Norway, Jan. 20, 2021 /PRNewswire/ -- Opera (NASDAQ: OPRA), the browser developer and consumer internet brand, today announced its acquisition of YoYo Games, creator of the world's leading 2D game engine, GameMaker Studio 2, for approximately $10 million. The tuck-in acquisition represents the second building block in the foundation of Opera Gaming, a new division within Opera with global ambitions and follows the creation and rapid growth of Opera's innovative Opera GX browser, the world's first browser built specifically for gamers. Krystian Kolondra, EVP Browsers at Opera, said: "With Opera GX, Opera had adapted its proven, innovative browser tech platform to dramatically expand its footprint in gaming. We're at the brink of a shift, when more and more people start not only playing, but also creating and publishing games. GameMaker Studio2 is best-in-class game development software, and lowers the barrier to entry for anyone to start making their games and offer them across a wide range of web-supported platforms, from PCs, to, mobile iOS/Android devices, to consoles." Annette De Freitas, Head of Business Development & Strategic Partnerships, Opera Gaming, added: "Gaming is a growth area for Opera and the acquisition of YoYo Games reflects significant, sustained momentum across both of our businesses over the past year.
    [Show full text]
  • Sensorfx Users Guide Iii Contents
    SensorFX Users Guide SensorFX Users Guide Copyright © 2017 VT MAK All rights Reserved. Printed in the United States. Portions of this document are copyright JRM Technologies. Under copyright laws, no part of this document may be copied or reproduced in any form without prior written consent of VT MAK. VR-Exchange™, VR-Vantage™. DI-Guy™, and DI-Guy Scenario™ are trade- marks of VT MAK. MÄK Technologies®, VR-Forces®, RTIspy®, B-HAVE®, and VR-Link® are registered trademarks of VT MAK. GL Studio® is a registered trademark of The DiSTI® Corporation. Portions of this software use SpeedTree® RT technology (©2008 Interactive Data Visualization, Inc.). SpeedTree® is a registered trademark of Interactive Data Visual- ization, Inc. All rights reserved. SilverLining™ is a trademark of Sundog Software. All other trademarks are owned by their respective companies. VT MAK 150 Cambridge Park Drive, 3rd Floor Cambridge, MA 02140 USA Voice: 617-876-8085 Fax: 617-876-9208 [email protected] www.mak.com Revision VRV-2.2-11-170307 Contents Preface MAK Products ............................................................................................ v How to Contact Us .................................................................................. viii Document Conventions ............................................................................. ix DI-Guy Conventions ........................................................................... x Mouse Button Naming Conventions.................................................... x Third Party Licenses ...................................................................................
    [Show full text]
  • Arxiv:2104.06262V2 [Cs.RO] 29 Apr 2021 Temporal Development of Actors [64]
    On Determinism of Game Engines used for Simulation-based Autonomous Vehicle Verification Greg Chance1;3, Abanoub Ghobrial1;3, Kevin McAreavey1;3, S´everin Lemaignan2;3, Tony Pipe2;3, Kerstin Eder1;3 1 University of Bristol, Bristol, UK 2 University of the West of England, Bristol, UK 3 Bristol Robotics Laboratory, Bristol, UK Abstract{Game engines are increasingly used as vide evidence to developers and regulators of the func- simulation platforms by the autonomous vehicle tional safety of the vehicle or its compliance with com- (AV) community to develop vehicle control sys- monly agreed upon road conduct [68], national rules [61] tems and test environments. A key requirement and road traffic laws [63] which form a body of safe and for simulation-based development and verification legal driving rules, termed assertions, that must not be is determinism, since a deterministic process will violated. always produce the same output given the same Design confidence is gained when the autonomous ve- initial conditions and event history. Thus, in a de- hicle (AV) can be shown to comply with these rules terministic simulation environment, tests are ren- e.g., through assertion checking during simulation. There dered repeatable and yield simulation results that have been several fatalities with AVs, some of which are trustworthy and straightforward to debug. could be attributed to insufficient verification and val- However, game engines are seldom deterministic. idation (V&V), e.g. [47]. Simulation environments offer This paper reviews and identifies the potential a means to explore the vast parameter space safely and causes and effects of non-deterministic behaviours efficiently [31] without the need for millions of miles of in game engines.
    [Show full text]
  • Release Notes Autodesk® Visual Effects and Finishing 2010 Extension 1 © 2009 Autodesk, Inc
    Autodesk ® Smoke® 2010 Extension 1 A Discreet® Systems product Autodesk ® Backdraft ® Conform 2010 Extension 1 Release Notes Autodesk® Visual Effects and Finishing 2010 Extension 1 © 2009 Autodesk, Inc. All rights reserved. Except as otherwise permitted by Autodesk, Inc., this publication, or parts thereof, may not be reproduced in any form, by any method, for any purpose. Certain materials included in this publication are reprinted with the permission of the copyright holder. Portions relating to MD5 Copyright © 1991-2, RSA Data Security, Inc. Created 1991. All rights reserved. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing this software or this function. License is also granted to make and use derivative works provided that such works are identified as "derived from the RSA Data Security, Inc. MD5 Message-Digest Algorithm" in all material mentioning or referencing the derived work. RSA Data Security, Inc. makes no representations concerning either the merchantability of this software or the suitability of this software for any particular purpose. It is provided "as is" without express or implied warranty of any kind. These notices must be retained in any copies of any part of this documentation and/or software. Trademarks The following are registered trademarks or trademarks of Autodesk, Inc., and/or its subsidiaries and/or affiliates in the USA and other countries: 3DEC (design/logo), 3December, 3December.com,
    [Show full text]
  • Integration of a 3D Rendering Engine with a Physics Simulator
    Universitat de Lleida Escola Politècnica Superior Màster en Enginyeria de Programari Lliure Treball de final de Màster Integration of a 3D rendering engine with a physics simulator Author: Alberto Montañola Lacort Directors: Carlos Ansótegui Gil Juan Manuel Gimeno Illa June 2009 Integration of a 3D rendering engine with a physics simulator Index 1.Introduction.........................................................................................9 1.1.Project Description.......................................................................9 1.2.Project Goals..............................................................................10 1.3.Document structure...................................................................10 2.Definitions, concepts and technology...............................................13 2.1.Definitions..................................................................................13 2.1.1.The scene............................................................................13 2.1.2.Scene Objects......................................................................14 2.2.Technologies...............................................................................18 2.2.1.The rendering engine..........................................................18 2.2.1.1.The rendering process..................................................19 2.2.1.2.Low level programing interfaces...................................20 2.2.1.3.High level programing interfaces..................................21 2.2.2.The input system.................................................................21
    [Show full text]
  • UNIVERSAL REGISTRATION DOCUMENT and Annual Financial Report Contents
    2021 UNIVERSAL REGISTRATION DOCUMENT and Annual Financial Report Contents Message from the Chairman and Chief Executive Offi cer 3 1 Key fi gures AFR 5 6 Financial statements 195 1.1 Quarterly and annual consolidated 6.1 Consolidated fi nancial sales 6 statements for the year 1.2 Sales by platform (net bookings) 7 ended March 31, 2021 AFR 196 1.3 Sales by geographic region 6.2 Statutory Auditors’ report (net bookings) 8 on the consolidated fi nancial statements AFR 262 2 Group presentation 9 6.3 Separate fi nancial statements of Ubisoft Entertainment SA for 2.1 Group business model the year ended March 31, 2021 AFR 267 and strategy AFR DPEF 10 6.4 Statutory Auditors’ report 2.2 History 14 on the separate fi nancial 2.3 Financial year highlights AFR 15 statements AFR 300 2.4 Subsidiaries and equity 6.5 Statutory Auditors’ special report investments AFR 17 on regulated agreements and 2.5 Research and development, commitments 305 investment and fi nancing policy AFR 19 6.6 Ubisoft (parent company) results 2.6 2020-2021 performance review for the past fi ve fi nancial years AFR 306 (non-IFRS data) AFR 21 2.7 Outlook AFR 25 7 Information on the Company 3 Risks and internal control AFR 27 and its capital 307 3.1 Risk factors 28 7.1 Legal information AFR 308 3.2 Risk management and internal 7.2 Share capital AFR 311 control mechanisms 38 7.3 Share ownership AFR 316 7.4 Securities market 321 7.5 Additional information AFR 326 4 Corporate g overnance r eport AFR 45 4.1 Corporate governance 46 8 Glossary, cross-reference tables 4.2 Compensation of corporate
    [Show full text]
  • John Carmack Archive - Interviews
    John Carmack Archive - Interviews http://www.team5150.com/~andrew/carmack August 2, 2008 Contents 1 John Carmack Interview5 2 John Carmack - The Boot Interview 12 2.1 Page 1............................... 13 2.2 Page 2............................... 14 2.3 Page 3............................... 16 2.4 Page 4............................... 18 2.5 Page 5............................... 21 2.6 Page 6............................... 22 2.7 Page 7............................... 24 2.8 Page 8............................... 25 3 John Carmack - The Boot Interview (Outtakes) 28 4 John Carmack (of id Software) interview 48 5 Interview with John Carmack 59 6 Carmack Q&A on Q3A changes 67 1 John Carmack Archive 2 Interviews 7 Carmack responds to FS Suggestions 70 8 Slashdot asks, John Carmack Answers 74 9 John Carmack Interview 86 9.1 The Man Behind the Phenomenon.............. 87 9.2 Carmack on Money....................... 89 9.3 Focus and Inspiration...................... 90 9.4 Epiphanies............................ 92 9.5 On Open Source......................... 94 9.6 More on Linux.......................... 95 9.7 Carmack the Student...................... 97 9.8 Quake and Simplicity...................... 98 9.9 The Next id Game........................ 100 9.10 On the Gaming Industry.................... 101 9.11 id is not a publisher....................... 103 9.12 The Trinity Thing........................ 105 9.13 Voxels and Curves........................ 106 9.14 Looking at the Competition.................. 108 9.15 Carmack’s Research......................
    [Show full text]
  • Mathengine Karmatm User Guide
    MathEngine KarmaTM User Guide March 2002. Accompanying Karma Version 1.2. MathEngine Karma User Guide • MathEngine Karma User Guide Preface 7 About MathEngine 9 Contacting MathEngine 9 Introduction 1 Historical Background 2 Application to entertainment 2 Physics Engines 3 Usage† 3 The Structure of Karma 5 Overview 6 Karma Simulation 6 The Karma Pipeline 8 Karma Data Structures 11 Implementation of the Pipeline 13 Two Spheres Colliding 16 AABBs do not overlap. 16 AABBs overlap, but the objects do not. 16 The AABBs overlap and the spheres touch. 17 The AABBs overlap, but the spheres are not touching as they move away. 18 AABBs do not overlap as the spheres move away from each other. 18 Dynamics 21 Conventions 22 The MathEngine Dynamics Toolkit (Mdt) 24 Designing Efficient Simulations Using the Mdt Source Code 25 Designing Efficient Simulations Using the Mdt Library 25 Rigid Bodies: A Simplified Description of Reality 25 Karma Dynamics - Basic Usage 28 Creating the Dynamics World 28 Setting World Gravity 28 Defining a Body 28 Evolving the Simulation 29 Cleaning Up 30 Evolving a Simulation - Using the Basic Viewer Supplied with Karma 30 The Basic Steps Involved in Creating a Karma Dynamics Program 31 Constraints: Joints and Contacts 33 Degrees of Freedom 33 Joint Constraints and Articulated Bodies 33 Joint Types 34 Constraint Functionality 34 Constraint Usage 36 Joints 36 Contact Constraints and Collision Detection 42 Further features 44 Automatic Enabling and Disabling of Bodies 44 The Meaning of Friction, Damping, Drag, etc. 44 Simulating Friction 46 Slip: An Alternate Way to Model the Behavior at the Contact Between Two Bodies.
    [Show full text]
  • Kynapse User Guide
    SDK Release 3.8 Published Friday, June 24, 2005 Copyright © 2000-2005 Kynogon S.A. All rights reserved. Kynapse powered by Kynogon SDK Contents Kynapse User Guide 5 Introduction 6 Getting started 7 What is Kynapse? 8 Purpose of Kynapse 9 Design philosophy 10 Kynapse specs 11 Using this documentation 13 Typographic conventions 14 Finding information 15 Programming Guide 16 Kynapse 3.7 to Kynapse 3.8 migration guide 17 Getting started with Kynapse 18 Fundamental principles 19 Behaviors 20 How behaviors are generated 21 Kynapse architecture 22 Architectural overview 23 Kynapse layout 25 Simulation engine integration 26 Main objects 27 AI engine 28 AI world 29 Entities and entity attributes 30 Actions and action attributes 32 Brains 33 Agents 35 Services 36 Teams 38 Pathfinding constraints 39 Pathfinding heuristics 40 Pathobjects 41 Main data structures 43 Resources data structures 44 PathData 45 Pathways 47 Configuration data structures 48 AI engine configuration parameters (CParamBlock) 49 AI world definition 50 Entity definition 51 Core management 52 Time management 3 Kynapse powered by Kynogon SDK Exact time measurement 55 Deterministic time measurement 56 Time management sample code 57 Memory management 59 Object management 62 Data management 63 Initializing, updating and terminating Kynapse 65 Overview 66 Initializing Kynapse 67 Updating Kynapse 69 Terminating Kynapse 70 Kynapse coordinate system 71 Using Kynapse standard components 72 Creating and customizing Kynapse components 73 Configuring Kynapse 74 Generating pathdata 75 Common topics 76 Integration helpers 77 Tools 78 Reference 79 Glossary 4 Kynapse powered by Kynogon SDK Kynapse user guide Welcome to the Kynapse 3.8 user guide (online LIMITED version)! New to Kynapse? If you're new to Kynapse you should start reading: • The introduction (p.6).
    [Show full text]