Download
michael birsak and michael hanzl n.
Skip this Video
Loading SlideShow in 5 Seconds..
Michael Birsak and Michael Hanzl PowerPoint Presentation
Download Presentation
Michael Birsak and Michael Hanzl

Michael Birsak and Michael Hanzl

102 Vues Download Presentation
Télécharger la présentation

Michael Birsak and Michael Hanzl

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Michael Birsak and Michael Hanzl Institute of Computer Graphics and Algorithms Vienna University of Technology

  2. Outline • Motivation • Relatedwork • Game description • Implementation • Performance • Demo • Future Work • Conclusions M. Birsak, M. Hanzl

  3. Motivation • Developandrelease a 3D game • Google Android • OpenGL ES • Experiment withAndroid • NOT a computergraphicsdemo!!! M. Birsak, M. Hanzl

  4. Related Work • Many 2D games (tiles) • Basicallyno 3D game in Spring 2009 • Now: Some 3D gamesavailable • Android Knight (3D Chessgame) • Games fromOmniGSoft: • Super-G Stunt • Snow Rally City Stage • … M. Birsak, M. Hanzl

  5. Idea • Space Taxi forCommodore 64 (1984) • Space Taxi 2 (2004) • Someinofficialversions M. Birsak, M. Hanzl

  6. Game Overview • 3D, but discreteheightlevels • 7 levels + 7 bonuslevels • 3 lives & power • Transport passengers in 3 minutes • Score • Highscore M. Birsak, M. Hanzl

  7. Game Objects • Transporter • Passenger • Terrorist • Asteroid • Geyser Bullet • Packet • Banana M. Birsak, M. Hanzl

  8. Controlling • Devices have different inputunits • Accelerometer • Calibration • Howtoascendordescend? • Slider • Height depends on thevelocity M. Birsak, M. Hanzl

  9. ImplementationOverview • CollisionDetection • View FrustumCulling • Modelloader (obj) • LOD • Effects • Random levelgeneration • Ownmodels & images & sounds • Settings • Local & Online Highscore M. Birsak, M. Hanzl

  10. Highscore Features Online Highscore LocalHighscore Compareyourownresults Delete all entries • Competeagainstotherusers • Onlyoneentry per user • Registration required • Searchforyourownresult • View highscore on yourAndroiddevice • Detailedoverviewofthehighscoreentries • Overviewofyourresult after insert • Correcthandlingof time zones • Correcthandlingofties M. Birsak, M. Hanzl

  11. HighscoreImplementation • LocalHighscore • SQLite • Online Highscore • Insert / Login / Register: HTTP Post (HTTPS!) • Retrieve Data: HTTP / XML • Web-Server: PHP / MySQL Client Server HTTP Post Response Androiddevice Webserver M. Birsak, M. Hanzl

  12. Highscore Security • Avoid SQL-Injections • Check andconstraintheuserinput • PHP escapefunction • Password → SHA-512 Hash • Secure connection (HTTPS) • Check thehighscore • Special „password“ • Check constraints:s-pt:22-pt:48-pt:17-pt:10-le:1-ti:28-b-b-le:1001-pk-pp-d-d-d M. Birsak, M. Hanzl

  13. Lifecycle • Activitiescouldbeinterrupted • Activity not killed • Activitykilled • Screen orientationchange • Lessmemory • Save / restorestate • Do not block themainthread! • Avoidinjuries!!! M. Birsak, M. Hanzl

  14. Performance Issues • Geometry • Rasterizer • Creatingobjects expensive • GarbageCollector (~100 - 300ms) • ObjectOriented Design • Functioncalls: local, via interface, JNI • Loadingandparsing ASCII filesisslow M. Birsak, M. Hanzl

  15. Performance Solution • Reuse yourobjects→ Object Pool • Try toavoidgarbage • Concatenated Strings / Java built-in methods! • InvokeGarbageCollectormanually • Decreasethenumberofpolygonsto render • Usethedraw_textureextension • Use Java ObjectSerializationfor model loading • Write codethatis fast Reference: Chris Pruett: Writing Real Time Games ForAndroid, Google IO 09, May 2009 M. Birsak, M. Hanzl

  16. Performance • G1: 20 - 30 FPS • Emulator: 10 - 20 FPS (Dual Core 2x3Ghz) • Models: 18 - 508 / 372 triangles M. Birsak, M. Hanzl

  17. Demo M. Birsak, M. Hanzl

  18. Skills andBenefits • Controlling thegameis not easy! • Measuringdistances • Spatialimagination • Find strategiesveryquickly • Balance betweenspeedand score • Trust in luck • Work under stress M. Birsak, M. Hanzl

  19. Future work • Save thegame • Highscoresearch • Objects • Planets / suns • Spaceships (enemies) • Effects • LensFlare M. Birsak, M. Hanzl

  20. Conclusions: Android • Permanent furtherdevelopment • License: „Free“ • Easy towriteapplications, but… • Great tools, examples, community, guidelines • OpenGL ES support not perfect • Different hardware(currently ~11 smartphones) • Different displayresolutions • Different inputunits • Performance • Emulator ǂ Real Device M. Birsak, M. Hanzl

  21. The END • Thankyouforyourattention • Special thanksto Peter Rautek & theinstitute • Are thereanyquestions? M. Birsak, M. Hanzl