Learning Lua


The Lua scripting language has been rapidly gaining in popularity over the last several years.  It is now the core of many popular tools including (but not limited to) Corona SDK, Amazon LumberyardAutodesk Stingray, and WoW.

As I have been preparing for my classes, I recognized that a series of tutorials in the Lua scripting language would be beneficial.

For experienced programmers, a great resource for learning Lua is the official guide Programming in Lua. There are also some great resources on the Lua.org

I will be using the ZeroBrane IDE for all of my Lua examples.

Lua receives extensive treatment in my Corona SDK books.  You can check them out on my website, Amazon, or Apple iTunes.

Here are the tutorials in order:

Part 1: Provides some background on Lua, introduces the ZeroBrane IDE and covers the obligatory “Hello World”

Part 2: Using print and comments with troubleshooting tips!

Part 3: Variables – Learn about the types of variables and taking full advantage in Lua

Part 4: Strings- How to work with strings variables in Lua.

Part 5: Math & Math Library – Lua has a lot of great math tool available.  A quick overview of how to use the math library.

Part 6: Functions – how to use functions in Lua

https://youtu.be/_nyDPEMRaDA

Part 7: Scope – Variable scope can be tricky! A quick introduction to scope in Lua

https://youtu.be/ftsJaVL5mj8

Part 8: String Library – just like math, strings have a great set of tools built into Lua

https://youtu.be/YRGxjYd8b10

Part 9: If-then: Using if-then in the Lua scripting language

https://youtu.be/yTFIbMgiRcw

Part 10: Using loops in Lua

https://youtu.be/QVvyrpp9L0E

Part 11: File Input & Output: Lua has an easy to use IO system!

https://youtu.be/t6rt6TVUxJs

Part 12: Tables – an introduction to data structures in Lua

https://youtu.be/foYvA_RDvdA

Part 13: Generic For Loops – also known as ipairs and pairs!

https://youtu.be/iaJOA47qYGE

Part 14:  Closure – No, this has nothing to do with relationships! A closure is an anonymous function… very handy!!
https://youtu.be/YzZV4VGgjXw

Part 15: OS Library – a whole host of functions such as date, time, clock, etc.
https://youtu.be/58QmUb9VRX8

Part 16: Modules – working with modules – libraries of code to make your app development faster and easier.
https://youtu.be/O2U5tae6Tgw?list=PLxgtJR7f0RBKGid7F2dfv7qc-xWwSee2O

Recent Posts