with desktop Flash for six years – Developer , “Try” to be a Designer – Blogging about Flash (Mobile) for 4 years MOBILE – Working with Flash Lite 1.1, 2.0, 2.1 – Flash Lite 1.1/2.x Training Instructor – Coauthor: “Foundation Flash Applications for Mobile Devices” – Mobile Gaming Enthusiast – ™
coming to 3.0) • Distribution: – Working directly with 3rd party mobile (game) companies – Flash Lite Exchange, Moket MCN (“in talks with”), Partnerships: Handango, ClickApps, other aggregators, etc. • Products soon – Don’t Wake the Dragon, MORE! Symbian Series 60 Content iRiver Clix game viliv p1 Sudoku game
Curve – More Expensive – Guilt in not finishing – More time investment “Casual” – Fun, Addictive – No learning curve – Inexpensive – No guilt – Less time investment
… • Role playing games (RPG) – Final Fantasy, etc. • Sports – EA SPORTS™ Madden 07 • Skill, Strategy, Logic – Mine Sweeper, Sudoku • Multiplayer – Mario Kart, Texas Hold’em • 2‐D, 3‐D Racers – Tron, Mario Kart • Card and board games – Slots, Blackjack, Monopoly • First Person Shooters – Quake, Doom … Above: these just happen to be Flash Lite games that fit some of the genres …
of the inherent advantages of the mobile platform. People want to fill ‘dead time’ with easy to use, but fun games.” – Bruce Gibson, Research Director with Juniper Research.
Nice idea for mobile, but … – Lots of devices, different capabilities, implementations, etc • Fragmentation is “fact of life” – Native, J2ME, etc – Flash Lite is NOT immune, but much LESS affected Handsets PDAs “Consumer Electronics”
GAME DEPLOY DISTRIBUTION DEPLOY OTHER PLATFORMS Idea/Concept Operators, Aggregators & Content Providers .sis packaging Other platforms … Symbian Series 60
) { /:x =+ 1; } – movie clips can act as libraries (“function clips”) • eval() – Simulate Pseudo Arrays using variables and eval – x1 = “foobar”; i = 1; eval( “x” add i ); • Game State Frame Labels(menu, gameplay, etc) • More ... – My Flash Lite 1.1 “Reference Sheet” (PDF)
0,1,2,3,4,5,6,7,8, #, * • Soft Keys – Typically LEFT, RIGHT – FL 2.x supports multiple softkeys • Text Input – FL 1.1 uses device for input – FL 2.x built in text input (T9) • 5 Way Direction Joystick – UP, DOWN, LEFT, RIGHT, SELECT
play and graphics • Should be very responsive – Smooth Animations – Immediate Actions • Game Challenge – Better to have many stages/levels – Timing + Rhythm + Reaction = GAME EXPERIENCE • Key Lag – Between device platforms – Tweak timing calculations (if needed) Sample
hitTest() • Primitive Math • Chapter 6 in our book FLASH LITE 2.x • ActionScript 2.0 • hitTest() available • More complexity possible • … also in 6 EXAMPLE EXAMPLE
games – i.e. Character movement, etc. enemy_mc.onEnterFrame = move; player_mc.onEnterFrame = function() { //‐‐ do xyz } • Performance – Remember call is executed X times per FPS – LIMIT multiple onEnterFrames() • Use only for more robust target devices • Flash Lite 1.1 = “frame looping”
portable consoles – Memory and Performance • Avoid overtly complex game computations • Flash Lite 1.1 – supports limited Flash 5 object – Drawing API can be simulated (sort of) • Flash Lite 2.x – supports AS2 Math object – Drawing API – onEnterFrame() EXAMPLE
Results in smaller file size • Position anywhere on x, y doesn’t matter • Not consistent look & feel • No anti‐aliasing • Point Size Restrictions Pixel Fonts • Hundreds available • Larger file size • Position on x, y integer values – i.e. x=0.0, y=0.0 • Consistent look & feel • No anti‐aliasing • Use various point sizes Device fonts save space Device fonts save space Device fonts save space Use pixel fonts for look/feel Use pixel fonts for look/feel Use pixel fonts for look/feel
Less CPU resources • More memory • Scaling/Rotating = Bad • “Smaller” file size • More CPU resources • Less memory • Scaling/Rotating = OK Vectors preserve look when scaled Pixilation occurs on bitmap assets when scaled “Versus”
guaranteed • Dynamic • Typically 1000 KB … 0 kB and up to 6,000 KB • Fluctuates depending on other apps, etc. • FSCommand2 API var total_num:Number = fscommand2( “GetTotalPlayerMemory” ); var free_num:Number = fscommand2( “GetFreePlayerMemory” ); • Problem with Content #1: “Out of Memory” • Garbage Collection • 60 seconds idle or significant rise in memory usage • We need an API to avoid memory leaks!
Devices – Download: www.pushl.com/taskspy NEW ! Adobe Device Central “Performance Calibration Tool” – Each device has “index” – Simulated CPU usage – Performance reporting – Only visual elements • AS 2.0 Profiling Tool http://www.nochump.com/asprof
same color depth • 12‐bit to 24‐bit … typically 16‐bit • Example Devices • Nokia S40 6131 (24‐bit) versus Nokia S40 5300 (18‐bit) • Adobe Device Central • Search capabilities Color Palette may need adjusting if ported to new target device.
possible • .PNG’s over .JPG’s for bitmaps • Optimize shapes and outlines • Split up and tile complex Background Bitmaps • AVOID: – animating simultaneous movieclips – complex uses of Math and looping – a lot of ActionScript contained in one frame
LOTS OF TIPS! – http://www.adobe.com/devnet/devices/ • MANY MORE tricks for Flash Lite (2.x) … Optimization “Tips and Tricks” “Optimizing content for Flash Lite 2.0” ‐ Josh Ulm (Adobe) http://www.adobe.com/devnet/devices/flash_lite_optimization.pdf
– Sony PSP ROM update version 2.70 or later • Flash Player 6 (6,0,72,27) – Reality = Think “Flash Lite 2.1” • Run methods – embedded SWF in HTML page for web browser – file:/flash/filename.swf • PSP Dev Center on Adobe – Features, Technical, DevNet Article: • http://www.adobe.com/devnet/devices/psp.html
Turn based games … Card Games, Puzzles, etc. • Challenges – Latency, Bandwidth, Billing Usage (pay per Kilobyte, etc) • Communication Methods – HTTP (Polling) – Flash Lite 1.1 • loadVariables(), loadVars(), etc – XML Sockets – Flash Lite 2.1, 3.0 • Sushi Socket Server (Flash Lite API) • Tornado – Open Source Java NIO Server • Other commercial Socket Servers – SWX • SWF like format for data exchange • http://www.swxformat.org – Flash Lite = Bluetooth • Extending Flash Lite = Kuneri Lite and Flyer (Open Source Project) Custom Socket Server … Chapter 6 Sushi Socket Server Game
Lite 3? – Native Flash Video now supported – T.B.D. • “Wish List” for Flash Lite in the future – Garbage Collection API – Bitmap Caching – Access to Camera/Bluetooth Support – LBS Support (Location Based Services) – Self contained Player distribution files • Questions?
Mobile Devices – http://www.flashmobilebook.com • Resources – http://www.scottjanousek.com/flashforward • – http://frame27.blogspot.com • Contact Me • Mobile Game Community [email protected]