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

Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimaginedpanagenda
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceSamy Fodil
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfFIDO Alliance
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!Memoori
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Patrick Viafore
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfFIDO Alliance
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty SecureFemke de Vroome
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jNeo4j
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...CzechDreamin
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsLeah Henrickson
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfFIDO Alliance
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaCzechDreamin
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastUXDXConf
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024Lorenzo Miniero
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxJennifer Lim
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FIDO Alliance
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...marcuskenyatta275
 

Último (20)

Easier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties ReimaginedEasier, Faster, and More Powerful – Notes Document Properties Reimagined
Easier, Faster, and More Powerful – Notes Document Properties Reimagined
 
Syngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdfSyngulon - Selection technology May 2024.pdf
Syngulon - Selection technology May 2024.pdf
 
WebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM PerformanceWebAssembly is Key to Better LLM Performance
WebAssembly is Key to Better LLM Performance
 
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdfThe Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
The Value of Certifying Products for FDO _ Paul at FIDO Alliance.pdf
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdfSimplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
Simplified FDO Manufacturing Flow with TPMs _ Liam at Infineon.pdf
 
ECS 2024 Teams Premium - Pretty Secure
ECS 2024   Teams Premium - Pretty SecureECS 2024   Teams Premium - Pretty Secure
ECS 2024 Teams Premium - Pretty Secure
 
Your enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4jYour enemies use GenAI too - staying ahead of fraud with Neo4j
Your enemies use GenAI too - staying ahead of fraud with Neo4j
 
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
Behind the Scenes From the Manager's Chair: Decoding the Secrets of Successfu...
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Powerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara LaskowskaPowerful Start- the Key to Project Success, Barbara Laskowska
Powerful Start- the Key to Project Success, Barbara Laskowska
 
Designing for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at ComcastDesigning for Hardware Accessibility at Comcast
Designing for Hardware Accessibility at Comcast
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptxWSO2CONMay2024OpenSourceConferenceDebrief.pptx
WSO2CONMay2024OpenSourceConferenceDebrief.pptx
 
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
FDO for Camera, Sensor and Networking Device – Commercial Solutions from VinC...
 
Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024Enterprise Knowledge Graphs - Data Summit 2024
Enterprise Knowledge Graphs - Data Summit 2024
 
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
TEST BANK For, Information Technology Project Management 9th Edition Kathy Sc...
 

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