2D Platform Game

Total Page:16

File Type:pdf, Size:1020Kb

2D Platform Game Sourav Basu 2D PLATFORM GAME Developed using Unity game engine Thesis CENTRIA UNIVERSITY OF APPLIED SCIENCES Degree Programme in Information Technology December 2017 ABSTRACT Centria University Date Author of Applied Sciences December 2017 Sourav Basu Degree programme Information Technology Name of thesis 2D PLATFORM GAME. Developed using Unity game engine Instructor Pages Kauko Kolehmainen 54 + 44 appendices Supervisor Kauko Kolehmainen The aims of this thesis were to create a game in 2D using the Unity game engine, and to learn about the new development tools introduced throughout each update and Unity versions. Unity is a cross- platform game engine, therefore releasing the same project on different platforms is quite easy. With smartphones and handheld devices increasing in popularity, 2D games have attracted a lot of atten- tion. Moreover, with updates over the past years, Unity has seen many changes in 2D development with the addition of new tools and mechanics, making game development much faster. The game developed for this thesis is a platformer game. This means that the character in the game has to try to avoid traps, enemies and falling into death and must try to reach the finish line at the end of each stage. There is a health system in the game for the player and enemies, so that they are at- tacked few times before getting killed. There is a point system, which the player is required to fulfill in order to end the stage. This game consists of three different stages, the third being the boss stage where a stronger enemy spawns. Killing the boss is the main objective of the game. Even though the game has only three stages, it is possible to create more stages in between, using saved assets in the projects assets folder, and this will be further explained along with other topics later into the thesis. The game created as a result of this thesis is a good example of a modern-day 2D game. It is possible to use this as a step-by-step tutorial for creating a game. Keywords: 2D, Unity engine. CONTENTS 1 INTRODUCTION ........................................................................................................................... 1 2 OVERVIEW .................................................................................................................................... 2 2.1 History ....................................................................................................................................... 2 2.2 Asset Store ................................................................................................................................. 3 2.3 Licenses ...................................................................................................................................... 3 2.4 Unity Interface ........................................................................................................................... 4 3 GAME DEVELOPMENT .............................................................................................................. 6 3.1 Planning and requirements ....................................................................................................... 6 3.2 Scripting ..................................................................................................................................... 7 3.3 Unity 2D features ....................................................................................................................... 8 3.3.1 Sprites ............................................................................................................................... 8 3.3.2 Physics 2D ...................................................................................................................... 12 4 IMPLEMENTATION PROCESS OF THE GAME .................................................................... 15 4.1 Creating New Project .............................................................................................................. 15 4.2 Basic Structure ........................................................................................................................ 15 4.3 Player ....................................................................................................................................... 16 4.3.1 Player Physics ................................................................................................................ 16 4.3.2 Movements ..................................................................................................................... 17 4.3.3 Attack System ................................................................................................................ 21 4.3.4 Player Animations.......................................................................................................... 25 4.3.5 Player Health And Energy System ................................................................................ 29 4.4 Non-Playable Characters ........................................................................................................ 34 4.4.1 Movements and Animations .......................................................................................... 34 4.4.2 Attack and Health System ............................................................................................. 39 4.5 UI Canvas ................................................................................................................................ 45 4.6 Level Design ............................................................................................................................. 50 4.6.1 Loading New Scenes ...................................................................................................... 51 4.6.2 Audio .............................................................................................................................. 52 4.6.3 Checkpoints and Exit signs ............................................................................................ 53 4.7 Building the Game ................................................................................................................... 55 5 CONCLUSION ............................................................................................................................. 56 REFERENCES................................................................................................................................. 57 APPENDICES Game Scripts 1 1 INTRODUCTION The project is a platformer genre game, where the aim is to reach endpoint through obstacles and ene- mies in each stage. It was made using Unity 2D and it is a Windows Operating System game. Unity was chosen to develop the gamewas, that it is becoming more and more famous in producing some amazing games.A free version was used to make this game, and even though not all the features are available in this version, the tools provided were more than enough to develop a simple 2D game. Uni- ty is an ultimate game-developing platform where it is possible to release the same project on multiple and various platforms, such as Linux, Mac, Android, iOS, Xbox, PlayStation and more. Even though 3D games are more attractive and visually more realistic, 2D games are also very popular as well, especially with smartphones and tablets gaining popularity each year increasingly. With that in mind, Unity developers decided to release 2D features in 2013 with completely new 2D features and toolsets. With these additions, developing 2D games is much easier now, compared to earlier. In this thesis, I will take a closer look at the new features of Unity 2D and explain how a game can be developed even with a basic knowledge about programming and Unity game engine. While working on the game, I was able to acquire a deep understanding of C# language. Although there were some Unity syntaxes that were new, but it was not hard to comprehend them. The purpose is to show the advantages of using Unity and to learn about the latest 2D features that have been updated over the past years, since 2D was introduced. The game that was developed was solely for study purposes and is used as an example in this thesis. This thesis can also be used as a tutorial to create a basic 2D game from start to finish. Certain terms used in this thesis will be exactly the same as in Unity's documentation, for example GameObject and Rigidbody. Scripts for the game can be found in the Appendices. 2 2 OVERVIEW Unity is a multiplatform game engine that supports 2D and 3D graphics.Games were commonly scripted in C# and UnityScript, similar to JavaScript, which makes them much easier to understand. Currently, Unity 2017.2 is the most updated version and at the time of Unity 5 and Unity 2017.1 re- lease, Boo and UnityScript were removed from scripting languages, respectively. Unity version 5.5.1 was used to develop the game for thesis. (Alexsadr 2014.) 2.1 History Unity is a cross-platform game engine that was developed by Unity Technologies. Unity Technologies was founded by David Helgason, Nicholas Francis and Joachim Ante in 2004. Many global companies helped Unity Technologies by funding the project, in hopes of developing an engine everyone could afford.The Unity engine was developed using C and C++ programming languages. For scripting and coding,C# and Java languages are used. (Corazza 2013.) In 2005, at Apple’s Worldwide Developers Conference, the first version of Unity was released. At the time of release, Unity 1 could only build projects for Mac systems. With successful
Recommended publications
  • Nordic Game Is a Great Way to Do This
    2 Igloos inc. / Carcajou Games / Triple Boris 2 Igloos is the result of a joint venture between Carcajou Games and Triple Boris. We decided to use the complementary strengths of both studios to create the best team needed to create this project. Once a Tale reimagines the classic tale Hansel & Gretel, with a twist. As you explore the magical forest you will discover that it is inhabited by many characters from other tales as well. Using real handmade puppets and real miniature terrains which are then 3D scanned to create a palpable, fantastic world, we are making an experience that blurs the line between video game and stop motion animated film. With a great story and stunning visuals, we want to create something truly special. Having just finished our prototype this spring, we have already been finalists for the Ubisoft Indie Serie and the Eidos Innovation Program. We want to validate our concept with the European market and Nordic Game is a great way to do this. We are looking for Publishers that yearn for great stories and games that have a deeper meaning. 2Dogs Games Ltd. Destiny’s Sword is a broad-appeal Living-Narrative Graphic Adventure where every choice matters. Players lead a squad of intergalactic peacekeepers, navigating the fallout of war and life under extreme circumstances, while exploring a breath-taking and immersive world of living, breathing, hand-painted artwork. Destiny’s Sword is filled with endless choices and unlimited possibilities—we’re taking interactive storytelling to new heights with our proprietary Insight Engine AI technology. This intricate psychology simulation provides every character with a diverse personality, backstory and desires, allowing them to respond and develop in an incredibly human fashion—generating remarkable player engagement and emotional investment, while ensuring that every playthrough is unique.
    [Show full text]
  • Sample Iis Publication Page
    https://doi.org/10.48009/2_iis_2020_185-195 Issues in Information Systems Volume 21, Issue 2, pp. 186-195, 2020 TOWARD A CONCEPTUAL MODEL FOR UNDERSTANDING THE RELATIONSHIPS AMONG MMORPGS, GAMERS, AND ADD-ONS Qiunan Zhang, University of Memphis, [email protected] Yuelin Zhu, University of Memphis, [email protected] Colin G. Onita, San Jose State University, [email protected] M. Shane Banks, University of North Alabama, [email protected] Xihui Zhang, University of North Alabama, [email protected] ABSTRACT The consumption of video games has become a significant economic, cultural, and entertainment phenomenon worldwide. Massively Multiplayer Online Role Playing Games (MMORPGs) are an important category of such games. In MMORPGs, gamers often play with add-ons to enhance their gaming experience. In previous research studies on MMORPGs, few of them have focused on the relationships among MMORPGs, gamers, and add-ons. This study presents a conceptual framework for use in addressing the following two questions: (1) What is the relationship between gamers and add-ons in MMORPGs? (2) How do factors (such as game quality and updates) impact gamers and add-ons and the relationship between them? In this paper, we develop a research model and describe a quantitative methodology that can be used to test and investigate the above questions. Implications for research and practice, as well as limitations and future research directions, are discussed. Keywords: MMORPGs, Motivations for Gaming, Gamers, Add-ons, Game Quality, Game Updates, Software Platform INTRODUCTION In 2017, video games became the most popular and profitable form of entertainment, producing an estimated revenue of $116 billion eclipsing TV and TV streaming services’ revenue of $105 billion (D’Argenio, 2018).
    [Show full text]
  • The Effects of a Platform Digital Game-Based Learning Environment on Undergraduate Students Achievement and Motivation in a Multivariable Calculus Course
    Georgia State University ScholarWorks @ Georgia State University Middle and Secondary Education Dissertations Department of Middle and Secondary Education Fall 12-21-2018 The Effects of a Platform Digital Game-Based Learning Environment on Undergraduate Students Achievement and Motivation in a Multivariable Calculus Course MALCOM W. DEVOE Georgia State University Follow this and additional works at: https://scholarworks.gsu.edu/mse_diss Recommended Citation DEVOE, MALCOM W., "The Effects of a Platform Digital Game-Based Learning Environment on Undergraduate Students Achievement and Motivation in a Multivariable Calculus Course." Dissertation, Georgia State University, 2018. https://scholarworks.gsu.edu/mse_diss/73 This Dissertation is brought to you for free and open access by the Department of Middle and Secondary Education at ScholarWorks @ Georgia State University. It has been accepted for inclusion in Middle and Secondary Education Dissertations by an authorized administrator of ScholarWorks @ Georgia State University. For more information, please contact [email protected]. ACCEPTANCE This dissertation, THE EFFECTS OF A PLATFORM DIGITAL GAME-BASED LEARNING ENVIRONMENT ON UNDERGRADUATE STUDENTS ACHIEVEMENT AND MOTIVATION IN A MULTIVARIABLE CALCULUS COURSE, by MALCOM W. DEVOE, was prepared under the direction of the candidate’s Dissertation Advisory Committee. It is accepted by the committee members in partial fulfillment of the requirements of the degree, Doctor of Philosophy, in the College of Education and Human Development, Georgia State University. The Dissertation Advisory Committee and the student’s Department Chairperson, as representatives of the faculty, certify that this dissertation has met all standards of excellence and scholarship as determined by the faculty. _____________________________________ _________________________________ Iman C. Chahine, Ph.D. Joseph R.
    [Show full text]
  • Designing a Fantasy Bike-Based Exergame to Foster Physical Activity
    pag. 21 Designing a Fantasy Bike-based Exergame to Foster Physical Activity Catherine Pons Lelardeux*, Michel Galaup**, Fabian Hall***, Pierre Lagarrigue**** *IRIT, University of Toulouse - INU Champollion, SGRL, France **EFTS, University of Toulouse - INU Champollion, SGRL, France ***University of Toulouse - INU Champollion, SGRL, France ****ICA, University of Toulouse - INU Champollion, SGRL, France [email protected] [email protected] [email protected] [email protected] Abstract Authorities recommend the practice of moderate physical activity to improve health and quality of life. "Play’n Ride" is a bike-based exergame aimed at promoting and control- ling physical activity. This paper presents the usefulness of using extrinsic fantasy and a commonplace real bike to address a wide audience. It depicts the interactive universe in which the player pedals a bike equipped with sensors to control the flight altitude of an imaginary character. During a ’Tour de France 2019’ stage, one hundred and seventy-eight fan park visitors - from youths to retirees - tested the exergame. Data were collected from an online questionnaire composed of SUS questionnaire items and from a digital tracking system attached to the game-engine in order to assess the usability, the learnability and the acceptability of the system. Analysis shows that using extrinsic fantasy makes exercising fun and it engages people of all ages regardless of their interest in video games or sports. Keywords: Bike, Exergame, Serious Game, Physical Activity, Game Design, Cycling 1 Introduction The digital revolution leads people to practice less and less physical activity and to opt for a sedentary lifestyle.
    [Show full text]
  • Rise of the LEGO® Digital Creator
    Rise of the LEGO® Digital Creator While you’ve always been able to build your own physical creations with a bucket of LEGO® bricks, the route to the same level of digital LEGO freedom for fans has taken a bit longer. The latest step in that effort sees the LEGO Group teaming up with Unity Technologies to create a system that doesn’t just allow anyone to make a LEGO video game, it teaches them the process. The Unity LEGO Microgame is the most recent microgame created by Unity with the purpose of getting people to design their own video game. But in this case, the interactive tutorial turns the act of creation into a sort of game in and of itself, allowing players to simply drag and drop LEGO bricks into a rendered scene and use them to populate their vision. Designers can even give their LEGO brick creations life with intelligent bricks that breath functionality into any model to which they’re attached. Users can even create LEGO models outside of the Unity platform using BrickLink Studio, and then simply drop them into their blossoming game. While this is just the beginning of this new Unity-powered toolset for LEGO fans, it’s destined to continue to grow. The biggest idea that could come to the Unity project is the potential ability for a fan to share their LEGO video game creations with one another and vote on which is the best, with an eye toward the LEGO Group officially adopting them and potentially releasing them with some of the profit going back to the creator.
    [Show full text]
  • Platf Orm Game First Person Shooter Strategy Game Alternatereality Game
    First person shooter Platform game Alternate reality game Strategy game Platform game Strategy game The platform game (or platformer) is a video game genre Strategy video games is a video game genre that emphasizes characterized by requiring the player to jump to and from sus- skillful thinking and planning to achieve victory. They empha- pended platforms or over obstacles (jumping puzzles). It must size strategic, tactical, and sometimes logistical challenges. be possible to control these jumps and to fall from platforms Many games also offer economic challenges and exploration. or miss jumps. The most common unifying element to these These games sometimes incorporate physical challenges, but games is a jump button; other jump mechanics include swing- such challenges can annoy strategically minded players. They ing from extendable arms, as in Ristar or Bionic Commando, are generally categorized into four sub-types, depending on or bouncing from springboards or trampolines, as in Alpha whether the game is turn-based or real-time, and whether Waves. These mechanics, even in the context of other genres, the game focuses on strategy or tactics. are commonly called platforming, a verbification of platform. Games where jumping is automated completely, such as The Legend of Zelda: Ocarina of Time, fall outside of the genre. The platform game (or platformer) is a video game genre characterized by requiring the player to jump to and from sus- pended platforms or over obstacles (jumping puzzles). It must be possible to control these jumps and to fall from platforms or miss jumps. The most common unifying element to these games is a jump button; other jump mechanics include swing- ing from extendable arms, as in Ristar or Bionic Commando, or bouncing from springboards or trampolines, as in Alpha Waves.
    [Show full text]
  • Imitation and Limitation
    Fake Bit: Imitation and Limitation Brett Camper [email protected] ABSTRACT adventure and role-playing games, which are traditionally less A small but growing trend in video game development uses the action-oriented. Several lesser known NES games contributed to “obsolete” graphics and sound of 1980s-era, 8-bit microcomputers the style early on as well, such as Hudson Soft’s Faxanadu (1989) to create “fake 8-bit” games on today’s hardware platforms. This and Milon’s Secret Castle (1986), as well as Konami’s The paper explores the trend by looking at a specific case study, the Goonies II (1987). In more recent decades, the Castlevania series platform-adventure game La-Mulana, which was inspired by the from Konami has also adopted and advanced the form, from Japanese MSX computer platform. Discussion includes the Symphony of the Night (1997) on PlayStation, through Portrait of specific aesthetic traits the game adopts (as well as ignores), and Ruin (2006) for the Nintendo DS. the 8-bit technological structures that caused them in their original La-Mulana is an extremely well made title that ranks among the 1980s MSX incarnation. The role of technology in shaping finest in this genre, displaying unusual craftsmanship and aesthetics, and the persistence of such effects beyond the lifetime cohesiveness. Its player-protagonist is Professor Lemeza, an of the originating technologies, is considered as a more general archaeologist explorer charting out vast underground ruins in a “retro media” phenomenon. distant, unspecified corner of the globe (Indiana Jones is an obvious pop culture reference, but also earlier examples like H.
    [Show full text]
  • Game Changer: Investing in Digital Play to Advance Children’S Learning and Health, New York: the Joan Ganz Cooney Center at Sesame Workshop
    Game 2 changer: June 2009 Investing in digital play to advance children's learning and health Ann My Thai David Lowenstein Dixie Ching David Rejeski The Joan Ganz Cooney Center at Sesame Workshop © The Joan Ganz Cooney Center 2009. All rights reserved. The mission of the Joan Ganz Cooney Center at Sesame Workshop is to foster innovation in children’s learning through digital media. The Center supports action research, encourages partnerships to connect child development experts and educators with interactive media and technology leaders, and mobilizes public and private investment in promising and proven new media technologies for children. For more information, visit www.joanganzcooneycenter.org. The Joan Ganz Cooney Center is committed to disseminating useful and timely research. Working closely with our Cooney Fellows, national advisers, media scholars, and practitioners, the Center publishes industry, policy, and research briefs examining key issues in the field of digital media and learning. No part of this publication may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopy, or any information storage and retrieval system, without permission from The Joan Ganz Cooney Center at Sesame Workshop. A full-text PDF of this document is available for free download from www.joanganzcooneycenter.org. Individual print copies of this publication are available for $15 via check, money order, or purchase order sent to the address below. Bulk-rate prices are available on request. For permission to reproduce excerpts from this report, please contact: Attn: Publications Department The Joan Ganz Cooney Center Sesame Workshop One Lincoln Plaza New York, NY 10023 p: 212 595 3456 f: 212 875 7308 [email protected] Suggested citation: Thai, A., Lowenstein, D., Ching, D., & Rejeski, D.
    [Show full text]
  • The Computational Complexity of Portal And
    1 The Computational Complexity of Portal and 2 Other 3D Video Games 3 Erik D. Demaine 4 MIT CSAIL, 32 Vassar Street, Cambridge, MA 02139, USA 5 [email protected] 1 6 Joshua Lockhart 7 Department of Computer Science, University College London, London, WC1E 6BT, UK 8 [email protected] 9 Jayson Lynch 10 MIT CSAIL, 32 Vassar Street, Cambridge, MA 02139, USA 11 [email protected] 12 Abstract 13 We classify the computational complexity of the popular video games Portal and Portal 2. We 14 isolate individual mechanics of the game and prove NP-hardness, PSPACE-completeness, or 15 pseudo-polynomiality depending on the specific game mechanics allowed. One of our proofs 16 generalizes to prove NP-hardness of many other video games such as Half-Life 2, Halo, Doom, 17 Elder Scrolls, Fallout, Grand Theft Auto, Left 4 Dead, Mass Effect, Deus Ex, Metal Gear Solid, 18 and Resident Evil. These results build on the established literature on the complexity of video 19 games [1, 3, 7, 18]. 20 2012 ACM Subject Classification Dummy classification 21 Keywords and phrases video games, hardness, motion planning, NP, PSPACE 22 Digital Object Identifier 10.4230/LIPIcs.FUN.2018.19 23 Related Version arXiv:1611.10319 24 1 Introduction 25 In Valve’s critically acclaimed Portal franchise, the player guides Chell (the game’s silent 26 protagonist) through a “test facility” constructed by the mysterious fictional organization 27 Aperture Science. Its unique game mechanic is the Portal Gun, which enables the player 28 to place a pair of portals on certain surfaces within each test chamber.
    [Show full text]
  • Online Gaming
    American Journal of Applied Sciences 2 (3): 622-625, 2005 ISSN 1546-9239 © Science Publications, 2005 Online Gaming Kevin Curran, Paul Canning, Martin Laughlin, Ciarán McGowan and Rory Carlin Internet Technologies Research Group University of Ulster, Magee Campus, Northland Road, Northern Ireland, UK Abstract: Computer gaming is a medium by which we can entertain ourselves, a medium that has expanded to the online worldwide market as part as globalization. The growth of online gaming has close ties with the use of broadband, as a good online gaming experience requires a broadband connection. Through online gaming, people can play and communicate with each other freely in almost any country, at any given time. This paper examines the phenomenon of online gaming. Key words: Online gaming INTRODUCTION for-all, or lock the entrances to the areas in which they play as simply play amongst a selected group of people. With the advent of the ARPANET and the development Online accounts like MPlayer also adapted their of TELNEX (1971), e-mail gaming became popular. formats to suit other forms of online gaming which The use of e-mail to play games over the network was were now becoming popular. One of their most borrowed from ‘playing-by-post’ which was popular innovative changes came with the arrival of the PC’s before the advent of widespread internet usage [1]. The intergalactic squad based piloting game, ‘Freespace’. It engine that was developed and used was the MUD’s was similar to the older versions in the way players (Multi-User Dungeon). This was the use of a server could set up, open and lock their games from other program that users logged into to play the game based users but now they could do much more.
    [Show full text]
  • Super Mario 64 Was Proclaimed by Many As "The Greatest Video Game
    The People Behind Mario: When Hiroshi Yamauchi, president of Nintendo Co., Ltd. (NCL), hired a young art student as an apprentice in 1980, he had no idea that he was changing video games forever. That young apprentice was none other than the highly revered Shigeru Miyamoto, the man behind Mario. Miyamoto provided the inspiration for each Mario game Nintendo produces, as he still does today, with the trite exception of the unrelated “Mario-based” games produced by other companies. Just between the years 1985 and 1991, Miyamoto produced eight Mario games that went on to collectively sell 70 million copies. By record industry standards, Miyamoto had gone 70 times platinum in a brief six years. When the Nintendo chairman Gunpei Yokoi was assigned to oversee Miyamoto when he was first hired, Yokoi complained that “he knows nothing about video games” (Game Over 106). It turned out that the young apprentice knew more about video games than Yokoi, or anyone else in the world, ever could. Miyamoto’s Nintendo group, “R&D4,” had the assignment to come up with “the most imaginative video games ever” (Game Over 49), and they did just that. No one disagrees when they hear that "Shigeru is to video gaming what John Lennon is to Music!" (www.nintendoland.com) As soon as Miyamoto and Mario entered the scene, America, Japan, and the rest of the world had become totally engrossed in “Mario Mania.” Before delving deeply into the character that made Nintendo a success, we must first take a look at Nintendo, and its leader, Hiroshi Yamauchi.
    [Show full text]
  • The Computational Complexity of Portal and Other 3D Video Games
    The Computational Complexity of Portal and Other 3D Video Games Erik D. Demaine* Joshua Lockharty Jayson Lynch* Abstract We classify the computational complexity of the popular video games Portal and Portal 2. We isolate individual mechanics of the game and prove NP-hardness, PSPACE-completeness, or (pseudo)polynomiality depending on the specific game mechanics allowed. One of our proofs generalizes to prove NP-hardness of many other video games such as Half-Life 2, Halo, Doom, Elder Scrolls, Fallout, Grand Theft Auto, Left 4 Dead, Mass Effect, Deus Ex, Metal Gear Solid, and Resident Evil. These results build on the established literature on the complexity of video games [Vig14, ADGV14, For10,Cor04]. 1 Introduction In Valve’s critically acclaimed Portal franchise, the player guides Chell (the game’s silent protago- nist) through a “test facility” constructed by the mysterious fictional organization Aperture Science. Its unique game mechanic is the Portal Gun, which enables the player to place a pair of portals on certain surfaces within each test chamber. When the player avatar jumps into one of the portals, they are instantly transported to the other. This mechanic, coupled with the fact that in-game items can be thrown through the portals, has allowed the developers to create a series of unique and challenging puzzles for the player to solve as they guide Chell to freedom. Indeed, the Portal series has proved extremely popular, and is estimated to have sold more than 22 million copies [YP, stea, Cao,steb]. We analyze the computational complexity of Portal following the recent surge of interest in complexity analysis of video games and puzzles.
    [Show full text]