Tekijän Niim
Total Page:16
File Type:pdf, Size:1020Kb
Tia Kiesiläinen GAME DEVELOPMENT WITH THE FROZENBYTE ENGINE FOR THE GAME CONSOLES OF THE EIGHTH GENERATION Opinnäytetyö Kajaanin ammattikorkeakoulu Luonnontieteiden ala Tietojenkäsittelyn koulutusohjelma 29.11.2014 OPINNÄYTETYÖ TIIVISTELMÄ Koulutusala Koulutusohjelma Luonnontieteiden ala Tietojenkäsittelyn koulutus Tekijä(t) Tia Kiesiläinen Työn nimi Pelinkehitys Frozenbyte Oy:n pelimoottorilla kahdeksannen sukupolven pelikonsoleille Vaihtoehtoisetvaihtoehtoiset ammattiopinnot Toimeksiantaja Frozenbyte Oy Aika Sivumäärä ja liitteet 29.11.2014 37 Tämän opinnäytetyön tilaaja on Frozenbyte Oy, joka on julkaissut aikaisempia pelejään monelle alustalle. Työn aihe valikoitui tekijän työharjoittelun aikana hänen työskennellessään Trine Enchanted Edition pelin parissa, ja valintaa tuki pelin lähestyvä julkaisu monelle alustalle sekä oppimismahdollisuus tekijälle. Tavoitteena oli antaa tekijälle tietoa ja käytännön kokemusta monen alusta tukemisesta pelimoottorissa ja konsoleille kehittämisestä. Työn aikana kehitettiin Frozenbyte Oy:n pelimoottoria ja lopulta julkaistiin peli. Kahdeksannen sukupolven konsoleista julkaisualustoiksi valittiin PlayStation 4 ja WiiU konsolit. Valitut konsolit ovat suorityskyvyltään hyvin erilaisia, ja niiden kehitystyökalut eroavat myös toisistaan. Frozenbyte Oy:n pelimoottori on ohjelmoitu C++ -kielellä, joka tarjoaa erilaisia tapoja alustariippumattomuuden toteuttamiseen. Opinnäytetyön tekemisen aikana pelimoottorin olemassaoleva tuki PlayStation 4 ja WiiU -alustoille päivitettiin toimivaksi. Käytettyjä kolmannen osapuolen kirjastoja päivitettiin, ja pelimoottoria ja peliä muutettiin toimimaan paremmin valituilla alustoilla. Tekijä ja toinen ohjelmoija tekivät muutokset kokeneempien ohjelmoijien tukemina. Muutokset noudattivat konsolivalmistajien asettamia ohjeita ja rajoituksia, ja peliä myös testattiin jatkuvasti näiden ohjeiden mukaan. Suurin työmäärä aiheutui ulkoisten kirjastojen, pelimoottorin, pelin ja alustojen yhteistoiminnan varmistamisesta. Pelimoottorista löytyi myös monia puutteita ja virheitä, jotka korjattiin. Työn loppuvaiheessa oli selvää, että monen alustan tukeminen vaatii pelimoottorin jatkuvaa ylläpitoa ja kehittämistä. Kieli Englanti Asiasanat Pelimoottori, C++, ohjelmointi, pelikonsoli Säilytyspaikka Verkkokirjasto Theseus Kajaanin ammattikorkeakoulun kirjasto THESIS ABSTRACT School Degree Programme School of Business Business Information Technology Author(s) Tia Kiesiläinen Title Game Development with The Frozenbyte Engine for the Game Consoles of the Eighth Generation Optionalvaihtoehtiset Professional Studies Commissioned by Frozenbyte Ltd. Date Total Number of Pages and Appendices 29.11.2014 37 This thesis was commissioned by Frozenbyte Ltd, who have a history of publishing games on multiple platforms. The subject was decided when the author worked on Trine Enchanted Edition during their internship. The decision was supported by the upcoming launch of the game for multiple platforms and the opportunities it allowed for learning. The goal of the thesis is to further the author's knowledge and skills regarding development for multiple platforms. The practical goal is to further develop the engine and to publish the game. Out of the eighth generation of consoles, PlayStation 4 and WiiU were selected as target platforms. Xbox One was left for later due to time constraints. The chosen consoles differ greatly on performance and available development tools. The Frozenbyte's engine is programmed in C++, which allows multiple ways to implement platform independence. During the development process the existing support for PlayStation 4 and WiiU was updated. Third party libraries used by the engine were also updated to the latest versions and the engine and game were tuned to work especially on the selected platforms. The author and one other programmer did most of the work and were supported by senior programmers when needed. Changes to the engine followed the guidelines set by console manufacturers and the game was also tested to comply with the set requirements, Most of the work went into making sure that the engine, game, external libraries and platforms worked together without errors. Numerous errors and shortcomings found in the engine were corrected. When the game was almost ready it had become apparent that platform independence requires constant upkeeping and development of the game engine. Language of Thesis English Keywords Game engine, C++, programming, game console Deposited at Electronic library Theseus Library of Kajaani University of Applied Sciences FOREWORD To Erno. TABLE OF CONTENTS 1 INTRODUCTION............................................................................................................1 2 GAME ENGINE..............................................................................................................3 2.1 Game engine basics............................................................................................3 2.2 Introduction to C++............................................................................................5 3 GAME CONSOLES OF THE EIGHTH GENERATION................................................8 3.1 PlayStation 4......................................................................................................8 3.2 WiiU...................................................................................................................9 3.3 Xbox One.........................................................................................................10 3.4 Comparison of hardware..................................................................................11 4 PLATFORM INDEPENDENCE IN GAME ENGINES................................................14 4.1 Platform independence layer............................................................................16 4.2 Different approaches to platform independence..............................................17 4.3 Example of implementing platform independence in C++..............................18 4.4 Platform independence in the Frozenbyte Engine...........................................19 5 GOAL OF THE THESIS................................................................................................21 5.1 Specifications of the project.............................................................................21 5.2 Initial setting for the project.............................................................................21 5.3 Plan for reaching the goal................................................................................22 5.4 Trine Enchanted Edition...................................................................................22 6 IMPLEMENTATION OF THE PROJECT PLAN.........................................................24 6.1 Changes made to the Frozenbyte engine and their effects...............................24 6.2 Quality assurance and publishing the game on the platforms..........................27 7 REFLECTION AND FURTHER DEVELOPMENT.....................................................28 REFERENCES..................................................................................................................30 LIST OF SYMBOLS API Short for application programming interface. A set of rules to which a software may conform. Using an API enables multiple software components to work together. Build A version of a software. During the development of a program, multiple builds are created and tested. Development Kit A custom game console that allows the execution of development builds. Development kits are regulated and distributed by the company which created the game console. Development platform A set combination of hardware and operating system, such as Windows computer, Nintendo WiiU console or an Android phone. Game console A development platform that is created and controlled by a private company. Hardware The physical components of a computer system. IDE Short for integrated development environment. A program which combines other programs needed to develop software from source code to an executable program. Library A collection of functions that are usable by other programs written in the same programming language. Operating system A software that controls the hardware of a system and allows multiple other programs to run concurrently and access the hardware in a controlled way. Programming language A programming language defines a syntax which needs to be followed to write valid programs on that language. Source code Code written by a programmer in a programming language. Software A single program, or a combination of programs. 1 INTRODUCTION Game engines reside at the heart of modern game development. Comprised of the most critical components for a game, they are used to supplying the foundation upon which the rest of the game is built. These engines evolve along the development of the game industry and platforms. As all software, they feature a score of different designs and patterns to fulfill their purpose. (Gregory 2009, 11.) The subject of this thesis is to explain how one such engine has been put together and how it tackles one of the fundamental tasks of a modern game engine, that of offering support for publishing on multiple platforms. With an increasing number of available platforms and thus a growing audience that is available for a game, combined with the ease of digital distribution systems, publishing a game to multiple platforms has become increasingly profitable. With the advent of new technology and game engines, it