SlideShare una empresa de Scribd logo
1 de 25
Descargar para leer sin conexión
Game Development 
with Corona SDK and Lua 
@SergeyLerg 
Spiral Code Studio 
spiralcodestudio.com
Who is that guy on the stage? 
PHP/JavaScript/HTML 
C 
Python 
PHP 
Lua 
Go
What is Corona SDK 
● coronalabs.com, #corona 
● Android, iOS, Windows Phone 8 
● Development on Win or Mac 
● 2D only (2.5D) 
● Lua 
● Fast and easy to use Simulator 
● No need for Xcode
Corona’s Language Stack 
● Core is pure C++ and OpenGL 
● Objective-C and Java only in wrappers 
● Lua for actual code and libraries
I U+2665 Lua 
● Overall good language 
● Simple, easy to learn 
● Crossplatform and embeddable 
● Small overhead 
● But no JIT on iOS
Corona SDK 
● High performance, similar to Unity3D 
● Vast API 
● Starter- Basic- Pro- Enterprise- plans
3rd Party SDK and Libs 
● Ad: Admob, iAd, Vungle, Chartboost… 
● Facebook, Twitter, GameCenter, Google 
Play Game Services 
● In-Apps: Apple, Google, Amazon, OUYA 
● Analytics, zip, SQLite, JSON, LFS, bit, video, 
maps, native UI, PayPal… 
● Scene manager, transitions and easings, 
timers, physics, gamepads 
● Custom plugins
Rapid Development 
● Works on all platforms with little to no 
adjustments 
● Fast 
○ Simulator 
○ Compiling (packaging) 
○ Mini framework 
● Hard to crash
Fragmentation Zoo 
● Aspect ratios 
● Content Scaling 
● config.lua 
● Reference screen coordinates
config.lua 
local w, h = display.pixelWidth, display.pixelHeight 
while w >= 600 do 
w, h = w * 0.5, h * 0.5 
end 
application = { 
content = { 
width = w, height = h, 
scale = 'letterbox', fps = 60, 
imageSuffix = {['@2x'] = 1.2} 
}}
When you deal with Lua 
Everything looks like a table
params 
local function some(params) 
local self = {} 
self.x, self.y = params.x or 0, params.y or 0 
return self 
end
Lua is too forgiving
MOAR Punishment 
● strict.lua 
● type checking 
● strict syntax style 
● unused variables 
● non-nil type casting 
● safe indexing 
● memory leaks 
● lost values on return
Inheritance 
● Classless inheritance is great 
● Metatables most of the time are overkill
Inheritance 
local function newBase(params) 
local base = {} 
function base:makeTheConsoleDirty() 
print('dirt-dirt-dirt-dirt') 
end 
base.heavyFunction = heavyFunction 
return base 
end 
local function newChild(params) 
local child = newParent() 
function child:cry() print('plak plak') end 
return child 
end
More Lua 
● Inline conditionals a = b and b.c or c 
● Globals 
● Automatic local variables 
● Ad-hoc or monkey patching
Weakened tables 
● Weak values 
● Weak keys 
● Weak programmer
Bad Lua code 
● Forgiveness 
● Many beginners 
● Internet 
● Mixed whitespace 
● Mixed quotes 
● JavaLua, JSLua, PascalLua.
Metatables magic 
● Vector2D 
● Transition a number
wxLua 
● ZeroBrane Studio by Paul Kulchenko 
● studio.zerobrane.com 
● IRC #zerobrane
Blog 
● spiralcodestudio.com 
● Corona/Lua tips 
● 30+ are ready 
● More than 30 are planned
Clean 
● Clear your mind and keyboard 
● Clean keyboard leads to clean code
Thank you 
Sergey Lalov - Spira Code Studio 
@SergeyLerg 
13 September 2014 
Questions and Offers 
spiralcodestudio@gmail.com

Más contenido relacionado

La actualidad más candente

How to start using Scala
How to start using ScalaHow to start using Scala
How to start using ScalaNgoc Dao
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#Bertrand Le Roy
 
High performance graphics and computation - OpenGL ES and RenderScript
High performance graphics and computation - OpenGL ES and RenderScript High performance graphics and computation - OpenGL ES and RenderScript
High performance graphics and computation - OpenGL ES and RenderScript BlrDroid
 
There is garbage in our code - Talks by Softbinator
There is garbage in our code - Talks by SoftbinatorThere is garbage in our code - Talks by Softbinator
There is garbage in our code - Talks by SoftbinatorAdrian Oprea
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScriptTroy Miles
 
Scalable Applications with Scala
Scalable Applications with ScalaScalable Applications with Scala
Scalable Applications with ScalaNimrod Argov
 
Dmytro Kochergin Angular 2 and New Java Script Technologies
Dmytro Kochergin Angular 2 and New Java Script TechnologiesDmytro Kochergin Angular 2 and New Java Script Technologies
Dmytro Kochergin Angular 2 and New Java Script TechnologiesLogeekNightUkraine
 
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewWorkshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewVisual Engineering
 
Run-time of Node.js : V8 JavaScript Engine
Run-time of Node.js: V8 JavaScript EngineRun-time of Node.js: V8 JavaScript Engine
Run-time of Node.js : V8 JavaScript EngineGary Yeh
 

La actualidad más candente (15)

How to start using Scala
How to start using ScalaHow to start using Scala
How to start using Scala
 
Ruby DSL
Ruby DSLRuby DSL
Ruby DSL
 
RenderScript
RenderScriptRenderScript
RenderScript
 
.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#.NET Foundation, Future of .NET and C#
.NET Foundation, Future of .NET and C#
 
High performance graphics and computation - OpenGL ES and RenderScript
High performance graphics and computation - OpenGL ES and RenderScript High performance graphics and computation - OpenGL ES and RenderScript
High performance graphics and computation - OpenGL ES and RenderScript
 
There is garbage in our code - Talks by Softbinator
There is garbage in our code - Talks by SoftbinatorThere is garbage in our code - Talks by Softbinator
There is garbage in our code - Talks by Softbinator
 
Autolab Workshop
Autolab WorkshopAutolab Workshop
Autolab Workshop
 
Functional Programming in JavaScript
Functional Programming in JavaScriptFunctional Programming in JavaScript
Functional Programming in JavaScript
 
Scalable Applications with Scala
Scalable Applications with ScalaScalable Applications with Scala
Scalable Applications with Scala
 
node.js dao
node.js daonode.js dao
node.js dao
 
Dmytro Kochergin Angular 2 and New Java Script Technologies
Dmytro Kochergin Angular 2 and New Java Script TechnologiesDmytro Kochergin Angular 2 and New Java Script Technologies
Dmytro Kochergin Angular 2 and New Java Script Technologies
 
Workshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General OverviewWorkshop Intro: FrontEnd General Overview
Workshop Intro: FrontEnd General Overview
 
PHP7
PHP7PHP7
PHP7
 
Wider than rails
Wider than railsWider than rails
Wider than rails
 
Run-time of Node.js : V8 JavaScript Engine
Run-time of Node.js: V8 JavaScript EngineRun-time of Node.js: V8 JavaScript Engine
Run-time of Node.js : V8 JavaScript Engine
 

Destacado

Go на Google App Engine
Go на Google App EngineGo на Google App Engine
Go на Google App EngineSergeyLerg
 
Content Marketing 2014
Content Marketing 2014Content Marketing 2014
Content Marketing 2014Jake Neethling
 
ใบงานสำรวจตนเอง M6 38
ใบงานสำรวจตนเอง M6 38ใบงานสำรวจตนเอง M6 38
ใบงานสำรวจตนเอง M6 38Praphawit Promthep
 
Введение в Lua. Использование в GameDev.
Введение в Lua. Использование в GameDev.Введение в Lua. Использование в GameDev.
Введение в Lua. Использование в GameDev.SergeyLerg
 
การปลูกพืชไร้ดิน
การปลูกพืชไร้ดินการปลูกพืชไร้ดิน
การปลูกพืชไร้ดินPraphawit Promthep
 
Sepuluh Sendi - Sendi Ajaran Ki Hajar Dewantara Dan Aplikasinya Dalam Masyarakat
Sepuluh Sendi - Sendi Ajaran Ki Hajar Dewantara Dan Aplikasinya Dalam MasyarakatSepuluh Sendi - Sendi Ajaran Ki Hajar Dewantara Dan Aplikasinya Dalam Masyarakat
Sepuluh Sendi - Sendi Ajaran Ki Hajar Dewantara Dan Aplikasinya Dalam MasyarakatCyprian5
 

Destacado (12)

49 0
49 049 0
49 0
 
Go на Google App Engine
Go на Google App EngineGo на Google App Engine
Go на Google App Engine
 
Content Marketing 2014
Content Marketing 2014Content Marketing 2014
Content Marketing 2014
 
ใบงานสำรวจตนเอง M6 38
ใบงานสำรวจตนเอง M6 38ใบงานสำรวจตนเอง M6 38
ใบงานสำรวจตนเอง M6 38
 
Введение в Lua. Использование в GameDev.
Введение в Lua. Использование в GameDev.Введение в Lua. Использование в GameDev.
Введение в Lua. Использование в GameDev.
 
Gynecological Instruments
Gynecological InstrumentsGynecological Instruments
Gynecological Instruments
 
Surgical Scissors Manufacturers
Surgical Scissors ManufacturersSurgical Scissors Manufacturers
Surgical Scissors Manufacturers
 
Cardiovascular Instruments
Cardiovascular InstrumentsCardiovascular Instruments
Cardiovascular Instruments
 
Surgical Forceps Manufacturers
Surgical Forceps ManufacturersSurgical Forceps Manufacturers
Surgical Forceps Manufacturers
 
49
4949
49
 
การปลูกพืชไร้ดิน
การปลูกพืชไร้ดินการปลูกพืชไร้ดิน
การปลูกพืชไร้ดิน
 
Sepuluh Sendi - Sendi Ajaran Ki Hajar Dewantara Dan Aplikasinya Dalam Masyarakat
Sepuluh Sendi - Sendi Ajaran Ki Hajar Dewantara Dan Aplikasinya Dalam MasyarakatSepuluh Sendi - Sendi Ajaran Ki Hajar Dewantara Dan Aplikasinya Dalam Masyarakat
Sepuluh Sendi - Sendi Ajaran Ki Hajar Dewantara Dan Aplikasinya Dalam Masyarakat
 

Similar a Game Development with Corona SDK and Lua - Lua Workshop 2014

LibGDX: Cross Platform Game Development
LibGDX: Cross Platform Game DevelopmentLibGDX: Cross Platform Game Development
LibGDX: Cross Platform Game DevelopmentIntel® Software
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentDavid Galeano
 
Building infrastructure with Terraform (Google)
Building infrastructure with Terraform (Google)Building infrastructure with Terraform (Google)
Building infrastructure with Terraform (Google)Radek Simko
 
Introduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IOIntroduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IOLiran Zvibel
 
Big Data Beyond the JVM - Strata San Jose 2018
Big Data Beyond the JVM - Strata San Jose 2018Big Data Beyond the JVM - Strata San Jose 2018
Big Data Beyond the JVM - Strata San Jose 2018Holden Karau
 
Ruby is dying. What languages are cool now?
Ruby is dying. What languages are cool now?Ruby is dying. What languages are cool now?
Ruby is dying. What languages are cool now?Michał Konarski
 
Lua: the world's most infuriating language
Lua: the world's most infuriating languageLua: the world's most infuriating language
Lua: the world's most infuriating languagejgrahamc
 
Dart the Better JavaScript
Dart the Better JavaScriptDart the Better JavaScript
Dart the Better JavaScriptJorg Janke
 
Lua London Meetup 2013
Lua London Meetup 2013Lua London Meetup 2013
Lua London Meetup 2013Cloudflare
 
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.UA Mobile
 
OGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
OGDC2012 Lua In Game_Mr. Van, Nguyen NgocOGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
OGDC2012 Lua In Game_Mr. Van, Nguyen NgocBuff Nguyen
 
Benefits/tutorial of Lua in games
Benefits/tutorial of Lua in gamesBenefits/tutorial of Lua in games
Benefits/tutorial of Lua in gamesaction.vn
 
Roberto De Ioris - Scriptiamo Unreal Engine con Lua - Codemotion Rome 2019
Roberto De Ioris - Scriptiamo Unreal Engine con Lua - Codemotion Rome 2019Roberto De Ioris - Scriptiamo Unreal Engine con Lua - Codemotion Rome 2019
Roberto De Ioris - Scriptiamo Unreal Engine con Lua - Codemotion Rome 2019Codemotion
 
Big data beyond the JVM - DDTX 2018
Big data beyond the JVM -  DDTX 2018Big data beyond the JVM -  DDTX 2018
Big data beyond the JVM - DDTX 2018Holden Karau
 
Rapid Game Development with RUby and Gosu – Ruby Manor 4
Rapid Game Development with RUby and Gosu – Ruby Manor 4Rapid Game Development with RUby and Gosu – Ruby Manor 4
Rapid Game Development with RUby and Gosu – Ruby Manor 4benko
 

Similar a Game Development with Corona SDK and Lua - Lua Workshop 2014 (20)

LibGDX: Cross Platform Game Development
LibGDX: Cross Platform Game DevelopmentLibGDX: Cross Platform Game Development
LibGDX: Cross Platform Game Development
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
Nginx-lua
Nginx-luaNginx-lua
Nginx-lua
 
Building infrastructure with Terraform (Google)
Building infrastructure with Terraform (Google)Building infrastructure with Terraform (Google)
Building infrastructure with Terraform (Google)
 
Introduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IOIntroduction to D programming language at Weka.IO
Introduction to D programming language at Weka.IO
 
Big Data Beyond the JVM - Strata San Jose 2018
Big Data Beyond the JVM - Strata San Jose 2018Big Data Beyond the JVM - Strata San Jose 2018
Big Data Beyond the JVM - Strata San Jose 2018
 
Ruby is dying. What languages are cool now?
Ruby is dying. What languages are cool now?Ruby is dying. What languages are cool now?
Ruby is dying. What languages are cool now?
 
JS Class 2016
JS Class 2016JS Class 2016
JS Class 2016
 
Lua: the world's most infuriating language
Lua: the world's most infuriating languageLua: the world's most infuriating language
Lua: the world's most infuriating language
 
Dart the Better JavaScript
Dart the Better JavaScriptDart the Better JavaScript
Dart the Better JavaScript
 
Lua London Meetup 2013
Lua London Meetup 2013Lua London Meetup 2013
Lua London Meetup 2013
 
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
Критика "библиотечного" подхода в разработке под Android. UA Mobile 2016.
 
JS class slides (2016)
JS class slides (2016)JS class slides (2016)
JS class slides (2016)
 
OGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
OGDC2012 Lua In Game_Mr. Van, Nguyen NgocOGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
OGDC2012 Lua In Game_Mr. Van, Nguyen Ngoc
 
Benefits/tutorial of Lua in games
Benefits/tutorial of Lua in gamesBenefits/tutorial of Lua in games
Benefits/tutorial of Lua in games
 
Roberto De Ioris - Scriptiamo Unreal Engine con Lua - Codemotion Rome 2019
Roberto De Ioris - Scriptiamo Unreal Engine con Lua - Codemotion Rome 2019Roberto De Ioris - Scriptiamo Unreal Engine con Lua - Codemotion Rome 2019
Roberto De Ioris - Scriptiamo Unreal Engine con Lua - Codemotion Rome 2019
 
Big data beyond the JVM - DDTX 2018
Big data beyond the JVM -  DDTX 2018Big data beyond the JVM -  DDTX 2018
Big data beyond the JVM - DDTX 2018
 
Node.js
Node.jsNode.js
Node.js
 
Rapid Game Development with RUby and Gosu – Ruby Manor 4
Rapid Game Development with RUby and Gosu – Ruby Manor 4Rapid Game Development with RUby and Gosu – Ruby Manor 4
Rapid Game Development with RUby and Gosu – Ruby Manor 4
 
Coroutines in Kotlin
Coroutines in KotlinCoroutines in Kotlin
Coroutines in Kotlin
 

Último

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusZilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 

Último (20)

Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 

Game Development with Corona SDK and Lua - Lua Workshop 2014

  • 1. Game Development with Corona SDK and Lua @SergeyLerg Spiral Code Studio spiralcodestudio.com
  • 2. Who is that guy on the stage? PHP/JavaScript/HTML C Python PHP Lua Go
  • 3. What is Corona SDK ● coronalabs.com, #corona ● Android, iOS, Windows Phone 8 ● Development on Win or Mac ● 2D only (2.5D) ● Lua ● Fast and easy to use Simulator ● No need for Xcode
  • 4. Corona’s Language Stack ● Core is pure C++ and OpenGL ● Objective-C and Java only in wrappers ● Lua for actual code and libraries
  • 5. I U+2665 Lua ● Overall good language ● Simple, easy to learn ● Crossplatform and embeddable ● Small overhead ● But no JIT on iOS
  • 6. Corona SDK ● High performance, similar to Unity3D ● Vast API ● Starter- Basic- Pro- Enterprise- plans
  • 7. 3rd Party SDK and Libs ● Ad: Admob, iAd, Vungle, Chartboost… ● Facebook, Twitter, GameCenter, Google Play Game Services ● In-Apps: Apple, Google, Amazon, OUYA ● Analytics, zip, SQLite, JSON, LFS, bit, video, maps, native UI, PayPal… ● Scene manager, transitions and easings, timers, physics, gamepads ● Custom plugins
  • 8. Rapid Development ● Works on all platforms with little to no adjustments ● Fast ○ Simulator ○ Compiling (packaging) ○ Mini framework ● Hard to crash
  • 9. Fragmentation Zoo ● Aspect ratios ● Content Scaling ● config.lua ● Reference screen coordinates
  • 10. config.lua local w, h = display.pixelWidth, display.pixelHeight while w >= 600 do w, h = w * 0.5, h * 0.5 end application = { content = { width = w, height = h, scale = 'letterbox', fps = 60, imageSuffix = {['@2x'] = 1.2} }}
  • 11. When you deal with Lua Everything looks like a table
  • 12. params local function some(params) local self = {} self.x, self.y = params.x or 0, params.y or 0 return self end
  • 13. Lua is too forgiving
  • 14. MOAR Punishment ● strict.lua ● type checking ● strict syntax style ● unused variables ● non-nil type casting ● safe indexing ● memory leaks ● lost values on return
  • 15. Inheritance ● Classless inheritance is great ● Metatables most of the time are overkill
  • 16. Inheritance local function newBase(params) local base = {} function base:makeTheConsoleDirty() print('dirt-dirt-dirt-dirt') end base.heavyFunction = heavyFunction return base end local function newChild(params) local child = newParent() function child:cry() print('plak plak') end return child end
  • 17. More Lua ● Inline conditionals a = b and b.c or c ● Globals ● Automatic local variables ● Ad-hoc or monkey patching
  • 18. Weakened tables ● Weak values ● Weak keys ● Weak programmer
  • 19. Bad Lua code ● Forgiveness ● Many beginners ● Internet ● Mixed whitespace ● Mixed quotes ● JavaLua, JSLua, PascalLua.
  • 20. Metatables magic ● Vector2D ● Transition a number
  • 21. wxLua ● ZeroBrane Studio by Paul Kulchenko ● studio.zerobrane.com ● IRC #zerobrane
  • 22. Blog ● spiralcodestudio.com ● Corona/Lua tips ● 30+ are ready ● More than 30 are planned
  • 23.
  • 24. Clean ● Clear your mind and keyboard ● Clean keyboard leads to clean code
  • 25. Thank you Sergey Lalov - Spira Code Studio @SergeyLerg 13 September 2014 Questions and Offers spiralcodestudio@gmail.com