BRICK BREAKER A PROJECT REPORT Submitted by SAHIL AGARWAL ANKUSH JANGID KSHITIJ TRIPATHI SWARNIMA DIXIT towards the partial fulfillment for the course requirements of OPERATING SYSTEM in ANDROID APP DEVELOPMENT 1 | Page
Feb 01, 2016
BRICK BREAKER
A PROJECT REPORT
Submitted by
SAHIL AGARWALANKUSH JANGID
KSHITIJ TRIPATHISWARNIMA DIXIT
towards the partial fulfillment for the course requirementsof
OPERATING SYSTEM
in
ANDROID APP DEVELOPMENT
INDIAN INSTITUTE OF INFORMATION TECHNOLOGYALLAHABAD (211012)
NOVEMBER 2015
1 | P a g e
Indian Institute of Information Technology : Allahabad 211 012
BONAFIDE CERTIFICATE
Certified that this project report on “Brick Breaker”
is the bonafide work of “SAHIL AGARWAL, ANKUSH JANGID,
KSHITIJ TRIPATHI, SWARNIMA DIXIT”
who carried out the project work under my supervision.
Dr. MUNEENDRA OJHA
SUPERVISOR
2 | P a g e
ABSTRACT
"Brick Breaker" is a classic Android arcade game. The game is mainly based
and motivated from the game "Arkanoid" (released in 1986, developed by
Taito).
The game play is based on elementary physics i.e. reflection principle.
Brick Breaker (platformer) is a game in which the player must smash a wall of
bricks by deflecting a bouncing ball with a paddle. The paddle moves
horizontally and is controlled with Android Touch or the computer's touch
screen . When all the bricks have been destroyed, the player advances to a new
level. There are 5 levels with color-coded tiles and entertaining Creative
Common's Licensed music.
The game is considered PG5 due to stress levels and the concentration levels
required by the game.
3 | P a g e
TABLE OF CONTENTS
CHAPTER NO. TITLE PAGE NO.
ABSTRACT 3
1. INTRODUCTION
1.1 Introduction to Unity 6
1.2 Introduction to Android Platformer 7
1.3 Introduction to Brick Breaker 8
2. GAME DESIGN
2.1.1 General UI 10
2.2 Level Design 11
3. Conclusion 12
4. Appendix
4.1 A1 - Motivation 14
4.2 A2 - Challenges, Problems and Solutions15
4.3 A3 - Unity 16
4.4 A4 - C# 17
5. Bibliography 18
4 | P a g e
INTRODUCTION
5 | P a g e
INTRODUCTION TO UNITY ENGINE
Unity is a cross-platform game engine developed by Unity Technologies and
used to develop video games for PC, consoles, mobile devices and websites.
Unity Pro is available for a fee and Unity Personal has no fee; it is available for
any use to individuals or companies with less than US$100,000 of annual gross
revenue. On March 3, 2015 with the release of Unity 5.0, Unity Technologies
made the complete engine available for free including all features. Unity is
noted for an ability to target games to multiple platforms.
With an emphasis on portability, the engine targets the following APIs:
Direct3D on Windows and Xbox 360; OpenGL on Mac and Windows; OpenGL
ES on Android and iOS; and proprietary APIs on video game consoles. Unity
allows specification of texture compression and resolution settings for each
platform the game engine supports, render-to-texture and full-screen post-
processing effects.
The game engine's scripting is built on Mono, the open-source implementation
of the .NET Framework. Programmers can use UnityScript (a custom language
with ECMAScript-inspired syntax, referred to as JavaScript by the software) or
C#.
Unity is notable for its ability to target games to multiple platforms. Within a
project, developers have control over delivery to mobile devices, web browsers,
desktops, and consoles.
6 | P a g e
INTRODUCTION TO ANDROID PLATFORMER
Android is a mobile operating system (OS) currently developed by Google,
based on the Linux kernel and designed primarily for touchscreen mobile
devices such as smartphones and tablets. Android's user interface is based on
direct manipulation, using touch gestures that loosely correspond to real-world
actions, such as swiping, tapping and pinching, to manipulate on-screen objects,
along with a virtual keyboard for text input. As of 2015, Android has the largest
installed base of all operating systems.
Android is Open-Source (courtesy Google Inc.) with huge community and tech
support which make it among the best platforms to work upon. Android SDK
2.0 is the current official version released by Google for making Android
Application Development easier for Developers throughout the globe.
7 | P a g e
INTRODUCTION TO BRICK BREAKER
"Brick Breaker" is a classic Android arcade game.
The game play is based on elementary physics i.e. reflection principle.
Brick Breaker (platformer) is a game in which the player must smash a wall of
bricks by deflecting a bouncing ball with a paddle. The paddle moves
horizontally and is controlled with Android Touch or the computer's touch
screen . When all the bricks have been destroyed, the player advances to a new
level. There are 5 levels with color-coded tiles and entertaining Creative
Common's Licensed music.
The game is fun to play, Open Source (courtesy Developers) and has a childish
element to it.
8 | P a g e
GAME THEME
9 | P a g e
THE GENERAL UI
The game UI has a very elegant and sophisticated feel with very simple layouts and textures and interesting background music, and smooth working buttons. The game becomes fun to play.
10 | P a g e
LEVELS
The game levels have been thoughtfully designed considering the difficulty level after thorough surveys which adds to the game experience. The levels have color coded bricks with following color codes.
BLUE -- 1 HIT -- 10 POINTS
GREEN -- 2 HIT -- 20 POINTS
YELLOW -- 3 HIT -- 35 POINTS
RED -- 4 HIT -- 50 POINTS
When the player taps in the center of the screen, the ball takes flight. On tapping either side of the screen the paddle moves in the corresponding direction.
11 | P a g e
CONCLUSION
The game produces output as expected for inputs.
The paddle moves in the direction corresponding to the touch.
The ball launches when the screen is tapped.
The bricks get destroyed as expected.
The player score is incrementing based upon the brick destroyed.
Levels progress upon completion.
Game loss screen is displayed after a loss of 3 lives.
12 | P a g e
APPENDICES
13 | P a g e
APPENDIX A1
MOTIVATION
In the start of this wonderful experience, we actually planned to develop
an E-commerce Application. The idea was dropped later because we
thought it was too mainstream, then we finalized the quizzing App, that
idea was too dropped because of small audience and less exposure.
Finally we choose, the Brick Breaker.
14 | P a g e
APPENDIX A2
CHALLENGES, PROBLEMS AND SOLUTIONS
The challenges we faced were designing the Sprites i.e the game
components such as paddle, bricks, balls, etc. Another challenge was
learning nVidia physx2D which included colliders. Next challenge was
understanding FPS (Frames Per Second) and touch movements. Content
Designing was another thing we had to think upon because it is the crux
of the game. Lastly, we knew that Android Studio would be a poor choice
for coding the game due to limited interfacing and in-built functions.
The problems we faced during the development stage and the best
solution we could find in the given time frame:-
1.) Choosing an suitable game engine amongst Unity, Unreal4,
CryEngine3 and learning them.
(Unity - fast, free and huge community)
2.)Choosing the best alternative among C#, JavaScript and Python
(C#)
3.)Learning the touch interface of a standard Android device for placing
the Sprites.
(Video Tutorials - Refer Bibliography)
15 | P a g e
APPENDIX A3
UNITY
Unity Engine was developed by Unity Technologies Ltd. for proving a platform to all the aspiring game developers. The tutorials available online guided us through the process of creating a basic game.
The class TouchManager is the header class which is implemented in the touchMovements and has the following aspects - TouchBegan, TouchEnded, TouchMoved, TouchStationary. With support of two fingers, the functions are implemented for the second finger as well. This part concludes the basic touch interface.
The classes playerScript, ballScript and blockScript are used with the paddle, ball and coloured bricks. The concept of preFabs is used to implented the basic content design which is inbuilt in unity Editor.
Finally the class Score is used to maintain the user score and the player Lives which are complimentary in the game start (3).
16 | P a g e
APPENDIX A4
C#
C# is a multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed by Microsoft within its .NET initiative and later approved. C# is one of the programming languages designed for the Common Language Infrastructure.
Unity provides the option of using C# or JavaScript. C# is a smoother and easier alternative due to its similarities with Java.
C# need not be learned separately for Unity provides users with extensive guides on Demand.
17 | P a g e
BIBLIOGRAPHY
C# Wikipedia Page - https://en.wikipedia.org/wiki/C_Sharp_(programming_language)
Android Wikipedia Page - https://en.wikipedia.org/wiki/Android_(operating_system)
Unity Game Engine Wikipedia Page - https://en.wikipedia.org/wiki/Unity_(game_engine)
SoundCloud for CCL - soundcloud.com
Unity 3D Online Documentation - http://docs.unity3d.com/
Orlando Pereira and Pedro Pereira evantoTuts+ http://gamedevelopment.tutsplus.com/series/build-arkanoid-with-unity--cms-590
Bud Broesky YouTube playlist https://www.youtube.com/playlist?list=PLFBW2dNYENEsmHq3Vp8I4Ac7-Zo5QOy8F
18 | P a g e