Game Porting in Flash Lite 1.1 Porting of game Balancing Mathai by Csharks by Juwal Bose
Versions of Flash Lite <ul><li>1.x – Most wide spread </li></ul><ul><li>2.x – Most capable </li></ul><ul><li>3.0 – For upc...
Limitations <ul><li>Screen resolution </li></ul><ul><li>Color depth </li></ul><ul><li>Processor power </li></ul><ul><li>Me...
Our scenerio <ul><li>Already have the game in flash AS1/2 </li></ul><ul><li>We will build for Flash lite 1.1 </li></ul><ul...
Case with Flash Lite 2.X <ul><li>We can directly port our code </li></ul><ul><li>Only Graphics optimizations needed </li><...
Tools Required <ul><li>Flash – mx2004, v8, cs3  </li></ul><ul><li>Adobe Device Central CS3 </li></ul><ul><li>Flash Lite 1....
Graphics Optimizations <ul><li>Reduce the color palette </li></ul><ul><li>Reduce the size – 176 x 208 </li></ul><ul><li>Op...
 
Gradients
 
Optimizing code <ul><li>Use small variable names </li></ul><ul><li>Reuse variables </li></ul><ul><li>Reduce nested loops <...
Design changes <ul><li>Static 5 levels </li></ul><ul><li>Pre animated graphics </li></ul><ul><li>Left/Right arrow controls...
The frames <ul><li>6 frames labeled logo, menu, help, game, over and win </li></ul>
The frames cont… <ul><li>Invisible button is placed out side the scene to take key presses </li></ul>
The frames cont… <ul><li>The frame code on frame 1 </li></ul>
The frames cont… Button code on help frame on (keyPress &quot;<Enter>&quot;) { tellTarget (&quot;/&quot;) { gotoAndPlay(&q...
The menu <ul><li>A movie clip with 3 frames (labels s,h,c) is present with an invisible button having the code </li></ul>
The game frame <ul><li>Dynamic text box with variable name ‘level’ </li></ul><ul><li>Mathai animation movie clip mathai </...
Game frame code lSTime = dT=lLTime=o; level = 1; mF = 20; sF = 10; dR = &quot;&quot;; dN = &quot;n&quot;; interval = 10000...
Mathai Clip frame code
Button code on (keyPress &quot;<Enter>&quot;) { if (/:dN eq &quot;n&quot;) { /:dN = &quot;y&quot;; tellTarget (&quot;go&qu...
Button code continued on (keyPress &quot;<Left>&quot;) { if (/:dN eq &quot;y&quot;) { tellTarget (&quot;hL&quot;) { gotoAn...
Details <ul><li>Adding levels </li></ul><ul><li>Time based level up on button events </li></ul><ul><li>Check out source </...
Visit us <ul><li>www.csharks.com </li></ul><ul><li>www.csharksgames.com </li></ul><ul><li>www.manoramaonline.com/children ...
Upcoming SlideShare
Loading in …5
×

Mobile GameDevelopment using Flash Lite

1,466 views

Published on

Some information on developing flash games for mobile in flashlite version 1.1

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,466
On SlideShare
0
From Embeds
0
Number of Embeds
10
Actions
Shares
0
Downloads
25
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Mobile GameDevelopment using Flash Lite

  1. 1. Game Porting in Flash Lite 1.1 Porting of game Balancing Mathai by Csharks by Juwal Bose
  2. 2. Versions of Flash Lite <ul><li>1.x – Most wide spread </li></ul><ul><li>2.x – Most capable </li></ul><ul><li>3.0 – For upcoming hand sets </li></ul>
  3. 3. Limitations <ul><li>Screen resolution </li></ul><ul><li>Color depth </li></ul><ul><li>Processor power </li></ul><ul><li>Memory </li></ul><ul><li>Sound reproduction </li></ul><ul><li>Flash version support </li></ul><ul><li>Key pad layout / Controls </li></ul>
  4. 4. Our scenerio <ul><li>Already have the game in flash AS1/2 </li></ul><ul><li>We will build for Flash lite 1.1 </li></ul><ul><li>Nokia S60 – 176 x 208 </li></ul>
  5. 5. Case with Flash Lite 2.X <ul><li>We can directly port our code </li></ul><ul><li>Only Graphics optimizations needed </li></ul><ul><li>Less number of devices </li></ul><ul><li>Require higher version of flash IDE </li></ul>
  6. 6. Tools Required <ul><li>Flash – mx2004, v8, cs3 </li></ul><ul><li>Adobe Device Central CS3 </li></ul><ul><li>Flash Lite 1.1 CDK </li></ul><ul><li>Flash Lite Device </li></ul>
  7. 7. Graphics Optimizations <ul><li>Reduce the color palette </li></ul><ul><li>Reduce the size – 176 x 208 </li></ul><ul><li>Optimize graphics in flash </li></ul><ul><li>Remove gradients used </li></ul><ul><li>Remove transparency used </li></ul><ul><li>Balance between vector and raster </li></ul><ul><li>Use PNG raster graphics </li></ul>
  8. 9. Gradients
  9. 11. Optimizing code <ul><li>Use small variable names </li></ul><ul><li>Reuse variables </li></ul><ul><li>Reduce nested loops </li></ul><ul><li>Flash lite 1.1 is optimized </li></ul>
  10. 12. Design changes <ul><li>Static 5 levels </li></ul><ul><li>Pre animated graphics </li></ul><ul><li>Left/Right arrow controls with enter key </li></ul><ul><li>Extensive use of movie clips and an invisible button </li></ul>
  11. 13. The frames <ul><li>6 frames labeled logo, menu, help, game, over and win </li></ul>
  12. 14. The frames cont… <ul><li>Invisible button is placed out side the scene to take key presses </li></ul>
  13. 15. The frames cont… <ul><li>The frame code on frame 1 </li></ul>
  14. 16. The frames cont… Button code on help frame on (keyPress &quot;<Enter>&quot;) { tellTarget (&quot;/&quot;) { gotoAndPlay(&quot;menu&quot;); } } Button code on game over and game win frames on (keyPress &quot;<Enter>&quot;) { tellTarget (&quot;/&quot;) { gotoAndPlay(&quot;game&quot;); } }
  15. 17. The menu <ul><li>A movie clip with 3 frames (labels s,h,c) is present with an invisible button having the code </li></ul>
  16. 18. The game frame <ul><li>Dynamic text box with variable name ‘level’ </li></ul><ul><li>Mathai animation movie clip mathai </li></ul><ul><li>Hand movie clips hL and hR </li></ul><ul><li>A go movieclip for starting </li></ul><ul><li>The invisible button </li></ul>
  17. 19. Game frame code lSTime = dT=lLTime=o; level = 1; mF = 20; sF = 10; dR = &quot;&quot;; dN = &quot;n&quot;; interval = 10000; tellTarget (&quot;go&quot;) { gotoAndStop(1); } tellTarget (&quot;mathai&quot;) { gotoAndStop(1); } tellTarget (&quot;mathai/clip&quot;) { gotoAndStop(10); } // stop();
  18. 20. Mathai Clip frame code
  19. 21. Button code on (keyPress &quot;<Enter>&quot;) { if (/:dN eq &quot;n&quot;) { /:dN = &quot;y&quot;; tellTarget (&quot;go&quot;) { gotoAndStop(2); } if (random(2) == 0 && /:dR ne &quot;l&quot;) { tellTarget (&quot;mathai/clip&quot;) { gotoAndPlay(_totalframes-_currentframe); /:dR = &quot;l&quot;; } } else { if (/:dR ne &quot;r&quot;) { /:dR = &quot;r&quot;; } } tellTarget (&quot;mathai/clip&quot;) { play(); } // /:lSTime = getTimer(); // } }
  20. 22. Button code continued on (keyPress &quot;<Left>&quot;) { if (/:dN eq &quot;y&quot;) { tellTarget (&quot;hL&quot;) { gotoAndPlay(2); } if (/:dR eq &quot;r&quot;) { fscommand2(&quot;StartVibrate&quot;, 1000, 0, 0); //change /:dR = &quot;l&quot;; tellTarget (&quot;mathai/clip&quot;) { gotoAndPlay(_totalframes-_currentframe); } } else { tellTarget (&quot;mathai/clip&quot;) { gotoAndPlay(_currentframe+1); } } } }
  21. 23. Details <ul><li>Adding levels </li></ul><ul><li>Time based level up on button events </li></ul><ul><li>Check out source </li></ul>
  22. 24. Visit us <ul><li>www.csharks.com </li></ul><ul><li>www.csharksgames.com </li></ul><ul><li>www.manoramaonline.com/children </li></ul><ul><li>A lot more coming up this year </li></ul>

×