An Evaluation Of The Framework Libgdx When Developing A .

3y ago
56 Views
2 Downloads
2.69 MB
59 Pages
Last View : 16d ago
Last Download : 3m ago
Upload by : Hayden Brunner
Transcription

An Evaluationof the Framework Libgdxwhen Developing a Game Prototypefor Android DevicesRAKIV AHMEDand JONAS AULEBachelor of Science ThesisStockholm, Sweden 2011

An Evaluationof the Framework Libgdxwhen Developing a Game Prototypefor Android DevicesRAKIV AHMEDand JONAS AULEBachelor’s Thesis in Computer Science (15 ECTS credits)at the School of Computer Science and EngineeringRoyal Institute of Technology year 2011Supervisor at CSC was Henrik ErikssonExaminer was Mads DamURL: k/2011/ahmed rakiv OCH aule jonas K11072.pdfKungliga tekniska högskolanSkolan för datavetenskap och kommunikationKTH CSC100 44 StockholmURL: www.kth.se/csc

AbstractThis paper is about evaluation of the framework Libgdx, regarding 2D game development for the Androidplatform. Other frameworks are also investigated briefly. The game under development is an original gamecalled Magnificent Marbles and is multi-modal as other games for smartphones. The Background section talksabout the Android platform and its related tools along with game examples, also frameworks are introduced here.The main focus of this paper will be on the Implementation section and the actual usage of Libgdx. Methods andresults for different development versions of the game will be displayed.The Discussion section concludes that Libgdx is a good framework due to its desktop support. Libgdx may notsuitable for smaller game projects or when wanting to get started quickly without too much knowledge in otherareas, such as OpenGL. Another issue is that one should not solely rely on Libgdx desktop support, butknowledge in other areas is required as well to utilize Libgdx to the fullest. The Appendix section includesdifferent documents for more information about Magnificent Marbles.SammanfattningDenna rapport handlar om utvärderingen av ramverket Libgdx och spelutveckling för Androidplattformen. Ävenandra ramverk undersöks också kortfattat. Spelet under utveckling är ett nytt spel som heter MagnificentMarbles och är multimodalt liksom andra spel för smartphones. Background-avsnittet berättar omAndroidplattformen och dess relaterade verktyg tillsammans med spelexempel. Olika ramverk kommer attpresenteras. Tyngdpunkten kommer att ligga i Implementation-avsittet som handlar om den faktiskaanvändningen av Libgdx. Metoder och resultat för olika versioner av spelet visas upp.Discussion-avsnittet drar slutsatsen att Libgdx är ett användbart verktyg, mycket tack vare dess desktop support.Libgdx kanske inte lämpar sig för mindre spelprojekt eller när man snabbt vill komma igång utan förkunskaper iandra ämnen, såsom OpenGL. Dessutom ska man inte enbart förlita sig på Libgdxs desktop support, utankunskaper i andra områden krävs fortfarande för att utnyttja Libgdx till fullo. Appendix-avsnittet innehållerdokument med ytterligare information relaterad till Magnificent Marbles.

Table of ContentsDefinitions . 61.Introduction . 91.1.Intended readership . 91.2.Purpose. 101.2.1.Problem statement . 101.2.2.Scope . 101.3.Statement of Collaboration . 112.Background . 132.1.Games . 132.1.1.Magnificent Marbles . 132.1.2.Multi-modal games on smartphones . 132.2.Software development . 162.2.1.Android platform . 162.2.2.Eclipse and ADT . 162.2.3.Development without frameworks . 172.2.4.Frameworks . 173.Implementation . 233.1.Experimental phase . 233.2.Version 0.0 – Pre-Game . 253.3.Version 0.1 – Game objects design . 313.4.Version 0.2 – Level Design. 353.5.Version 0.3 – GUI Design . 383.6.Version 0.4 – User testing . 403.7.Example code . 433.7.1.Program overview . 433.7.2.Builder pattern in Goal and ObjectEmitter . 444.Discussion . 474.1.Why frameworks . 474.2.Motivation for choosing Libgdx . 474.3.Libgdx evaluation . 474.3.1.Advantages . 474.3.2.Disadvantages . 474.3.3.Neutral assessments . 484.3.4.Criteria and purpose fulfillment . 484.4.Android issues . 484.5.Game changes and features . 494.5.1.Level descriptions . 494.5.2.Tutorial overhaul . 494.5.3.Memorising . Error! Bookmark not defined.4.5.4.Elements and colors. 494.5.5.Miscellaneous . 494.6.Future improvements . 504.7.Conclusion summary . 505.References . 516.Appendix . 556.1.Magnificent Marbles – Concept Document . 55

List of FiguresFigure 1. A picture of the Android mobile HTC Hero with the game Teeter. The mobile is being titled and theteeter ball is controlled by the tilt. . 14Figure 2. An in-game screenshot from the game Air Control. Cargo mode is played, the smaller air plane iconsindicating which type of planes or colors that are able to land. . 15Figure 3. Image of our first Libgdx application . 24Figure 4. First version with Box2D support . 26Figure 5. fillCircle() method have been fixed and filled marbles are shown. . 27Figure 6. Marble showing their colors but sprites not are created in the correct way – Disco Marbles. (leftfigure) . 28Figure 7. Disco Marbles visualized more clearly with a camera shot, independent from the FPS. (right figure) 28Figure 8. First appearance of elemental materia, as small circles. (left figure) . 29Figure 9. Marbles and their respective material lined up at right side. (right figure) . 29Figure 10. Ca 50 marbles on the same screen without slowing down. . 30Figure 11. Marbles are bigger and materia is triangular (left figure) . 31Figure 12. Changed background and introduced a black hole that makes marlbes disappear (right figure) . 31Figure 13. Invisible (without debug graphics) bodies that moves the marbles around. (left figure) . 33Figure 14. Object emitter repsented by a small solid white square in the center. It emits different objectsaccording to level (right figure) . 33Figure 15. These game objects concludes all the objects needed to start making interesting levels. . 34List of TablesTable 1. List of 13 frameworks for game developong on Android . 18Table 2. A list of 4 games that used Libgdx framework . 19Table 3. List of levels for Magnificent Marbles. . 35

DefinitionsTermAndroid DevelopmentToolsAndroidAndroid MarketAndroid LifecycleAbbreviationADTBox2DEclipseFrames Per SecondFPSDescriptionA plug-in for Eclipse (see Eclipse) to develop Androidapplications.Operating system for smartphones.The Android distribution service of mobile applications.A model Android uses to handle the lifecycle of an activityin applications. There are some required methods, such asonCreate, onResume, onPause, that needs to beimplemented for every Android activity following thelifecycle model.A physics engine library that are used in 2D games andhave implementations in different programming languagesand frameworks.An Integrated Development Environment (see IDE) thatsupports Android Development via ADT.A way to measure how fast a device and/or application isat displaying and updating the graphics on the screen. Howmany frames it draws each second.FrameworkA library containing commonly used functionality to usewhen wanting to ease the development of a specific type ofapplication. The difference between a library and aframework is the so called “inversion of control”, theframework runs the main program loop letting the programusing the framework override certain default frameworkbehavior by providing methods that the framework calls atcertain times.Multi-modalUsing other ways of interacting with a computer deviceother than the regular mouse and keyboard combination. Inour case the use of touch and accelerometers on asmartphone.Open SourceA software project where all the source code is freelyavailable to developers, to adjust and use. May come withdifferent licenses.An open source graphics library in native code (C) forcreating graphics. ES is adapted for mobile devices.Open GraphicsLibrary EmbeddedSystemsPrototypeOpenGL ESSoftwareDevelopment KitSwedish GameAwardsSDKSGAThe development up to an early alpha version of a game orapplication. Used for testing purposes and to extend orlearn from for future versions.A package of functionality to makes it easy to buildsoftware for a specific platform, such as Android.A yearly game development competition for students.6

TermSmartphoneAbbreviationTiled Map EditorThemable WidgetLibraryTWLDescriptionThe latest generation of mobile phones that can runadvanced software and have a multi-modal interface, suchas HTC Desire or iPhone. For example have a touchinterface that enables users to control the mobile bytouching the screen.Tiled Map Editor is a third party tool to enable easy map(level) creating for games, using XML. Has built-insupport in Libgdx.TWL is a graphical user interface library for Java built ontop of OpenGL. It provides a rich set of standard widgetssuch as labels, buttons, fields etc.7

1. IntroductionThe market for mobile applications, and especially games, has exploded since the introduction of Apple’siPhone1 and the later entrance of Android-based smartphones. Earlier mobile games were simple and a pastimeactivity. However now, advanced and high quality games exist, and there are more of them as games forhandheld consoles are being further developed.The business and technology involved with smartphones have also evolved, such as the introduction of accuratetouch interfaces and accelerometers. The smartphone application industry is relatively new and an unexploredmarket with these new features and opportunities. It is very attractive for a software engineer who wants to workwith something new, exciting and lucrative, in the views of the authors.This report will be about game development for the Android platform. The game, called Magnificent Marbles, isan original and takes advantage of the multi-modal features of a smartphone. The development will occur withthe help of a framework, called Libgdx.1.1. Intended readershipThis report aims at supporting other computer science and software engineering students that have a couple ofyears of experience with programming (object oriented, such as Java) and different fundamental theories. Anunderstanding of basic terminology for software development is required. Specific terminology and techniquesfor mobile, Android, Libgdx and game development will be provided. The reader is interested in mobile or gamedevelopment, preferably both. Particular interest lies in the use of a framework to simplify and speed updevelopment and especially looking for an evaluation of the Libgdx framework.1Smartphones Provide Extra Mana for Mobile Games Industry [ ] http://www.comscore.com/Press Events/Press Releases/2009/1/Mobile Gaming Grows [Retrieved 2011-04-08] [Published 2009-01-30]9

Section 1 Introduction1.2. Purpose1.2.1. Problem statementThe main problem statement is the following:Which framework should be used if aiming to develop a mobile game with multi-modal interaction for theAndroid platform?With the follow-up questions of: Which available frameworks exist that are complete, simple and free to use for developing 2D games? How well-suited is the framework for our project? What are the advantages and drawbacks for each andone of them when comparing?The framework will be used to develop an original game called Magnificent Marbles. The evaluation will bebased on how suitable the framework is for the development of a prototype of Magnificent Marbles. Criteria forframework selection and evaluation is declared in section 2.2.4 Frameworks.1.2.2. ScopeThe scope of the project is mainly our resources and the game specifications. The project is time-limited to a 16week long period or 320 work hours for two persons. This includes everything, such as learning Androiddevelopment, game development and writing the report. Other technical and planning issues are factored in aswell.The scope of this evaluation is limited to concern Libgdx and not the game development of Magnificent Marbles.The game specifications depend on our experience with both game and Android development, thus thespecifications are made to suit us and our time frame. There is not enough time to have a fully developed gamethat is user friendly, graphically appealing and stable. The development of a game prototype is the base for theevaluation of Libgdx.Some sections only concern the game itself, regarding design and technical aspects. These are not involved inthe evaluation and included in this report to give more information about the game.10

1.3 Statement of Collaboration1.3. Statement of CollaborationBoth authors view this project as a very interesting and rewarding one concerning future education andprofessional aspects. Both are interested in game development and also mobile development for smartphones.We both understand that we need to co-operate to achieve the best results but have decided to have differentresponsibilities, especially in the beginning and during different start-up phases, to be able to draw advantages ofour strengths.All decisions regarding the game design, development and the report structure are taken together, even if eachperson makes the first draft in his respective area of responsibility. The goals for the game and report have beendefined and agreed upon in advance, before each draft, thus, there are guidelines for each draft. There are roomfor changes that happen dynamically and continuously throughout the project with constant feedback anddiscussi

Android Development Tools ADT A plug-in for Eclipse (see Eclipse) to develop Android applications. Android Operating system for smartphones. Android Market The Android distribution service of mobile applications. Android Lifecycle A model Android uses to handle the lifecycle of an activity in applications.

Related Documents:

May 02, 2018 · D. Program Evaluation ͟The organization has provided a description of the framework for how each program will be evaluated. The framework should include all the elements below: ͟The evaluation methods are cost-effective for the organization ͟Quantitative and qualitative data is being collected (at Basics tier, data collection must have begun)

Silat is a combative art of self-defense and survival rooted from Matay archipelago. It was traced at thé early of Langkasuka Kingdom (2nd century CE) till thé reign of Melaka (Malaysia) Sultanate era (13th century). Silat has now evolved to become part of social culture and tradition with thé appearance of a fine physical and spiritual .

On an exceptional basis, Member States may request UNESCO to provide thé candidates with access to thé platform so they can complète thé form by themselves. Thèse requests must be addressed to esd rize unesco. or by 15 A ril 2021 UNESCO will provide thé nomineewith accessto thé platform via their émail address.

̶The leading indicator of employee engagement is based on the quality of the relationship between employee and supervisor Empower your managers! ̶Help them understand the impact on the organization ̶Share important changes, plan options, tasks, and deadlines ̶Provide key messages and talking points ̶Prepare them to answer employee questions

Dr. Sunita Bharatwal** Dr. Pawan Garga*** Abstract Customer satisfaction is derived from thè functionalities and values, a product or Service can provide. The current study aims to segregate thè dimensions of ordine Service quality and gather insights on its impact on web shopping. The trends of purchases have

Chính Văn.- Còn đức Thế tôn thì tuệ giác cực kỳ trong sạch 8: hiện hành bất nhị 9, đạt đến vô tướng 10, đứng vào chỗ đứng của các đức Thế tôn 11, thể hiện tính bình đẳng của các Ngài, đến chỗ không còn chướng ngại 12, giáo pháp không thể khuynh đảo, tâm thức không bị cản trở, cái được

Le genou de Lucy. Odile Jacob. 1999. Coppens Y. Pré-textes. L’homme préhistorique en morceaux. Eds Odile Jacob. 2011. Costentin J., Delaveau P. Café, thé, chocolat, les bons effets sur le cerveau et pour le corps. Editions Odile Jacob. 2010. Crawford M., Marsh D. The driving force : food in human evolution and the future.

Le genou de Lucy. Odile Jacob. 1999. Coppens Y. Pré-textes. L’homme préhistorique en morceaux. Eds Odile Jacob. 2011. Costentin J., Delaveau P. Café, thé, chocolat, les bons effets sur le cerveau et pour le corps. Editions Odile Jacob. 2010. 3 Crawford M., Marsh D. The driving force : food in human evolution and the future.