coronalabs.com@walterluhCoronaBuilding Native AppsA digital canvas for everyone®NBC/Universal powers their campaign with C...
coronalabs.com@walterluh
coronalabs.com@walterluhTurning an idea into something real+ + =Software DevelopmentCreative
coronalabs.com@walterluhGraphicsYesterday Today Tomorrow
coronalabs.com@walterluhGraphicsCirca 2000
coronalabs.com@walterluhGraphicsCirca 2000
coronalabs.com@walterluhMobile GraphicsCirca 2005
coronalabs.com@walterluhMobile GraphicsCirca 2008
coronalabs.com@walterluhToday
coronalabs.com@walterluh
coronalabs.com@walterluh
coronalabs.com@walterluhWhat is Corona?same code, multiple storesdevelop 5-10x fasterSDK for native apps...
coronalabs.com@walterluhBreakthrough Productivity36 hourscode+graphics+sound(complete 2 level game)14 hourscode+graphics+s...
coronalabs.com@walterluhNot Just for GamesESP Guitars CheeseMonger Planet Sushi Thai CookVisually stunning business apps
coronalabs.com@walterluhPerformanceSimplicityFlexibilityCoronaThe Sweet SpotStaff Pick
coronalabs.com@walterluh2-D vs 3-D$ vs $$$
coronalabs.com@walterluhCorona GraphicsOptimized OpenGL for 2-D
CONFIDENTIALcoronalabs.comOpenGL in one linePhone SDK.// Display "myImage.png"// -----------------------------------------...
coronalabs.com@walterluhAPI for Designerslocal image =display.newImage("myImage.png")-- Propertiesimage.x = 100image.y = 1...
coronalabs.com@walterluhIntuitive Draw OrderDrawing Order Result
coronalabs.com@walterluhNext-Generation GraphicsNew 2.5D engine later this year!
coronalabs.com@walterluhCoronaRendering EngineVirtual MachineUserInputNetworkingDeviceDevice/OSNative Mobile AppTextStroke...
coronalabs.com@walterluhLua:an industry standard
coronalabs.com@walterluhSmall Code Size1.4 MBFootprint
coronalabs.com@walterluhLua typesnilbooleannumberstringfunctiontableuserdata• JavaScript-like syntax• Functions are closur...
coronalabs.com@walterluhLua vs Other Languagesif	  (!carMoving)	  {	   //	  do	  something}	  else	  if	  (noGas)	  {	   /...
coronalabs.com@walterluharray	  =	  {	  "a",	  "b",	  100,	  "hello"	  }dictionary	  =	  {	  x=5,	  y=7,	  name="Joe"	  }t...
coronalabs.com@walterluh-­‐-­‐	  create	  empty	  tablelocal	  o	  =	  {}-­‐-­‐	  add	  methodfunction	  o:saySomething(	 ...
coronalabs.com@walterluh-­‐-­‐	  create	  empty	  tablelocal	  o	  =	  {}-­‐-­‐	  add	  methodlocal	  function	  f(	  self...
coronalabs.com@walterluhArrays are 1-based//	  Other	  languages:	  index	  begins	  with	  0	  array=[a,b,c];for	  (	  va...
coronalabs.com@walterluhCorona Enterprise• Integrate native libraries• Wrap native code in your own Lua APIs• Automate bui...
coronalabs.com@walterluhFast Iteration
coronalabs.com@walterluhDemo
coronalabs.com@walterluhMultiple Screen Sizes/Shapes
coronalabs.com@walterluhContent Scaling in Corona
coronalabs.com@walterluhContent Scaling-­‐-­‐	  config.luaapplication	  =	  {	  	  	  	  content	  =	  {	  	  	  	  	  	  ...
coronalabs.com@walterluhRetina Displays
coronalabs.com@walterluhRetina Imaging in Corona-­‐-­‐	  config.luaapplication	  =	  {	  	  	  	  content	  =	  {	  	  	  ...
coronalabs.com@walterluhRetina ImagingAPIdisplay.newImageRect(	  imageName,	  w,	  h	  )• width/height in content units (n...
coronalabs.com@walterluhAPIApplication Programming Interface Interaction
CONFIDENTIALcoronalabs.comHard Problems Made Easy(e.g. how Corona taught me to love physics)
CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )
CONFIDENTIALcoronalabs.com
CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )local ground = display.newImage( "ground.png" )groun...
CONFIDENTIALcoronalabs.com
CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )local ground = display.newImage( "ground.png" )groun...
CONFIDENTIALcoronalabs.com
CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )local ground = display.newImage( "ground.png" )groun...
CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )local ground = display.newImage( "ground.png" )groun...
CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )local ground = display.newImage( "ground.png" )groun...
CONFIDENTIALcoronalabs.com
CONFIDENTIALcoronalabs.comWhat if we wantlots of crates?
CONFIDENTIALcoronalabs.comlocal crate = display.newImage( "crate.png" )crate.x = 180crate.y = -100crate.rotation = 10physi...
CONFIDENTIALcoronalabs.comlocal function spawnCrate()! local crate = display.newImage( "crate.png" )! crate.x = math.rando...
CONFIDENTIALcoronalabs.com
CONFIDENTIALcoronalabs.comWhat if gravity was uprather than down?
CONFIDENTIALcoronalabs.comphysics.setGravity( 0, 9.8 )
CONFIDENTIALcoronalabs.comphysics.setGravity( 0, -9.8 )
CONFIDENTIALcoronalabs.com
coronalabs.com@walterluhOver 500APIs
coronalabs.com@walterluhWebKSQLite databaseFile read/writeFull Lua scripting languageHardware-accelerated graphicsGPS, com...
coronalabs.com@walterluhAmazingAppsWorld-class apps, developers, and community
coronalabs.com@walterluhThriving EcosystemCoronaFireworksPhotoshop PluginZwoptexTextMateParticle CandyCorona RemoteCorona ...
coronalabs.com@walterluhNo Coding RequiredBuild native apps using Photoshop/Kwik
coronalabs.com@walterluhDemo
coronalabs.com@walterluh
coronalabs.com@walterluhDevelopers like you#1 #1From Designers to Coders. From Indies to Studios.
coronalabs.com@walterluhAnyone can be #1...with Corona
coronalabs.com@walterluhFuture Belongs toYou!
coronalabs.com@walterluhStart today! it’s freewww.CoronaLabs.com
Upcoming SlideShare
Loading in …5
×

Building Native Apps- A Digital Canvas for Coders and Designers with Walter Luh

807 views

Published on

Apps are the hottest new medium for interaction. But conventional technologies make creating graphically-rich, interactive content an enormous challenge. Learn how Corona SDK enables you to build apps 10x more quickly, whether you are a creative coder or a visual designer.

Published in: Technology, Art & Photos
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
807
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Building Native Apps- A Digital Canvas for Coders and Designers with Walter Luh

  1. 1. coronalabs.com@walterluhCoronaBuilding Native AppsA digital canvas for everyone®NBC/Universal powers their campaign with Corona
  2. 2. coronalabs.com@walterluh
  3. 3. coronalabs.com@walterluhTurning an idea into something real+ + =Software DevelopmentCreative
  4. 4. coronalabs.com@walterluhGraphicsYesterday Today Tomorrow
  5. 5. coronalabs.com@walterluhGraphicsCirca 2000
  6. 6. coronalabs.com@walterluhGraphicsCirca 2000
  7. 7. coronalabs.com@walterluhMobile GraphicsCirca 2005
  8. 8. coronalabs.com@walterluhMobile GraphicsCirca 2008
  9. 9. coronalabs.com@walterluhToday
  10. 10. coronalabs.com@walterluh
  11. 11. coronalabs.com@walterluh
  12. 12. coronalabs.com@walterluhWhat is Corona?same code, multiple storesdevelop 5-10x fasterSDK for native apps...
  13. 13. coronalabs.com@walterluhBreakthrough Productivity36 hourscode+graphics+sound(complete 2 level game)14 hourscode+graphics+sound(gameplay only)“Angry Birds” “Fruit Ninja” “TinyWings”12 hourscode+graphics+sound(gameplay only)“Developing directly in Xcode would havebeen at least 5x more code than Corona”– Unicorn Labs, Top 20 iPad eBookShip #1 apps 10x faster
  14. 14. coronalabs.com@walterluhNot Just for GamesESP Guitars CheeseMonger Planet Sushi Thai CookVisually stunning business apps
  15. 15. coronalabs.com@walterluhPerformanceSimplicityFlexibilityCoronaThe Sweet SpotStaff Pick
  16. 16. coronalabs.com@walterluh2-D vs 3-D$ vs $$$
  17. 17. coronalabs.com@walterluhCorona GraphicsOptimized OpenGL for 2-D
  18. 18. CONFIDENTIALcoronalabs.comOpenGL in one linePhone SDK.// Display "myImage.png"// ----------------------------------------------------------------------------// OpenGLESTextureAppDelegate.m// ----------------------------------------------------------------------------#import "OpenGLESTextureAppDelegate.h"#import "EAGLView.h"#import "OpenGLESTextureViewController.h"@implementation OpenGLESTextureAppDelegate@synthesize window=_window;@synthesize viewController=_viewController;- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{// Override point for customization after application launch.self.window.rootViewController = self.viewController;return YES;}- (void)applicationDidBecomeActive:(UIApplication *)application{/*Restart any tasks that were paused (or not yet started) while the application wasinactive. If the application was previously in the background, optionally refresh the userinterface.*/[self.viewController drawFrame];}- (void)dealloc{[_window release];[_viewController release];[super dealloc];}@end// ----------------------------------------------------------------------------// EAGLView.m// ----------------------------------------------------------------------------#import <QuartzCore/QuartzCore.h>#import "EAGLView.h"@interface EAGLView (PrivateMethods)- (void)createFramebuffer;- (void)deleteFramebuffer;@end@implementation EAGLView@synthesize context;// You must implement this method+ (Class)layerClass{return [CAEAGLLayer class];}//The EAGL view is stored in the nib file. When its unarchived its sent -initWithCoder:.- (id)initWithCoder:(NSCoder*)coder{self = [super initWithCoder:coder];if (self) {CAEAGLLayer *eaglLayer = (CAEAGLLayer *)self.layer;eaglLayer.opaque = TRUE;eaglLayer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys:[NSNumber numberWithBool:FALSE],kEAGLDrawablePropertyRetainedBacking,kEAGLColorFormatRGBA8,kEAGLDrawablePropertyColorFormat,nil];}return self;}- (void)dealloc{[self deleteFramebuffer];[context release];[super dealloc];}- (void)setContext:(EAGLContext *)newContext{if (context != newContext) {[self deleteFramebuffer];[context release];context = [newContext retain];[EAGLContext setCurrentContext:nil];}}- (void)createFramebuffer{if (context && !defaultFramebuffer) {[EAGLContext setCurrentContext:context];// Create default framebuffer object.glGenFramebuffers(1, &defaultFramebuffer);glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);// Create color render buffer and allocate backing store.glGenRenderbuffers(1, &colorRenderbuffer);glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);[context renderbufferStorage:GL_RENDERBUFFER fromDrawable:(CAEAGLLayer*)self.layer];glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH,&framebufferWidth);glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT,&framebufferHeight);glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER,colorRenderbuffer);if (glCheckFramebufferStatus(GL_FRAMEBUFFER) != GL_FRAMEBUFFER_COMPLETE)NSLog(@"Failed to make complete framebuffer object %x",glCheckFramebufferStatus(GL_FRAMEBUFFER));}}- (void)deleteFramebuffer{if (context) {[EAGLContext setCurrentContext:context];if (defaultFramebuffer) {glDeleteFramebuffers(1, &defaultFramebuffer);defaultFramebuffer = 0;}if (colorRenderbuffer) {glDeleteRenderbuffers(1, &colorRenderbuffer);colorRenderbuffer = 0;}}}- (void)setFramebuffer{if (context) {[EAGLContext setCurrentContext:context];if (!defaultFramebuffer)[self createFramebuffer];glBindFramebuffer(GL_FRAMEBUFFER, defaultFramebuffer);glViewport(0, 0, framebufferWidth, framebufferHeight);}}- (BOOL)presentFramebuffer{BOOL success = FALSE;if (context) {[EAGLContext setCurrentContext:context];glBindRenderbuffer(GL_RENDERBUFFER, colorRenderbuffer);success = [context presentRenderbuffer:GL_RENDERBUFFER];}return success;}- (void)layoutSubviews{// The framebuffer will be re-created at the beginning of the next setFramebuffermethod call.[self deleteFramebuffer];}@end// ----------------------------------------------------------------------------// OpenGLESTextureViewController.m// ----------------------------------------------------------------------------#import <QuartzCore/QuartzCore.h>#import "OpenGLESTextureViewController.h"#import "EAGLView.h"@interface OpenGLESTextureViewController ()@property (nonatomic, retain) EAGLContext *context;@property (nonatomic, assign) CADisplayLink *displayLink;- (void) loadTexture;@end@implementation OpenGLESTextureViewController@synthesize animating, context, displayLink;- (void)awakeFromNib{EAGLContext *aContext = [[EAGLContext alloc] initWithAPI:kEAGLRenderingAPIOpenGLES1];if (!aContext)NSLog(@"Failed to create ES context");else if (![EAGLContext setCurrentContext:aContext])NSLog(@"Failed to set ES context current");self.context = aContext;[aContext release];[(EAGLView *)self.view setContext:context];[(EAGLView *)self.view setFramebuffer];[self loadTexture];self.displayLink = nil;}- (void) loadTexture{glEnable(GL_TEXTURE_2D);glEnable(GL_BLEND);glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);glGenTextures(1, &textureID);glBindTexture(GL_TEXTURE_2D, textureID);glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);NSString *path = [[NSBundle mainBundle] pathForResource:@"myImage" ofType:@"png"];NSData *texData = [[NSData alloc] initWithContentsOfFile:path];UIImage *image = [[UIImage alloc] initWithData:texData];GLuint width = CGImageGetWidth(image.CGImage);GLuint height = CGImageGetHeight(image.CGImage);CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();void *imageData = malloc( height width 4 );CGContextRef image_context = CGBitmapContextCreate( imageData, width, height, 8, 4width, colorSpace, kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big );CGColorSpaceRelease( colorSpace );CGContextClearRect( image_context, CGRectMake( 0, 0, width, height ) );CGContextTranslateCTM( image_context, 0, height - height );CGContextDrawImage( image_context, CGRectMake( 0, 0, width, height ), image.CGImage );glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE,imageData);CGContextRelease(image_context);free(imageData);[image release];[texData release];}- (void)dealloc{glDeleteTextures(1, &textureID);// Tear down context.if ([EAGLContext currentContext] == context)[EAGLContext setCurrentContext:nil];[context release];[super dealloc];}- (void)viewDidUnload{[super viewDidUnload];// Tear down context.if ([EAGLContext currentContext] == context)[EAGLContext setCurrentContext:nil];self.context = nil;}- (void)drawFrame{[(EAGLView *)self.view setFramebuffer];// Replace the implementation of this method to do your own custom drawing.static const GLfloat squareVertices[] = {-0.5f, -0.33f,0.5f, -0.33f,-0.5f, 0.33f,0.5f, 0.33f,};static const GLfloat texCoords[] = {0.0, 1.0,1.0, 1.0,0.0, 0.0,1.0, 0.0};glClearColor(0.0f, 0.0f, 0.0f, 1.0f);glClear(GL_COLOR_BUFFER_BIT);glMatrixMode(GL_PROJECTION);glLoadIdentity();glMatrixMode(GL_MODELVIEW);glLoadIdentity();glVertexPointer(2, GL_FLOAT, 0, squareVertices);glEnableClientState(GL_VERTEX_ARRAY);glTexCoordPointer(2, GL_FLOAT, 0, texCoords);glEnableClientState(GL_TEXTURE_COORD_ARRAY);glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);[(EAGLView *)self.view presentFramebuffer];}@enddisplay.newImage("myImage.png")
  19. 19. coronalabs.com@walterluhAPI for Designerslocal image =display.newImage("myImage.png")-- Propertiesimage.x = 100image.y = 100image.rotation = 45image.blendMode = "add"-- Tweentransition.to( image, { alpha = 0.0 } )
  20. 20. coronalabs.com@walterluhIntuitive Draw OrderDrawing Order Result
  21. 21. coronalabs.com@walterluhNext-Generation GraphicsNew 2.5D engine later this year!
  22. 22. coronalabs.com@walterluhCoronaRendering EngineVirtual MachineUserInputNetworkingDeviceDevice/OSNative Mobile AppTextStrokesFillsBitmapsShapesObjects Behaviors Dynamic Layout Events Device Capabilities EtcCamera MicGPS EtcArtwork Compiled Code Localized Strings WorkflowDeveloperAssetsUser InterfaceArchitecture
  23. 23. coronalabs.com@walterluhLua:an industry standard
  24. 24. coronalabs.com@walterluhSmall Code Size1.4 MBFootprint
  25. 25. coronalabs.com@walterluhLua typesnilbooleannumberstringfunctiontableuserdata• JavaScript-like syntax• Functions are closures• Lexical scope (non-local vars)• Objects are tables
  26. 26. coronalabs.com@walterluhLua vs Other Languagesif  (!carMoving)  {   //  do  something}  else  if  (noGas)  {   //  do  something  else}for  (i=1;  i<=10;  i++)  {   print(i)}for  (j=100;  j>0;  j-­‐-­‐)  {   print(j)}if  (not  carMoving)  then   -­‐-­‐  do  somethingelseif  (noGas)  then   -­‐-­‐  do  something  elseendfor  i  =  1,10  do   print(i)endfor  j  =  100,1,-­‐1  do   print(j)end
  27. 27. coronalabs.com@walterluharray  =  {  "a",  "b",  100,  "hello"  }dictionary  =  {  x=5,  y=7,  name="Joe"  }t  =  {}                        -­‐-­‐  empty  tablet[1]  =  "a"                -­‐-­‐  numerical  indext["x"]  =  5                -­‐-­‐  key  indext.x  =  5                      -­‐-­‐  equivalent  property  accesst.hasProperties  =  truet[array]  =  "Joe"    -­‐-­‐  any  type  can  be  a  key!!!t["printJoe"]  =  function()  print("Joe")  endLua objects areTables
  28. 28. coronalabs.com@walterluh-­‐-­‐  create  empty  tablelocal  o  =  {}-­‐-­‐  add  methodfunction  o:saySomething(  something  )    print(  something  )end-­‐-­‐  output  hio:saySomething(  "hi!"  )Object methods
  29. 29. coronalabs.com@walterluh-­‐-­‐  create  empty  tablelocal  o  =  {}-­‐-­‐  add  methodlocal  function  f(  self,  something  )    print(  something  )endo.saySomething  =  f-­‐-­‐  output  hio.saySomething(  o,  "hi!"  )The : is syntactic sugar
  30. 30. coronalabs.com@walterluhArrays are 1-based//  Other  languages:  index  begins  with  0  array=[a,b,c];for  (  var  i=0;  i<arr.length;  i++)  {    log(  array[i]  )}-­‐-­‐  Lua:  index  begins  with  1local  array  =  {a,b,c}for  i=1,#array  do    print(  array[i]  )end
  31. 31. coronalabs.com@walterluhCorona Enterprise• Integrate native libraries• Wrap native code in your own Lua APIs• Automate buildsLua and Objective-C/C++ and Java
  32. 32. coronalabs.com@walterluhFast Iteration
  33. 33. coronalabs.com@walterluhDemo
  34. 34. coronalabs.com@walterluhMultiple Screen Sizes/Shapes
  35. 35. coronalabs.com@walterluhContent Scaling in Corona
  36. 36. coronalabs.com@walterluhContent Scaling-­‐-­‐  config.luaapplication  =  {        content  =  {                width  =  320,                height  =  480,                scale  =  "letterbox",        },}• Code in content units (not screen pixels)• width/height specify content dimensions• Scale mode determines how physical display is filled
  37. 37. coronalabs.com@walterluhRetina Displays
  38. 38. coronalabs.com@walterluhRetina Imaging in Corona-­‐-­‐  config.luaapplication  =  {        content  =  {                width  =  320,                height  =  480,                scale  =  "letterbox",                imageSuffix  =  {                        ["-­‐x15"]  =  1.5,                        ["-­‐x2"]  =  2,                },        },}
  39. 39. coronalabs.com@walterluhRetina ImagingAPIdisplay.newImageRect(  imageName,  w,  h  )• width/height in content units (not screen pixels)• Best matching image file based on scale factor• Suffixes in config.lua determine image/scale mapping
  40. 40. coronalabs.com@walterluhAPIApplication Programming Interface Interaction
  41. 41. CONFIDENTIALcoronalabs.comHard Problems Made Easy(e.g. how Corona taught me to love physics)
  42. 42. CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )
  43. 43. CONFIDENTIALcoronalabs.com
  44. 44. CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )local ground = display.newImage( "ground.png" )ground.x = 160ground.y = 445
  45. 45. CONFIDENTIALcoronalabs.com
  46. 46. CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )local ground = display.newImage( "ground.png" )ground.x = 160ground.y = 445local crate = display.newImage( "crate.png" )crate.x = 180crate.y = 80crate.rotation = 10
  47. 47. CONFIDENTIALcoronalabs.com
  48. 48. CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )local ground = display.newImage( "ground.png" )ground.x = 160ground.y = 445local crate = display.newImage( "crate.png" )crate.x = 180crate.y = 80crate.rotation = 10local physics = require( "physics" )physics.start()
  49. 49. CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )local ground = display.newImage( "ground.png" )ground.x = 160ground.y = 445local crate = display.newImage( "crate.png" )crate.x = 180crate.y = 80crate.rotation = 10local physics = require( "physics" )physics.start()physics.addBody( ground, { friction=0.5 } )ground.bodyType = "static"
  50. 50. CONFIDENTIALcoronalabs.comlocal sky = display.newImage( "clouds.png" )local ground = display.newImage( "ground.png" )ground.x = 160ground.y = 445local crate = display.newImage( "crate.png" )crate.x = 180crate.y = 80crate.rotation = 10local physics = require( "physics" )physics.start()physics.addBody( ground, { friction=0.5 } )ground.bodyType = "static"physics.addBody( crate, { density=2.0,friction=0.5, bounce=0.3 } )
  51. 51. CONFIDENTIALcoronalabs.com
  52. 52. CONFIDENTIALcoronalabs.comWhat if we wantlots of crates?
  53. 53. CONFIDENTIALcoronalabs.comlocal crate = display.newImage( "crate.png" )crate.x = 180crate.y = -100crate.rotation = 10physics.addBody( crate, { density=2.0,friction=0.5, bounce=0.3 } )
  54. 54. CONFIDENTIALcoronalabs.comlocal function spawnCrate()! local crate = display.newImage( "crate.png" )! crate.x = math.random( 320 )! crate.y = -100! crate.rotation = 10! physics.addBody( crate, { density=2.0,friction=0.5, bounce=0.3 } )endtimer.performWithDelay( 500, spawnCrate, 50 )
  55. 55. CONFIDENTIALcoronalabs.com
  56. 56. CONFIDENTIALcoronalabs.comWhat if gravity was uprather than down?
  57. 57. CONFIDENTIALcoronalabs.comphysics.setGravity( 0, 9.8 )
  58. 58. CONFIDENTIALcoronalabs.comphysics.setGravity( 0, -9.8 )
  59. 59. CONFIDENTIALcoronalabs.com
  60. 60. coronalabs.com@walterluhOver 500APIs
  61. 61. coronalabs.com@walterluhWebKSQLite databaseFile read/writeFull Lua scripting languageHardware-accelerated graphicsGPS, compass, accelerometerSimple and complex physical bodiesNetworking (TCP, FTP, HTTP, etc.)Video playback (streaming or local)Physical properties (mass, friction,Joints, wheels, hinges, pulleys, etc.Animated sprites with independentCollision detection, including preOpenFeint game network supportVector drawing APIs (shapes andNative UI (keyboard, etc.)Crypto (md4, md5, sha1, sha512,Audio (sound effects or MP3)Animation and transition libraFacebook and Twitter librariesImproved texture memory hanphysics simulationoto libraryTons of Features<html5>• OpenGL graphics• Open AL audio• Box2D Physics• Texture atlases, sprites, ...• Networking• GPS, multitouch, accelerometer, ...• Native web views, textfields, ...• Camera, photo library, video, ...• Services: ads, analytics, IAP, ...• And much more!
  62. 62. coronalabs.com@walterluhAmazingAppsWorld-class apps, developers, and community
  63. 63. coronalabs.com@walterluhThriving EcosystemCoronaFireworksPhotoshop PluginZwoptexTextMateParticle CandyCorona RemoteCorona Project ManagerLimeSprite DeckLuaGliderTexture Packer
  64. 64. coronalabs.com@walterluhNo Coding RequiredBuild native apps using Photoshop/Kwik
  65. 65. coronalabs.com@walterluhDemo
  66. 66. coronalabs.com@walterluh
  67. 67. coronalabs.com@walterluhDevelopers like you#1 #1From Designers to Coders. From Indies to Studios.
  68. 68. coronalabs.com@walterluhAnyone can be #1...with Corona
  69. 69. coronalabs.com@walterluhFuture Belongs toYou!
  70. 70. coronalabs.com@walterluhStart today! it’s freewww.CoronaLabs.com

×