Denna rapport ar resultatet av ett examensarbete som har utforts vid institutionen for informationsoch kommunikationsteknik, Kungliga Tekniska Hogskolan (KTH), och omfattar 15 hp. Rapporten presenterar ett arbete dar examensarbetarna har utvecklat en terrang med hojdskillnader och ljussattning, partikeleffekter (CPU-GPU implementering) som liknar ett fyrverkeri, partikeleffekter (GPU implementering) som visar olika monster samt en kamera for att kunna observera spelvarlden fran alla mojliga olika vinklar i 3D med API:et Lightweight Java Game Library (LWJGL). LWJGL ar ett lagniva-API som riktar sig mot nyborjare och professionella spelutvecklare i programspraket Java. Flera tekniker exponeras istallet for att mappa lagniva-funktioner i objektorienterad programmeringsparadigm som manga javautvecklare ar vana vid. LWJGL hanterar sin egen grafik, ljud och styrkontroller enbart for att fa en solid grund for moderna spel och en battre anvandarupplevelse. Den grafiska renderingen skots med OpenGL. Syftet med det har examensarbetet var att utvardera LWJGL om den ar kompetent nog att anvandas i samband med spelutveckling. Det ar kant att Java Standard Edition (Java SE) har valdigt daligt stod for grafikintensiva och komplexa applikationer dar prestandan ar valdigt viktig. Darfor utvecklade vi en storre grafiskt kravande applikation, for att kunna gora en samlad bedomning om hur det ar att arbeta med LWJGL och vad det erbjuder en spelutvecklare. Arbetet delades upp i tre olika faser. Den forsta fasen borjade med att skapa en kravspecifikation for den produkt som skulle utvecklas, den lag till grund for hela arbetet. Nasta steg var datainsamling med syfte att erhalla forstaelse for olika tekniker och att identifiera problem. Den tredje fasen var sjalva utforandet dar vi designade, implementerade, testade och analyserade losningarna iterativt. Rapporten ger lasaren en oversikt over de krav som stallts pa prototypen, den projektmetod som anvants, tekniker som har tillampats, alla losningar som har tagits fram och varfor LWJGL blev utvald bland manga andra. Enligt de tester som utforts sa ar partikelsystem A (CPU-GPU implementering) bra mycket langsammare an partikelsystem B (GPU implementering) rent prestandamassigt. Nar 1,5 miljoner partiklar renderades sa fick partikelsystem A 5 bilder per sekund och partikelsystem B 110 bilder per sekund. Ingenjorsmassiga metoder och standarder har anvants under hela arbetets forlopp som forvarvats under civilingenjorsutbildningen informationsteknik pa KTH med inriktning datalogi. Det innefattar agil systemutveckling, programmering och problemlosning. Goda kunskaper i Java, matematik och allman IT-teknisk bakgrund forutsatts for att hanga med i alla resonemang i denna rapport. / This report is the result of a thesis work done at the Department of Information and Communication Technology, Royal Institute of Technology (Swedish: Kungliga Tekniska hogskolan, abbreviated KTH), and includes 15 credits. The report presents a work in which graduate students have developed a terrain with elevation changes and lighting, particle effects (CPU-GPU implementation) displaying fireworks, particle effects (GPU implementation) which displays different patterns as well as a camera in order to observe the game world from all sorts of different angles in 3D utilizing the API Lightweight Java Game Library (LWJGL). LWJGL is a low-level API that targets beginners and professional game developers alike in the Java programming language. Several technologies are exposed instead of mapping low-level features of object-oriented programming paradigm, which many Java developers are used to. LWJGL handles its own graphics, sound and controllers just to get a solid foundation for the modern game and an improved user experience. The graphical rendering is handled using OpenGL. The aim of this thesis was to evaluate LWJGL if it is competent enough to be used in conjunction with game development. It is known that the Java Standard Edition (Java SE) has very poor support for graphics-intensive and complex applications where performance is very important. Therefore, we developed a more graphically demanding application, in order to make an overall assessment of how it is to work with LWJGL and what it offers game developers. The work was divided into three different phases. The first phase began with creating a specification for the product to be developed which became the basis of the whole work. The next step was data collection with the objective to obtain an understand the different technologies and identify problems. The third phase was the actual execution where we designed, implemented, tested and analyzed solutions iteratively. The report provides the reader with an overview of the requirements imposed on the prototype, the project methodology, technologies that have been applied, all the solutions that have been developed and why LWJGL was chosen among many others. According to the tests conducted, particle system A (CPU-GPU implementation) is much slower than particle system B (GPU implementation) purely performance-wise. When 1,5 million particles were rendered, particle system A got 5 Frames per second (FPS) and particle system B 110 FPS. Engineering methods and standards were used throughout the work process acquired during the Information Technology Engineering degree at KTH majoring in computer science. It includes agile systems development, programming and problem solving. Good knowledge of Java, mathematics and a general IT technical background is required to keep up with all the information in this report.
Identifer | oai:union.ndltd.org:UPSALLA1/oai:DiVA.org:kth-118682 |
Date | January 2012 |
Creators | Härnberg, Daniel, Wiiala, Gustav |
Publisher | KTH, Skolan för informations- och kommunikationsteknik (ICT) |
Source Sets | DiVA Archive at Upsalla University |
Language | Swedish |
Detected Language | English |
Type | Student thesis, info:eu-repo/semantics/bachelorThesis, text |
Format | application/pdf |
Rights | info:eu-repo/semantics/openAccess |
Relation | Trita-ICT-EX ; 2012:324 |
Page generated in 0.0032 seconds