This course includes

(updated Jan 2021)

  • 12 hours on-demand video

  • Downloadable resources and exercises

  • Lifetime access

  • Access on mobile and desktop

  • Certificate of completion

  • 14 day money back guarantee

  • Secure checkout through Credit Card or PayPal

Is this course for you?

This first and part of this course expects no prior knowledge about coding. You'll learn from the ground up all the details about the language and review concepts such as object-oriented and functional programming. The second part of this course (where we learn how to integrate Lua with C and C++) expects you to know how to work with the C programming language.
Buy $19.99
Is this course for you?

What you'll learn

Course overview and structure

This is a complete course dedicated to Lua, one of the world's favorite scripting languages. Lua is a fast, simple, and easy to integrate language which makes it an excellent choice to extend applications and script games. This course is divided into two parts. The first part is a complete beginner journey into the basics of the language, where we'll look at variables, expressions, conditionals, loops, functions, tables, and other popular statements and modules of Lua.
Buy $19.99
What you'll learn
Watch Intro Video

Course Introduction & Learning Outcomes

Kicking things up a notch!

The final part of this course is for intermediate/experienced programmers that want learn how to integrate Lua with C and C++. We'll put our C programmer's hat on and learn how we can embed Lua and use it to script native applications. At the end, you will also find a series of short bonus lectures that show how Lua is used inside Roblox, a popular game engine that uses Lua as its main scripting language.
Buy $19.99
Kicking things up a notch!
  • Lifetime access

    Enroll now and get lifetime access to the course content

  • Access to discussion forum

    Discuss course topics and engage with other students using the discussion board

  • Money back guarantee

    We offer a 14 day money back guarantee for all our courses. No questions asked.

Course Content

  • 1
    Motivations and Learning Outcomes
  • 2
    Installing and Using Lua
  • 3
    Variables and Expressions
    • Our First Lua Script
    • Variables
    • Using REPL with Lua 5.1
    • Proposed Activity: Variables
    • Variables Activity Solution
    • Exercises: Variables
    • Incrementing and Decrementing Values
    • Quiz: Variables and Expressions
  • 4
    Conditionals and Logical Operators
  • 5
    Strings and Other Standard Library Modules
    • String Manipulation
    • Multi-line Strings
    • Multiple Assignment
    • Popular Standard Library Modules
    • Exercises: Strings and Random Numbers
  • 6
    Loops and Functions
    • The For Loop
    • The While Loop
    • Loop Options
    • Quiz: Loops
    • Variable Scope
    • Local Scope and Lua Chunks
    • Syntax and Semantic Errors
    • Solving Logical Mistakes
    • Inputting Values from the Keyboard
    • Handling Input Options
    • Finding Distance Between Points
    • Finding Angle Between Points
    • The Newer Function atan()
    • Proposed Exercises on Loops
    • Proposed Exercise Walkthrough
    • Exercises: Loops
    • An Introduction to Lua Functions
    • Exercises: Functions
  • 7
    • Lua Tables
    • Pairs and Indexed-Pairs
    • Table Example
    • Proposed Activity: Looping Table Entries
    • Looping Table Entries Solution
    • Example of Tables as Configuration Files
    • Tables as Matrices
    • Formative Project: Tic-Tac-Toe
  • 8
    Metatables and OOP in Lua
  • 9
    More on Lua Functions
    • Higher-Order Functions and Closures
    • Examples of Higher-Order Functions
    • Variadic Functions
    • Coroutines
  • 10
    Integrating Lua and C
    • Integrating Lua with C
    • C Project Folder Structure
    • Executing Lua File from C
    • Get Lua Global Values in C
    • Accessing the Stack
    • Push Pop and Peak
    • Quiz: Stack
    • Calling Lua Functions from C
    • Checking for Script Errors
    • Calling Native C Functions from Lua
    • Userdata
    • Sending and Receiving Userdata
    • Reading Lua Tables in C
    • Installing SDL
    • Creating SDL Window
    • The Game Loop
    • SDL Rendering
    • Fixing the Game Loop Timestep
    • Update as a Function of Delta Time
    • Controlling the Player Movement with Lua
    • Source Code (Download)
    • Proposed Exercise: Function rect()
    • Final Considerations on Lua and C
  • 11
    Conclusion and Next Steps
    • LuaJIT
    • Next Steps
  • 12
    Bonus Lecture: Roblox Studio
    • Lua and Roblox
    • Accessing Roblox Studio
    • Roblox Parts and Properties FREE PREVIEW
    • Roblox Vectors and Colors
    • Roblox New Object Instance
    • Proposed Activity: Sun & Moon Script
    • Sun & Moon Script Activity Solution
    • Roblox Loops and the Wait Function
    • Roblox Loops and Conditionals
    • Roblox Events
    • Roblox Humanoid Properties
    • Roblox Players and Characters
    • Roblox Models and Assets
    • Roblox Terrain Editor
    • Roblox Lighting and ClockTime
    • Roblox Leaderboard
    • Roblox Debugging
    • Roblox CFrame
    • Roblox Following Parts
    • Getting Help with Roblox
  • 13
    Building Lua 5.4 from Source
    • Versions of Lua
    • Building Lua 5.4 from Source on Linux
  • 14
    Moving Forward
    • Copyright & Content Distribution
    • Similar Courses


  • Gustavo Pezzi

    Senior Lecturer

    Gustavo Pezzi

    Gustavo teaches computer science and mathematics at BPP University, London. He studies how teaching game programming can help enhance awareness and understanding of basic mathematics and physics. He is also a professional programmer with several years of experience in the computing industry. His academic path includes institutions such as Pittsburg State University, City University of London, and University of Oxford.