ballz: my first android game
DESCRIPTION
Talk about your Apps presentationTRANSCRIPT
![Page 1: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/1.jpg)
![Page 2: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/2.jpg)
INTRODUCTIONINTRODUCTION
Name: Sailesh Dhungana
Education: Bachelors CandidatePrinceton University,
USA
Contact: [email protected]
9849113051
Name: Sailesh Dhungana
Education: Bachelors CandidatePrinceton University,
USA
Contact: [email protected]
9849113051
![Page 3: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/3.jpg)
PriorProgramming Knowledge
PriorProgramming Knowledge
Qbasic until Grade 10
“Introduction to Java” at Princeton
“Short Term Course on Java(Basic)” at Deerwalk Institute of Technology, Nepal
Qbasic until Grade 10
“Introduction to Java” at Princeton
“Short Term Course on Java(Basic)” at Deerwalk Institute of Technology, Nepal
![Page 4: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/4.jpg)
Talking About My Application
Talking About My Application
Name: BallZ
Type: 2D Casual Game
(Bouncing Ball)
Platform: Android
Name: BallZ
Type: 2D Casual Game
(Bouncing Ball)
Platform: Android
![Page 5: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/5.jpg)
DemonstrationDemonstration
http://www.youtube.com/watch?v=TnI8CRkvVyU
![Page 6: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/6.jpg)
Technologies Used:Technologies Used:
Java
Eclipse IDE
Android Plugin for Eclipse
Android SDK 2.2
Samsung phone with Android(for testing)
Java
Eclipse IDE
Android Plugin for Eclipse
Android SDK 2.2
Samsung phone with Android(for testing)
![Page 7: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/7.jpg)
Resources UsedResources Used
Developer.android.com/resources
“Beginning Android 4 Game Development” (APRESS) e-book for learning as well as framework
Developer.android.com/resources
“Beginning Android 4 Game Development” (APRESS) e-book for learning as well as framework
![Page 8: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/8.jpg)
Gaming Logic (For Android in Java)
Gaming Logic (For Android in Java)
Screen(View Object)
Update(method)
Present(method)
To output
To other screen objects
![Page 9: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/9.jpg)
Screen Objects:Screen Objects:
MainMenuScreen GameScreen(level, life, coins, bounces) CongratulationsScreen GameoverScreen InstructionScreen LeastBounceScreen
MainMenuScreen GameScreen(level, life, coins, bounces) CongratulationsScreen GameoverScreen InstructionScreen LeastBounceScreen
![Page 10: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/10.jpg)
FlowFlow
MainMenuScreen
InstructionScreen LeastBounceScreen
GameScreen(level:1,life:3,coins:0,bounces:0)
GameScreen(level:?,life:?,coins:?,bounces:?)
…
CongratulationsScreen GameOverScreen
![Page 11: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/11.jpg)
Gaming Mechanics:Gaming Mechanics:
Ball (Object) X Y R vX vY
1. Move()
Ball (Object) X Y R vX vY
1. Move()
Bar (Object) X Y Width Height
Bar (Object) X Y Width Height
![Page 12: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/12.jpg)
Gaming Mechanics:Gaming Mechanics:
In update method of GameScreen, we allow ball to move. In present method of GameScreen, we just draw the ball.
If Ball touches the bar, vY = - vYand vX = (bar.X-ball.X)* (some factor)
If Ball touches the borders, vX or vY changes sign.
(The hard part is to tell when does the ball touch the bar)
In update method of GameScreen, we allow ball to move. In present method of GameScreen, we just draw the ball.
If Ball touches the bar, vY = - vYand vX = (bar.X-ball.X)* (some factor)
If Ball touches the borders, vX or vY changes sign.
(The hard part is to tell when does the ball touch the bar)
![Page 13: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/13.jpg)
Gaming Mechanics:Gaming Mechanics:
Otherwise, the ball moves:
X= X+vX*deltaTime Y= Y+vY*deltaTime vY= vY+a*deltaTime
deltaTime is the time taken between two successive GameScreen updates.
Otherwise, the ball moves:
X= X+vX*deltaTime Y= Y+vY*deltaTime vY= vY+a*deltaTime
deltaTime is the time taken between two successive GameScreen updates.
![Page 14: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/14.jpg)
Gaming Mechanics:Gaming Mechanics:
Also, we have Coin object for coin. We change coin’s position in update method and draw it in present method of GameScreen object.
There is also the catching of the coin.
Also, we have Coin object for coin. We change coin’s position in update method and draw it in present method of GameScreen object.
There is also the catching of the coin.
![Page 15: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/15.jpg)
Current ProblemsCurrent Problems
Graphics/UI is not great. Sound is awful. One complaint about physics but could be
because of an earlier version. Background pictures for later levels.
Graphics/UI is not great. Sound is awful. One complaint about physics but could be
because of an earlier version. Background pictures for later levels.
![Page 16: BallZ: My first Android game](https://reader036.vdocuments.mx/reader036/viewer/2022062514/558cfbdbd8b42a3a2d8b45a5/html5/thumbnails/16.jpg)
Advise(as much as a newb can give)
Advise(as much as a newb can give)
If you are bad at graphics, get someone else to work with you.
Maybe using a gaming engine is better.
Don’t try to finish as fast as you can. There is no race!!!
If you are bad at graphics, get someone else to work with you.
Maybe using a gaming engine is better.
Don’t try to finish as fast as you can. There is no race!!!