COMP 8045 Major Project Proposal 1 COMP 8045 Major Project Proposal (9 Credits) Creating Fluid and Immersive Play Experience using Affordable VR Technologies (Revision 1) Student Name STUDENT ID British Columbia Institute of Technology BTECH Games Development 8H Instructor: Elsie Au CRN: 78017 Feb 12, 2016 COMP 8045 Major Project Proposal 2 Table of Contents Developer Profile ............................................................................................................................ 3 Project Description .......................................................................................................................... 4 Technical Challenges and Considerations ...................................................................................... 5 Project Scope and Depth ................................................................................................................. 8 Test Methodology ........................................................................................................................... 9 Development Approach ................................................................................................................ 11 Technical Innovations ................................................................................................................... 13 High-Level System Diagram ........................................................................................................ 16 Estimated Timeline ....................................................................................................................... 17 Deliverables .................................................................................................................................. 20 Learning Goal ............................................................................................................................... 21 Appendix A: Revision Log ........................................................................................................... 23 Revision 1 (Feb 12, 2016) ......................................................................................................... 23 COMP 8045 Major Project Proposal 3 Developer Profile Student Name is a tech support agent and a part-time game developer whose former employers include PICA Corporation, NCIX, and Magellan Interactive Software. His work entailed system programming, troubleshooting and user administration. At NCIX, Student was a senior technician in a small team responsible for product testing, repair and customer support. Being a computer hobbyist since young age, Student has taken part in the development of various free and commercial games on platforms such as the Turbografx 16, Game Boy Advance, the Nokia N-Gage and the PC. He was a member of the MAME arcade preservation project and has emulated over 50 classic video games. Outside of computer technologies, Student has particular interests in history, literature, cinema and music which give him a keen sense in theatrical art that he is eager to incorporate into games development so as to offer the players fun, meaningful and memorable experiences. His current enrollment in BCIT’s BTECH Games Development program is major career decision to become a professional game developer. The prototype created in this practicum project will become a prominent part of his portfolio and be presented to prospective employers and game publishers including Microsoft Canada, EA Canada, Sega USA and Sony Computer Entertainment in San Mateo, California with which the developer has personal or business contacts. COMP 8045 Major Project Proposal 4 Project Description A 3D action game will be specifically designed to take advantage of the latest entry-level virtual reality technologies. The developer has chosen Microsoft Windows and Google’s Android OS to be the project’s primary platforms because of their cost-effectiveness and accessibility to both the users and the developers. This project has three main goals: 1. To develop a full-feature VR game for mainstream mobile devices by utilizing their built- in motion sensors 2. To achieve console-level performance and immersive gameplay previously unseen in mobile games 3. To identify the best practices / hidden pitfalls in VR games development and establish a guideline for future commercial projects. The Unity 3D engine and the Google Cardboard SDK will be used as a hardware abstraction layer to simplify cross-platform development whereas all the game’s features and logics will be implemented in C# without using third-party libraries. Development is expected to be challenging in the early stages due to the developer’s inexperience in the new toolchain and development environment. Moreover, the customers’ reception is uncertain as the level of interest in virtual reality gaming among the target audience, female and young gamers, has not been thoroughly studied. COMP 8045 Major Project Proposal 5 Despite the foreseeable challenges, the developer trusts that the efficiency of the new tools and a clean architectural design can help the project achieve the target performance required to create a smooth and unique VR experience. Apart from high performance and advanced visual, the importance of traditional game design such as strong narrative and interactive gameplay will be emphasized in this project. Technical Challenges and Considerations The developer’s previous Android project Space Debris was completed for COMP 4900 in the summer of 2014. The game was a space combat simulator written in Java and OpenGL using the standard Android SDK. While the testers were generally impressed by the game’s audiovisual presentation, they found the game’s performance inconsistent, which led to difficulties in controlling the player’s ship. The game ran smoothly at 30 frames per second on a Samsung Galaxy Note 3 but suffered from lengthy startup delays caused by excessive garbage collection. On an institute-provided Asus Nexus 7, the game could barely maintain 15 frames per second, which was inadequate for a high-speed simulation game that emphasized on quick actions and responses. COMP 8045 Major Project Proposal 6 A VR application requires stereoscopic rendering in a field-of-view of approximately 120 degrees for each eye and proper lens curvature compensation to be viewed correctly. Even though the Google VR SDK is able to configure the correct projection and filtering parameters for the programmer, stereoscopic rendering still generates twice the number of GPU draw calls, vertex operations and post-processing passes. The heavy GPU load represents a major hurdle in VR development as the frame rate of a VR application must remain as high as the hardware permits to avoid causing the users physical discomfort and breaking the realism of the simulation. Unlike 3D movies which are non-interactive and non-GPU-intensive, VR games pose several new technical challenges. For example, a VR game must process motion-based input with minimal latency, render 3D graphics at the highest resolution and refresh rate, offer the user maximal interactive freedom, simulate convincing entities and environments and offer the player interesting gameplay and challenges. The tasks can be demanding on powerful PC’s and are daunting on ordinary mobile devices. In spite of the apparent difficulties, smartphones and tablets are today’s most popular computer devices that have the potential to become legitimate VR gaming platforms. This project is an endeavor to show that, with the correct programming techniques and development tools, not only is VR gaming possible on generic mobile devices, it can provide the quality and play experience comparable to those in console games. COMP 8045 Major Project Proposal 7 Due to the fact that the developer’s previous Android development approach is unlikely to meet the code performance required by the project, new development models have been investigated and narrowed to two possible solutions: Google’s Android Native Development Kit (NDK) and Xamarin’s Mono SDK for Android. The first candidate Android NDK allows programs written in Java to link with C/C++ objects at runtime dynamically. Considering C/C++ has the level of performance comparable to assembly language and that the developer has more game programming experience in C/C++, the Android NDK is a reasonable choice. The biggest issue with the Android NDK is that although C/C++ may yield satisfactory performance, the NDK lacks several Android API functions and is no longer recommended or actively supported by Google as the primary development environment (Google, n.d.). Alarmingly, the NDK approach also requires direct interfacing with the Android operating system. Unless the developer is given the resource to maintain multiple hardware bridges for every Android system update in the future, the project will be restricted to one specific OS version and locked inside the Android ecosystem, which defeats the idea of cross-platform development. Therefore, the developer has elected to develop the game using Xarmarin’s Mono SDK and the Unity 3D engine to maximize development efficiency and portability albeit not reaching C/C++’s level of performance. COMP 8045 Major Project Proposal 8 Project Scope and Depth An inexpensive and accessible VR platform game High-performance and polished presentations Accurate head tracking and precise input handling Simultaneous keyboard, mouse and gamepad support Simple controls that require minimal learning Non-violent gameplay that allows the players to learn at their own paces Carefully designed puzzles that encourage longitudinal thinking Competitive AI that offers real challenges and excitement Fine-tuned physics that suits the game’s cartoony style Bright and colorful graphics that appeals to both male and female players Imaginative and distinctive level designs Whimsical and likable characters Fluid character motions and animation Memorable and interactive background music Rich and rhythmic sound effects A good-natured heroine with whom the player can identify A narrative that is easy to follow An emotional and satisfying conclusion Time competitions that can extend the game’s re-playability. COMP 8045 Major Project Proposal 9 Test Methodology Due to the lack of dedicated QA testers, the project will rely heavily on code-driven test tools and methods. The Unity 3D engine offers third-party test packages, but the packages are generally quite large in size and are only practical for games that take full advantage of the engine’s high-end features. Since the project will only make use of the engine’s hardware interface, the most suitable test approach is to make the test functions internal to the code so that compile time and external dependencies can be minimized. On the other hand, the project will make use of Unity 3D’s built-in profiler as the primary performance measuring tool. Since the project has limited time and budget, the developer will not adopt a test-driven methodology and create test classes prior to implementing the game’s features. In contract, sample inputs will be generated programmatically to unit-test each major feature upon its completion to ensure its functionality and compatibility before development efforts are committed to the next feature. COMP 8045 Major Project Proposal 10 Debugging logs, inline assertion points and on-screen feedbacks have been some of the most dependable and tried-and-true test methods in video games development; as such, the project will continue to employ these utilities. In a fast-paced action game where several interactive components and AI entities are being updated in real-time, it is not always possible to stop the action, trace the call stack and inspect each object one by one. Instead, the project will utilize debugging logs, run-time exceptions and graphical indicators to keep track of program states and sensitive variables deep inside the game’s logic to guarantee correctness before the tiniest mistakes such as memory leaks and floating-point precision errors can accumulate and turn into severe problems. In addition to performing internal testing upon each module’s completion to root out the flaws in program design or implementation, the developer will conduct continuous user acceptance tests throughout the project’s development cycle by working with a focus group composed of the project’s target demographic to make sure that the game will be fully playable, error-free and enjoyable in its final release. COMP 8045 Major Project Proposal 11 Development Approach This VR game development project will be programmed in C# using Xarmarin’s Mono SDK for Android. Even though Mono’s C# compiler will not offer the same level of performance as native C/C++ programs, its strength lies in cross-platform development where applications developed with the framework can be ported to a wide variety of desktop and mobile architectures. The Mono C# compiler is a virtual machine that behaves similarly to the .Net framework CLR and the Java runtime. Public benchmarks have shown that Mono’s C# execution engine is slightly slower than Java in mathematical operations. In contrast, Mono is more memory efficient. The developer realizes from past experience that main memory usage and GPU asset management are attributed to the most serious performance bottleneck in 3D games. The developer will monitor the game’s memory footprint and GPU draw calls vigilantly to maximize hardware resource efficiency which is critical to mobile games. Hence, the Mono runtime’s memory efficiency and the Unity engine’s GPU batching service are the characteristics that will lend well to the project’s fundamental design. Furthermore, the Mono SDK supports popular platforms where Java is unavailable such as Apple’s iOS, Sony’s PlayStation 4 and Microsoft’s Xbox One. Having weighed the advantages and the disadvantages of the Android NDK and the Mono SDK, the developer opted for Mono in favor of development speed and portability. COMP 8045 Major Project Proposal 12 The VR game created from the project will be tested extensively on Android devices of different specifications and sizes coupled with inexpensive cardboard VR headsets and other mid-range VR headsets for smartphones under USD 60. The project’s goal is cost-effectiveness, and the Android-based combination is currently the most affordable VR solution ideal for product prototyping. While turning smartphones into VR gaming platforms is a cost effective solution, the approach has its shortcomings. One of the biggest drawbacks of using a smartphone as stereoscopic display is that the phone’s primary input device, the touch screen, becomes inaccessible to the user. To overcome this limitation, the hardware setup will include an external wireless game controller in tandem with the player’s natural head movement to navigate the player’s avatar across the maps. The project will appeal to a wide audience including PC users. Alongside mobile android devices, the game will be compiled and tested on regular Windows PC’s in anticipation of the upcoming advanced VR headsets like the Oculus Rift and the HTC Vive. Time permits, the project may support the Mac OS/X in the wake of Apple’s foray into the VR market. COMP 8045 Major Project Proposal 13 Technical Innovations This project is exploratory in nature as the developer has no former training in VR games development. The smartphone-based VR solution was first introduced at the Google I/O event in June 2014, and the technology is still in its infancy. Documentation and code examples of VR applications development are scarce, and hence some of the project’s approaches are deemed experimental and could be unfruitful. One year ago, mainstream smartphones were incapable of running VR applications at a comfortable resolution and frame rate. Even today, a top-of-the-line smartphone is required to run VR games at an adequate performance. The project’s highlight is to maintain the highest possible frame rate on mid-range Android smartphones at 60Hz while achieving commercial-level visual fidelity and providing solid, fast-paced gameplay. The developer has sampled 11 popular VR games for Android smartphones from rollercoaster simulators to hurdle runs and hunted house adventures. None of the tested games was able to provide the level of presentation fluidity and gameplay interactivity desired by the developer on the reference LG24 smartphone. To reach the planned performance goals, the developer will employ several unique game design and optimization techniques. Some of the techniques include: Vertex buffer and material recycling: Render-state changes are expensive operations on mobile GPU’s. One of the project’s primary tactics to improve graphics performance is to generate different-looking 3D meshes by reusing the same geometry buffer while replacing only parts of the mesh’s material that is organized into blocks. The material COMP 8045 Major Project Proposal 14 blocks will be sent to the GPU in a combined and sorted manner so that render-state changes among similar meshes are only triggered once per distinct material block rather than one or more times per mesh in a given frame. Shader branching elimination: Mobile GPU hardware is designed to process highly uniform data. Branching in a shader program will cause the execution of all alternative code paths and the discard of results that are not needed, putting precious GPU cycles to waste. The project will apply intuitive mathematical methods to replace branching whenever possible, improving the GPU’s data throughput. Dynamic meshes: Certain special effects cannot be represented by a single mesh. A game designer may prepare multiple meshes beforehand and render a different one in different situations at the expense of GPU resource. This project will take a more economical approach and manipulate simple geometries dynamically for different occasions in order to further lower GPU state changes. Zero garbage generation: One of the best tools the Unity engine’s profiler provides is the GC monitor. The programmer will be able to track the amount of garbage a class object generates in a fixed period of time. Other than externally linked and precompiled DLL’s of which the programmer has no access to their sources, every piece of code can be trimmed to leave behind no garbage. To prevent the GC from activating unexpectedly and causing hiccups, no module in the game will create orphaned or temporary objects during gameplay. COMP 8045 Major Project Proposal 15 Zero memory surges: Mobile devices have very limited amount of RAM available to a process. The Android operating system has no swap space. When memory runs low, the system’s “Low-Memory Killer” kicks in and shuts down low priority background processes. This, in turn, causes the game to stutter. Recursive code is often the culprit of short-term memory surges due to excessive stack usage. This project will perform all the traditional recursive tasks iteratively to avoid disruptive memory spikes. Time-distributed AI: A simulation does not need to refresh every object each frame to create fluid motions. For example, when a bipedal creature lifts one leg to take a step, it cannot possibly change direction before putting the leg down on the floor because a pivot cannot create any torque without a lever arm. If the timing of each creature’s steps are given a slight offset from the others’ and distributed evenly, the need of the game’s AI to plan for N active creates’ future moves can be reduced from O(N) to O(1) per frame without affecting a creatures’ perceived motions. Trajectory prediction and navigation maps: Physics and AI operations are the second- most intensive operations following 3D rendering. The project will have accurate trajectory prediction to help the NPC’s jump between the platforms in the short term. Responsive long-term navigation, on the other hand, is still very taxing for real-time physics and AI. Most 3D action games “pre-bake” physical and navigational data onto the level maps to assist collision detection and pathfinding. The disadvantage of this approach is that a level will have to be recompiled after every minor change. This project will take a different approach and generate physical and navigational data at the start of a level, thus allowing a level to be edited with great ease or changed dynamically during the play session. COMP 8045 Major Project Proposal 16 VR Headset Android 5.0+ Smartphone Input Device HAL (Unity 3D) VR Manager Audio Manager I/O Manager Helper Utilities Level Maps Physics Paths / Trajectories Entities Cutscenes System Controller Event Controller High-Level System Diagram Graphics Manager Shaders Particles Special Effects G am e C o n tro ller COMP 8045 Major Project Proposal 17 Estimated Timeline Month 01 Milestone Effort Hours Setting up Development Tools and Environments Medium 4 System Architecture and Program Entry Medium 8 Script Execution and Termination Low 2 Research I: Development Tools and Environments Low 8 Research II: Development Workflow Medium 8 Research III: Graphics Pipeline and AI Medium 12 Research IV: Animation and User Interface Medium 12 Research V: Advanced Graphics and Optimization High 16 Object/Particle Pools and Abstract Data Types Medium 12 Total Hours: 82 Month 02 Milestone Effort Hours General Input Manager Medium 12 General Audio Manager Medium 12 Low-Level Rendering Manager Medium 12 First-Person Camera Low 4 Map One Assets and Designs Very High 24 First Prototype Medium 12 Character Animation Medium 8 Lighting and Shadow Effects Medium 8 Google VR SDK Integration Medium 12 First Android Build Medium 12 Total Hours: 116 COMP 8045 Major Project Proposal 18 Month 03 Milestone Effort Hours Collision Detection and Physics Very High 24 Jump AI Low 4 Navigation Map Generation High 16 Navigation Map-Assisted Pathfinding Medium 12 Basic Enemy AI Medium 8 Improved Enemy AI High 16 Dead Reckoning and Trajectory Prediction High 16 AI Tuning and Optimization Low 4 Total Hours: 100 Month 04 Milestone Effort Hours Particle Effects Medium 8 Loading and Saving Games Low 4 Level Transition Medium 8 Music Macros and Song Scripts High 16 Items and Power-Up’s Medium 8 User Interface High 16 Custom HLSL Shaders High 16 Map Two Assets and Designs High 16 Map Three Assets and Designs High 16 Map Four Assets and Designs High 16 Total Hours: 124 COMP 8045 Major Project Proposal 19 Month 05 Milestone Effort Hours Endgame Sequence Very High 24 Music and Sound Very High 24 Tester’s Shortcuts (Cheats) Low 4 Internal Testing Medium 8 Public Testing (Alpha and Beta) High 16 Bug Fixes Medium 8 Different Game Modes Medium 8 Game Controllers Support Low 4 Additional Optimizations Medium 8 Documentation and Final Report Very High 40 Total Hours: 144 Estimated Project Hours: 566 COMP 8045 Major Project Proposal 20 Deliverables 1 x Printed final report including the game’s user manual 2 x project DVD’s. Each includes: o Final report and user manual PDF o Project solution and readme.txt o Game prototype executable for Windows PC o Game prototype installation package for mobile Android devices 1 x LGL24 2014 Android smartphone w/ charger and USB cable (for demonstration) 1 x iPega wireless dual-analogue game controller w/ USB cable (for demonstration) 1 x VR Box smartphone VR headset (for demonstration) COMP 8045 Major Project Proposal 21 Learning Goal The video game industry has a competitive and volatile landscape. As more advanced gaming hardware replaces one another, game developers often have to play catch-up with the latest technologies. A window of opportunity opened since the introduction of the Google Cardboard headset in 2014 which gave small developers access to VR applications development at low cost and two full years to prepare for the anticipated mass adoption of the technology in 2016. This project strives to create a fast-paced VR action game designed for a large audience using mainstream Android devices. Mobile games often make compromises between speed and quality due to hardware limitations. High-performance VR games were thought to be impossible on common smartphones a year ago. This project is a challenge of the platform’s limitations and a test of the student’s ability in designing high-quality real-time VR games under heavy hardware constraints. Facebook CEO Mark Zuckerberg believes virtual reality would be the computing platform of the future as he claims, “Virtual reality was once the dream of science fiction. But the internet was also once a dream, and so were computers and smartphones.” Over 15 leading technology companies including Oculus, Google, Sony, Samsung, HTC, Valve and Apple have announced competing VR headsets ready for launch in min-2016. Whether virtual reality will prove to be the direction of future computing, the industrial trend is something software developers should not ignore. COMP 8045 Major Project Proposal 22 As a Computer Science student and a video game developer, the developer intends to explore the technology’s potential and discover new ways to design interactive software that is more natural, enjoyable and easier to use. This project is a dedicated exercise in developing small but well-polished VR games with good quality and performance; thereby familiarizing the developer with the workflow of developing commercial virtual reality games in the near future. COMP 8045 Major Project Proposal 23 Appendix A: Revision Log Revision 1 (Feb 12, 2016) All Pages: This is a single-developer project that involves only one BCIT student (Student Name). The first edition of the proposal addressed the reader and the developer together as “we” and referred to the end product as “our game” which led to the misconception of a multi-developer project. The entire proposal has been revised to describe the developer’s role and the development model succinctly and concisely to reflect the project’s actual status. Page 13-15: The first edition of the proposal did not provide a detailed description of the project’s innovative aspects. The game’s specifications have since been finalized, and clear descriptions of the project’s most unique design and programming aspects have been added to the “Technical Innovations” section.
欢迎咨询51作业君