Developing-Snapdragon-Games-for-Xperia-PLAY - Uplinq

uplinq.com
  • No tags were found...

Developing-Snapdragon-Games-for-Xperia-PLAY - Uplinq

Developing Snapdragon-PoweredGames for the Xperia PLAYAnupam Nath, Kim AhlstromSony EricssonRev PA1 5/30/2011 1


About this talk• Audience– Basic Android Experience– Game Development Experience– C/C++ Experience– No prior NDK Knowledge needed• Agenda– Xperia PLAY– Optimizing games– Optimize graphical performance– Game Design/Development RecommendationsRev PA1 5/30/2011 2


Sony Ericsson Xperia PLAY• First PlayStation® Certified device• First all-in-one handset and game console• Real Gaming control keys –directional pad,trigger buttons, PlayStation® buttonsRev PA1 5/30/2011 3


Developing on Xperia PLAYGetting StartedAnupam NathRev PA1 5/30/2011 4


How to start Development for Xperia PLAYAndroid 2.3 (Gingerbread)Android Native Development Kit (NDK )Rev PA1 5/30/2011 5


Accessing Gamepad buttons• Access Gamepad buttons usingKeycodes• Keycodes listhttp://blogs.sonyericsson.com/wp/2011/02/13/xperia-play-game-keys/• Use OnKeyDown()• Make your games navigational usinghardware keys- It comes naturally togamers!Rev PA1 5/30/2011 6


Differentiate between BACK and CIRCLERev PA1 5/30/2011 7


Native Activity• Helps developers to port and develop pureC/C++ games• Support in Android 2.3 (Gingerbread)Rev PA1 5/30/2011 8


Native Activity – Android ManifestRev PA1 5/30/2011 9


Accessing TouchpadRev PA1 5/30/2011 10


Graphics OptimizationKim AhlstromRev PA1 5/30/2011 11


Rendering• Use Native resolution for framebuffer• Draw order is important– Has no impact on some platforms, means everything on some– Draw front to back to make best use of early rejects– Always use VBO’s• Pixels are expensive– Most architectures process 1 pixel per clock– Use up-scaling to address– Extra important for as resolutions gets higher!Rev PA1 5/30/2011 12


Textures• Use ETC1 for compressed textures with no alpha• Use a separate download package with assets that haveplatform dependency. Ex. Compressed textures withalpha• For textures with alpha make sure to have fallback touncompressed as wellRev PA1 5/30/2011 13


Shaders• Query, query– Make sure to query for number of attributes, varying anduniforms supported• Varies between devices and will make your application crash!!• Conditions:– Avoid as much as possible– Use mix(), clamp(), etc to create the same result– IF you have to use conditions, put them last in the shader tominimize impact• discard():– Avoid discard, but if necessary it should be lastRev PA1 5/30/2011 14


Game Developer Recommendations forXperia PLAYAnupam NathRev PA1 5/30/2011 15


Key Areas• Application• Audio• Display• Input• Lifecycle• Packaging• Save/LoadRev PA1 5/30/2011 16


Application recommendations• Menus need exit functionality.• Separate game logic from frame rendering• Game responsiveness is important.• Downloads should auto-resume.• Games must be updatable.Rev PA1 5/30/2011 17


Audio recommendations• Audio should operate correctly.• Audio should be adjustable.Rev PA1 5/30/2011 18


Display recommendations• Game text should be readable• Don’t block display with on-screen controllers.• Show the PlayStation® buttons(△/○/×/□),should be representedaccurately.• Min Frame rate: 30fps• Preferable Frame rate: 60fps• Apply correction resolution.Rev PA1 5/30/2011 19


Input recommendations• Make use of hardware keys.• Keep the actions of hardware keysconsistent.• Display current battery level.• Enumerate input capabilities of device.Rev PA1 5/30/2011 20


Lifecycle event recommendations• Minimized games should unload resourcesfrom memory.• Suspend/resume should work.• Mounting/unmounting of storage eventsshould work.• Handling incoming calls should work.• Pause game when resuming from otherstates.Rev PA1 5/30/2011 21


Packaging recommendations• Compression should be used appropriately.• Ensure correct permissions.• Android game application ID format :com.nameofcompany.nameofgame.• Game should by default install on SD card.• Movable to external storage and runnablefrom there.Rev PA1 5/30/2011 22


Save/load recommendations• Encrypt saved data.• Encrypt sensitive data.• Save/load should perform correctly.• Auto-save preferences and settings• Confirm available space before saving.Rev PA1 5/30/2011 23


We are listening developers!• Want to unlock the bootloader?– http://unlockbootloader.sonyericsson.com/• Want your application to “Stand Out”?– http://standout.sonyericsson.com/• Want a device to develop?– http://developer.sonyericsson.com/• Want to develop on the latest and greatest?– Android 2.3Rev PA1 5/30/2011 24


Useful Links• Sony Ericsson Developer World– developer.sonyericsson.com• Adreno Profiler– http://developer.sonyericsson.com/wportal/devworld/article/developerresourcesgamesandgaming?cc=gb&lc=enRev PA1 5/30/2011 25

More magazines by this user
Similar magazines