58
Yes, it is a Mobile World Yes, it is a Mobile World Yes, it is a Mobile World Yes, it is a Mobile World This photo was NOT photoshopped. It is an actual images of old recycled 90’s devices.

Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Embed Size (px)

DESCRIPTION

A presentation on mobile game creation using Flash Lite I did at FITC 2007.

Citation preview

Page 1: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Yes, it is a Mobile WorldYes, it is a Mobile WorldYes, it is a Mobile WorldYes, it is a Mobile World

This photo was NOT photo‐shopped. It is an actual images of old recycled 90’s devices.

Page 2: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Some “Boston‐ian Lingo”Some “Boston‐ian Lingo”

1 CLAM “CHOW‐DAHH”1 CLAM “CHOW‐DAHH”1. CLAM  CHOW‐DAHH1. CLAM  CHOW‐DAHH2. DOOR‐CHEST‐AHHH2. DOOR‐CHEST‐AHHH3. P‐ahh‐k the K‐ahh on the T‐ahh3. P‐ahh‐k the K‐ahh on the T‐ahh

Page 3: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

The Art and Zen of Mobile Game Creation with FlashThe Art and Zen of Mobile Game Creation with FlashGame Creation with FlashGame Creation with Flash

Scott Janousek, Technical DirectorScott Janousek, Technical Director

www.hookenmobile.com

fitc2007@hookenmobile [email protected]

Page 4: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

About MeAbout MeAbout MeAbout MeGENERAL INFO

F B t M h tt USA– From Boston, Massachusetts, USA

– Working with desktop Flash for six years

– Designer & DeveloperDesigner & Developer

– 3+ year old blog (time for a new one!)

MOBILEMOBILE– Working with Flash Lite 1.1 and 2.x

– Flash Lite 1.1/2.x Training Instructor

– Coauthor: “Foundation Flash Applications for Mobile Devices” 

– Mobile Gaming Enthusiast

– ™

Page 5: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Flash Lite Design, Development, Training, Consulting

Page 6: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Mobile Games PortfolioMobile Games PortfolioMobile Games PortfolioMobile Games Portfolio

• Flash Lite 1 1 and 2 xFlash Lite 1.1 and 2.x

• Distribution:Working directly with 3rd party mobile game companies– Working directly with 3rd party mobile game companies

– Flash Lite Exchange

• More products in 2007• More products in 2007– Don’t Wake the Dragon, MORE!

Symbian Series  60 content  iRiver Clix game

viliv p1 Sudoku game

Page 7: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

M bil GM bil GMobile GamesMobile Games“Worldwide revenue for mobile gamingWorldwide revenue for mobile gaming subscriptions could increase from $3 billion to $10.5 billion in 2009 “– Juniper Research LtdLtd.

Page 8: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Mobile Game MarketsMobile Game MarketsMobile Game MarketsMobile Game Markets“Power” “Casual”

– Power Gamers– High Learning Curve

– Fun, Addictive– No learning curve

–More Expensive– Guilt in not finishing

– Inexpensive– No guilt

–More time investment

– Less time investment

Page 9: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Mobile Game GenresMobile Game GenresMobile Game GenresMobile Game Genres• Arcade/Action

Snake Bomber Alien

• Multiplayer

Mario Kart Texas Hold’em– Snake, Bomber, Alien Invasion …

• Role playing games (RPG)

– Mario Kart, Texas Hold em

• 2‐D, 3‐D Racers

– Tron, Mario Kart– Final Fantasy, etc.

• Sports

Tron, Mario Kart

• Card and board games

– Slots, Blackjack, Monopoly– EA SPORTS™ Madden 07 

• Skill, Strategy, Logic

Mi S S d k

• First Person Shooters 

– Quake, Doom …– Mine Sweeper, Sudoku

Above:  these just happen to be Flash Lite games that fit some of the genres …

Page 10: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Mobile Game Mobile Game Design with FlashDesign with Flash

“Casual Games make most use 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 Researchfun games   Bruce Gibson, Research Director with Juniper Research.

Page 11: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Mobile Game ChallengesMobile Game ChallengesMobile Game ChallengesMobile Game Challenges

• Smaller Screen Sizes • User Input• Smaller Screen Sizes

• Color Depths

• User Input

• Walled Gardens

• Limited Memory

• Limited Processor

• Portability

• Learning Platforms• Limited Processor

• File Size

• Learning Platforms

• Fragmentation

• Battery Life • … many more!

Page 12: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

“Holy Grail” = W.O.R.A.“Holy Grail” = W.O.R.A.Holy Grail    W.O.R.A. Holy Grail    W.O.R.A. • Write Once Run Anywhere

• Nice idea for mobile, but …– Lots of devices different capabilities implementations etcLots of devices, different capabilities, implementations, etc

• Fragmentation is “fact of life”N ti J2ME t– Native, J2ME, etc

– Flash Lite is NOT immune, but much LESS affected

HandsetsHandsets PDAsPDAs “Consumer Electronics”“Consumer Electronics”

Page 13: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Platform Decisions for Platform Decisions for Mobile Games …Mobile Games …

Page 14: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Flash Lite Players *Flash Lite Players *Flash Lite Players   Flash Lite Players   * From Boston? Say “Play‐ahs” ☺

Page 15: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Flash Lite Game Life CycleFlash Lite Game Life CycleDESIGN GAMEDESIGN GAMEDESIGN GAMEDESIGN GAME

DEVELOP GAMEDEVELOP GAMEDEVELOP GAMEDEVELOP GAME

Idea/Concept

DEVELOP GAMEDEVELOP GAMEDEVELOP GAMEDEVELOP GAME

TEST GAMETEST GAMETEST GAMETEST GAME

Other platforms … Symbian Series 60

DEPLOY                   DEPLOY                   DEPLOY                   DEPLOY                   

DISTRIBUTIONDISTRIBUTIONDISTRIBUTIONDISTRIBUTIONDEPLOY DEPLOY OTHEROTHERPLATFORMSPLATFORMS O t A t

p f y

PLATFORMSPLATFORMS Operators, Aggregators& Content Providers

.sis packaging

Page 16: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Mobile GameMobile GameMobile Game Development with Flash

Mobile Game Development with FlashDevelopment with FlashDevelopment with Flash“The Flash Lite Platform offers one of the best environments for rapid mobile game development for casual type contentfor rapid mobile game development for casual type content found  today.” ‐Me

Page 17: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Flash Lite 1.1 vs. 2.x Flash Lite 1.1 vs. 2.x Coding ParadigmsCoding Paradigms

FL 2.x ‐ Class Based

• Penetration = Lower

FL 1.1 ‐ Timeline Driven

• Penetration = Higher• Penetration = Lower

• ActionScript 2.0

• Penetration = Higher

• “ActionScript 0.5”– Code Reuse

– Modularity

Maintenance

– Code Reuse

– Modularity

Maintainance– Maintenance

– Extensibility

– Less time to learn

– Maintainance

– Extensibility

– Less time to learnLess time to learn

– Larger project content

Less time to learn

– Smaller project content

Page 18: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Flash Lite 1.1 Syntax RefresherFlash Lite 1.1 Syntax RefresherFlash Lite 1.1 Syntax RefresherFlash Lite 1.1 Syntax Refresher

• tellTarget()– tellTarget( /player_mc/ ) { /:x =+ 1; }

–movie clips can act as libraries (“function clips”)p ( p )

• eval()Si l t P d A i i bl d l– Simulate Pseudo Arrays using variables and eval

– x1 = 23; eval( “x” add i );

• Game state Frame Labels (menu, gameplay, etc)

• More ...More ...–My Flash Lite 1.1 “Reference Sheet” (PDF)

Page 19: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Device Keys/Text InputDevice Keys/Text InputDevice Keys/Text InputDevice Keys/Text Input• Target devices often varyg f y• Keys: 0,1,2,3,4,5,6,7,8, #, *• Soft Keysy

– Typically LEFT, RIGHT– FL 2.x supports multiple softkeyssoftkeys

• Text Input– FL 1.1 uses device for inputuses de ce o put– FL 2.x built in text input (T9)

• 5 Way Direction Joystick– UP, DOWN, LEFT, RIGHT, SELECT

Page 20: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Keys in Flash Lite 1.1Keys in Flash Lite 1.1Keys in Flash Lite 1.1Keys in Flash Lite 1.1• Flash 4 style syntax

• “Key Catchers”– button off Stage with ActionScriptbutton off Stage with ActionScripton( keyPress “<UP>” ) { /player_mc/:y += 1; } 

• Soft KeysSoft Keys– Typically 2 or moreretVal = fscommand2( “setSoftKeys” “left” “right” );retVal = fscommand2(  setSoftKeys ,  left ,  right  );

on( keyPress “<PAGEUP>” ) { //‐‐do xyz }

EXAMPLE

Page 21: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Keys in Flash Lite 2.xKeys in Flash Lite 2.xKeys in Flash Lite 2.xKeys in Flash Lite 2.x//‐‐method #2 – Key Listener 

bj Obj t Obj t()

//‐‐method #2 – keyDown event

l K D f ti () {move_obj:Object = new Object();

move_obj.onKeyDown = function() {

switch (Key.getCode()) {

player_mc.onKeyDown = function() { switch (Key.getCode()) {

case Key.UP :this y += 1;case Key.UP :

player_mc._y += 1;break;

}

this._y += 1; 

break;}

}}

}

Key.addListener( move_obj );

}

}

Key.addListener( player_mc );

//‐‐method #3 ‐ onEnterFrame and isDown()move_mc.onEnterFrame = function() {if ( i ( )) { l } EXAMPLEif (Key.isDown(Key.UP)) { player_mc._y += 1; }}

EXAMPLE

Page 22: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

ne Button Casual Gamesne Button Casual Gamesne Button Casual Gamesne Button Casual Games• Focus

i t l d hi5 Min Sample

– user input, game play and graphics

• Should be very responsiveS th A i ti– Smooth Animations

– Immediate Actions

• Game Challenge• Game Challenge– Better to have many stages/levels– Timing + Rhythm + Reaction = GAME EXPERIENCETiming   Rhythm   Reaction   GAME EXPERIENCE

• Key Lag– Between device platformsBetween device platforms– Tweak timing calculations (if needed)

Page 23: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Collision DetectionCollision DetectionCollision DetectionCollision Detection

FLASH LITE 1.1 FLASH LITE 2.xFLASH LITE 1.1• Flash 4 syntax

hitT t()

FLASH LITE 2.x• ActionScript 2.0 !

hitT t() il bl• hitTest()

• Like Math?

Ch 6 i b k

• hitTest() available

• More complexity possible

l i 6• Chapter 6 in our book • … also in 6

EXAMPLE EXAMPLEEXAMPLE EXAMPLE

Page 24: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

onEnterFrame()onEnterFrame()onEnterFrame()onEnterFrame()• Can be your friend for Flash Lite 2.x gamesy g

– 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()p ()

• Use only for more robust target devices

I l h Li 1 1 “f l i ”• In Flash Lite 1.1 = “frame looping”

Page 25: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

File SizeFile SizeFile SizeFile Size• Typically no more than 500 KB for SWF

• Some carriers restrict file size (KB)

• Available Bandwidth• Available Bandwidth– GPRS, 2/2.5G, 3G, others …

• OTA content delivery– Sometimes user pays per kB download

• Decompression– FL 2 x SWF decompresses incurring penalty– FL 2.x SWF decompresses incurring penalty

– Images, Sounds must decompress

Page 26: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Mobile SoundMobile SoundMobile SoundMobile SoundDevice Sounds Native Sounds

• Playback outside of Flash Lite

• Smaller size

• Playback within Flash Lite

• Larger Size

• Common formats:– MIDI, MFi, SMAF, AMR, others

“P S d ”

• Common formats:– PCM, ADPCM, .WAV, .MP3

• “Proxy Sounds”

• FL 2.x device sound synch

• Background MIDI TracksBackground MIDI Tracks

• Lots of handsets support MIDI

SONIFYORG SOUND RESOURCESSONIFYORG SOUND RESOURCESSONIFY.ORG: SOUND RESOURCESArticles by Hayden PorterSONIFY.ORG: SOUND RESOURCESArticles by Hayden Porter

Page 27: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Mobile Game TextMobile Game TextMobile Game TextMobile Game TextDevice Fonts Pixel Fonts

• Preinstalled device fonts

• Results in smaller file size

• Hundreds available

• Larger file size

• Position anywhere on x, y doesn’t matter

N t i t t l k & f l

• Position on x, y integer values– i.e. x=0.0, y=0.0

C i t t l k & f l• Not consistent look & feel

• No anti‐aliasing

• Point Size Restrictions

• Consistent look & feel

• No anti‐aliasing

• Use various point sizesPoint Size Restrictions Use various point sizes

Device fonts save space Use pixel fonts for look/feel

Device fonts save space

Device fonts save space Use pixel fonts for look/feel

Use pixel fonts for look/feel

Page 28: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Mobile Game GraphicsMobile Game GraphicsMobile Game GraphicsMobile Game GraphicsBitmap Vector“Versus”

• “Larger” file size

• Less CPU resources

• “Smaller” file size

• More CPU resources

• More memory

• Scaling/Rotating = Bad

• Less memory

• Scaling/Rotating = OKScaling/Rotating   Bad Scaling/Rotating   OK

Vectors preserve look when scaledPixilation occurs on bitmap assets when scaled

Page 29: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Target Device MemoryTarget Device MemoryTarget Device MemoryTarget Device Memory• Memory Heaps:

l d• Static – nearly guaranteed • Dynamic 

• Typically 1000 KB 0 kB and up to 6 000 KB• Typically 1000 KB … 0 kB and up to 6,000 KB• Fluctuates depending on other apps, etc.

• FSCommand2 APIFSCommand2 APIvar total_num:Number = fscommand2( “GetTotalPlayerMemory” );var free_num:Number = fscommand2( “GetFreePlayerMemory” );

P bl ith C t t #1 “O t f M ”• Problem with Content #1: “Out of Memory”• Garbage Collection

60 d idl i ifi t i i• 60 seconds idle or significant rise in memory usage• We need an API to avoid memory leaks!

Page 30: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Memory Profiling ToolsMemory Profiling ToolsMemory Profiling ToolsMemory Profiling Tools“OLD” SCHOOL “NEW” SCHOOL

TASK SPY– Symbian  Series Devices

Adobe Device Central– Static/Dynamic Heap Info

– Download:

www.pushl.com/taskspy

– Memory usage graphing

– Heap Adjustments

Page 31: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Target Device PerformanceTarget Device PerformanceTarget Device PerformanceTarget Device Performance• CPU

• Equivalent to “Pentium PC”• Equivalent to  Pentium PC

• Target FPS• CPU “Timer Resolution”• CPU  Timer Resolution

• Nokia: 16 FPS, iRiver: 20 FPS

• Other Flash Lite 1 1 devicesOther Flash Lite 1.1 devices • 8 to 20+ FPS

• Speed‐o‐metersSpeed o meters• Test FPS capabilities

• K I S S Principle• K.I.S.S. Principle• Keep It Simply Silly

Page 32: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Memory & Performance ToolsMemory & Performance ToolsMemory & Performance ToolsMemory & Performance ToolsOLD NEW !

TASK SPY– Symbian  S60 Devices– Download:

Adobe Device Central “Performance Calibration Tool”

– Each device has “index”– Download:www.pushl.com/taskspy

– Each device has  index– Simulated CPU usage– Performance reporting– Only visual elements

• AS 2.0 Profiling Toolhttp://www.nochump.com/asprof

Page 33: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Screen SizesScreen SizesScreen SizesScreen Sizes• Some common screen sizes on target devices …

176 × 208:  Nokia Symbian Series 60320 × 240/128 x 160:  Nokia Series 40 176 220 (“204”) V i 3 (BREW)176 × 220 (“204”):  Verizon v3c (BREW)320 × 240:  Chumby320 × 240:  iRiver u10, Clix 1/2, u20128 × 128:  iRiver e10480 × 272:  PSPMany others!Many others!

• Adobe Device CentralScreen size searching etc– Screen size searching, etc

– Device “Profile sets”

Page 34: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Pixel Depths and ColorPixel Depths and ColorPixel Depths and ColorPixel Depths and Color

• Not all devices support the same color depth!Not all devices support the same color depth!

• 12‐bit to 24‐bit … typically 16‐bit

l i• Example Devices• Nokia S40 6131 (24‐bit) versus Nokia S40 (18‐bit)

• Adobe Device Central• Search capabilities

Color Palette may need adjusting if ported to new target device.

Page 35: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Debugging Debugging Flash Lite GamesFlash Lite Games

• trace() statement • Flash Lite Error Codes• trace() statementtrace( “Got here!” ); 

• Toggling trace

• Flash Lite Error Codes

• Common ErrorsO t f M• Toggling trace

//trace( “Got here!” ); … or:

– Out of Memory

– “Bad Data”

– ActionScript Stuck

• Friendly Ghost Tool• Flash Lite 1.1

Orison Technologies Product

Page 36: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

OptimizationOptimization“Tips and Tricks”“Tips and Tricks”

• Use bitmaps over vectors where possible

• .PNG’s over .JPG’s for bitmapsp

• Optimize shapes and outlines

• Split up and tile complex Background Bitmaps• 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

Page 37: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Optimization Optimization 

l d

“Tips and Tricks”“Tips and Tricks”• Analyze size reports and optimize

• Devnet Articles have LOTS OF TIPS!– http://www.adobe.com/devnet/devices/p

• MANY MORE tricks for Flash Lite (2.x) …

“Optimizing content for Flash Lite 2.0” ‐ Josh Ulm (Adobe)http://www.adobe.com/devnet/devices/flash_lite_optimization.pdf“Optimizing content for Flash Lite 2.0” ‐ Josh Ulm (Adobe)http://www.adobe.com/devnet/devices/flash_lite_optimization.pdf

Page 38: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Misc PlatformsMisc Platforms“Perhaps the hardest thing with Flash Lite is knowing the strengths and weaknesses of the each and every reference platform ” –the each and every reference platform.  Me

Page 39: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

iRiver Clix GameiRiver Clix GameiRiver Clix GameiRiver Clix Game• ALIEN INVASION

– Casual Game– Rapid Game Development = 2‐3 days for DEMOp p y– Flash Lite 2.0 (ActionScript 2.0)– OOP (Object based style architecture)j y

WALKTHROUGH

Page 40: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Chumby GamesChumby GamesChumby GamesChumby Games• Flash Lite “2.1” Player running under LinuxT F R• Target Frame Rate: 12 fps

• Screen size: 320 px × 240 px• Sound: MP3

• User Inputs:• Touch Screen, Bend Sensor, • Light Sensor, Accelerometer

• “Channels” and “Widgets”• “Throw‐away” type games• Simple == better

Experimental Chumby Games

Page 41: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

PSP Flash GamesPSP Flash GamesPSP Flash GamesPSP Flash Games

• Download update configure not preinstalled• Download, update, configure … not preinstalled– Sony PSP ROM update version 2.70 or later

• Flash Player 6 (6 0 72 27)Flash Player 6 (6,0,72,27)– Reality = Think “Flash Lite 2.1”

• Run methodsRun methods– embedded in HTML page, standalone SWFS in web browser

– file:/flash/filename.swf 

• PSP Dev Center on Adobe– Features and Technical Info:

• http://www.adobe.com/devnet/devices/psp.html

Page 42: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Flash Lite Multiplayer gamesFlash Lite Multiplayer gamesFlash Lite Multiplayer gamesFlash Lite Multiplayer games“’Turn style’ games make most sense … but it depends 

d l i i l dion your deployment environment including: operator, bandwidth, target devices, etc.” –Me

Page 43: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Multiplayer GamesMultiplayer GamesMultiplayer GamesMultiplayer Games• What kind of games make sense?

b d d l– Turn based games … Card Games, Puzzles, etc.

• Communication MethodsHTTP (Polling) Flash Lite 1 1– HTTP (Polling) – Flash Lite 1.1

• loadVariables(), loadVars(), etc

– XML SocketCustom Socket Server … Chapter 6

• Flash Lite 2.1 or higher

• Sushi Socket Server (Flash Lite API)

– Flash Lite = Bluetooth• Intercommunication with 3rd party applicationp y pp

• Look for an “article” soon …EXAMPLES

Sushi Socket Server

Page 44: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Mobile Game TestingMobile Game TestingMobile Game TestingMobile Game TestingEmulators help … but “Rule #1: Always test on actual target handsets” ‐MEtarget handsets   ME

Page 45: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

“Emulators”, Simulators, & Testing“Emulators”, Simulators, & TestingEmulators , Simulators, & TestingEmulators , Simulators, & Testing

• All target devicesAll target devices–Adobe Device Central

GSM• GSM–Nokia 3rd Edition SDKs

• BREWQualcomm Simulator–Qualcomm Simulator

• Others …

ALWAYS TEST CONTENT ON TARGET DEVICES!ALWAYS TEST CONTENT ON TARGET DEVICES!

Page 46: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

M bil GM bil GMobile Game l

Mobile Game lDeploymentDeployment

“Worldwide revenue for mobile gaming subscriptions could increase from $3 billion to $10 5 billion in 2009 “– Juniper Researchto $10.5 billion in 2009  Juniper Research Ltd.

Page 47: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Game DistributionGame Distribution

• Aggregators, Content Providers, Operators

Game DistributionGame Distribution

Aggregators, Content Providers, Operators

• Device Manufacturer Pre‐installation

… and MANY MANY OTHERS!

• Memory Card (MMC) = “Virally”

Page 48: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

W UW UWrap UpWrap UpQ&A Where to go from here? “Future thinking”Q&A, Where to go from here?,  Future thinking

Page 49: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Q & AQ & AQ & AQ & A

• Questions?Questions?

• What can we do with Flash Lite 3?i l h id d– Native Flash Video now supported

– T.B.D.

“Wi h Li ” f Fl h Li 2• “Wish List” for Flash Lite > 2.x– Garbage Collection API

– Bitmap Caching?

– Access to Camera/Bluetooth Support

LBS Support (Location Based Services)– LBS Support (Location Based Services)

– Others …

Page 50: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Where to go from here?Where to go from here?Where to go from here?Where to go from here?

• Foundation Flash Applications for Mobile DevicesFoundation Flash Applications for Mobile Devices– http://www.flashmobilebook.com

• Adobe DevNet articles– http://www.adobe.com/devnet/devices/

•http //frame27 blogspot com– http://frame27.blogspot.com

• Contact Mefitc2007@scottjanousek com

• Game Groups:

[email protected]

Page 51: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

This slide left blank intentionally (almost)

Page 52: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

MISC ( n sed/”ni ” ed)MISC ( n sed/”ni ” ed)MISC (unused/”nix”‐ed)MISC (unused/”nix”‐ed)

Page 53: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Math and PhysicsMath and PhysicsMath and PhysicsMath and Physics• Limited Device Capabilities

– Handsets vs. portable consoles

– Memory and Performance• Avoid overtly complex game computations EXAMPLE• Avoid overtly complex game computations

• Flash Lite 1.1 supports limited Flash 5 object

EXAMPLE

– supports limited Flash 5 object

– Drawing API can be simulated (sort of)

• Flash Lite 2 x• Flash Lite 2.x– supports AS2 Math object

– Drawing APIDrawing API

– onEnterFrame()

Page 54: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Flash Lite Games for iRiverFlash Lite Games for iRiverFlash Lite Games for iRiverFlash Lite Games for iRiver• iRiver Portable Media Players

Fl h Li 1 1• Flash Lite 1.1: u10 

• Flash Lite 2.x: e10, Clix, “u20” (Clix 2G)

• D‐Click Flash Lite interface • Up, Down, Left,  Right, “softkeys” are +/‐

• Capabilities:

• Flash Lite GamesFlash Lite Games• MP3, stored data (u10), more!

• Custom fscommand2’s

• Yuck … Flash Lite API limitations

Page 55: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Methods of Game StateMethods of Game StateMethods of Game StateMethods of Game State“Shared Objects” External Server

• Mobile Shared Objects (FL 2.x)

• Write2File (FL 1.1)

• Requires external data connection

• Pros: No data connection

• Cons: Not always supported (only Flash Lite 2) file size

• Databases (MYSQL)

• Pros: Persistent in db

• Cons: Requires connection(only Flash Lite 2), file size • Cons: Requires connection

Entering Predetermined “Codes”

• Enter code “xyz” to get to level 3

• Pros: Simple to implement

• Cons: Can decompile to figure out codesEXAMPLE

Page 56: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

Leveraging VibrationLeveraging VibrationLeveraging VibrationLeveraging Vibration

• Some devices support this featureSome devices support this feature – Nokia 6680 for example

• Simulate the result of an action or event• Simulate the result of an action or event– Hit wall, Player died, alerts, etc.

tV l f d2(“St tVib t ” ff t)• retVal = fscommand2(“StartVibrate”,on,off,repeat);

• Enhancement– never require this for game play

EXAMPLE

Page 57: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

fscommand2 APIfscommand2 APIfscommand2 APIfscommand2 API• SetQuality• StartVibrate

• UnEscape

• GetPowerSource

• FullScreen

• GetTimeHours• StopVibrate• GetVolumeLevel• GetMaxVolumeLevel• GetSignalLevel

GetPowerSource

• GetBatteryLevel

• GetMaxBatteryLevel

• SetSoftKeys

GetTimeHours

• GetTimeMinutes

• GetTimeSeconds

• GetTimeZoneOffset • GetSignalLevel• GetMaxSignalLevel• GetNetworkConnectStatus• GetNetworkRequestStatus

• SetSoftKeys

• ResetSoftKeys

• GetDateDay

• GetDateWeekDay

• GetTimeZoneOffset

• GetTotalPlayerMemory

• GetFreePlayerMemory

• GetLanguage • GetNetworkStatus• GetNetworkName• SetInputTextType• Quit

• GetDateWeekDay

• GetDateMonth

• GetDateYear

• GetLocaleShortDate

• GetLanguage

• GetDeviceID

• GetPlatform

• GetDevice Quit• ExtendBacklightDuration (FL 2.x)• setFocusRectColor (FL 2.x)

• GetLocaleShortDate

• GetLocaleLongDate

• GetLocaleTime

• GetDevice

• Launch

• Escape

retVal = fscommand2( “FullScreen”, true ); //‐‐ fullscreen mode (if supported)retVal = fscommand2( “FullScreen”, true ); //‐‐ fullscreen mode (if supported)fscommand2’s execute immediately … not supported on desktopfscommand2’s execute immediately … not supported on desktop

Page 58: Fitc 2007 - The Art and Zen of Mobile Game Creation with Flash

“Toolsets”“Toolsets”ToolsetsToolsets

• Simulators• Mobile Tools Simulators• i‐mode

• Simulator

• FEExplorer

• TaskSpy• Nokia

• PC Suite

py

• 3rd edition SDK• Verizon 

• App Loader• BREW Simulator