This course includes

  • 11 hours on-demand video

  • Downloadable resources and exercises

  • Full lifetime access

  • Access on mobile and desktop

  • 14 day money back guarantee

  • Secure checkout through PayPal

Watch Intro Video

Motivations & Learning Outcomes

Is this course for you?

This first part of this course expects no prior knowledge about coding. Lua is our favorite programming language to teach beginners to code, and even if you never wrote a single line of code before you'll learn the basics of scripting with Lua. The second part of the course is for seasoned developers that want to take their knowledge beyond the basics. This second section covers advanced aspects of the language, including how to integrate Lua with native C and C++ projects.
Buy $11.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. The second part is for intermediate and seasoned programmers that want learn how to integrate Lua with C and C++. We'll put our C programmer's hat on to learn how we can embed Lua and use it to script native applications. You will also find a series of short bonus lectures at the end of the course that demonstrate how Lua is used inside Roblox, a popular game engine that uses Lua as its main scripting language.
Buy $11.99
What you'll learn
  • Activities and discussions

    Join our community and get the most of our discussion boards

  • Direct instructor contact

    Have direct contact with your instructor at any given time during and after you complete your course

  • 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
    • Proposed Activity: Variables and Expressions
    • Variables Activity Walkthrough
    • Incrementing and Decrementing Values
    • Proposed Exercises: Variables and Expressions
  • 4
    Conditionals and Logical Operators
  • 5
    Strings and Standard Library Modules
    • String Manipulation
    • Multi-line Strings
    • Multiple Assignment
    • Popular Standard Library Modules
    • Proposed Activity: Strings and Standard Modules
  • 6
    Loops and Functions
    • The For Loop
    • The While Loop
    • Other Loop Options
    • Variable Scope
    • Menu Loop Example
    • Finding Distance and Angle Between Points
    • An Introduction to Lua Functions
    • Proposed Activity: Functions
    • Loop Activity Example
    • Loop Activity Walkthrough
    • Proposed Activity: Loops
  • 7
    • Lua Tables
    • Table Examples
    • Proposed Activity: Looping Table Entries
    • Tables as Configuration Files
    • Tables as Matrices
    • Formative Project: Tic-Tac-Toe
    • Formative Project: Code Download
  • 8
    Integrating Lua and C
    • Working with Lua and C
    • C Project Folder Structure
    • Executing Lua Scripts from C
    • Get Lua Global Values in C
    • The Stack
    • Calling Lua Functions from C
    • Checking for Script Errors
    • Calling C Functions in Lua
    • Userdata
    • Accessing Lua Tables in C
    • Installing SDL
    • Creating a SDL Window
    • The Game Loop
    • SDL Rendering
    • Fixing the Game Loop Timestep
    • Update as a Function of Delta Time
    • Controlling Movement with Lua
    • Source Code (Download)
    • Proposed Exercise: Function rect()
    • Final Considerations on Lua and C
  • 9
    Metatables and OOP in Lua
    • Metatables
    • Classes and Objects
  • 10
    More on Lua Functions
    • Higher-Order Functions and Closures
    • Variadic Functions
    • Coroutines
    • LuaJIT
  • 11
    Conclusion and Next Steps
    • Next Steps
  • 12
    Bonus Lecture: Roblox Studio
    • Lua and Roblox
    • Accessing Roblox Studio
    • Parts and Properties FREE PREVIEW
    • Vectors and Colors
    • Activity: Adding a Sun and Reading the System Hour
    • Instancing New Parts
    • Loops and Conditionals in Roblox
    • Roblox Events
  • 13
    Moving Forward
    • Similar Courses


  • Gustavo Pezzi

    Senior Lecturer

    Gustavo Pezzi

    Gustavo teaches computer science and mathematics at BPP University, London. He researches how teaching game programming can help enhance awareness and understanding of mathematics and physics. He is also a professional software engineer with more than 10 years of experience, with an industry background in 3D systems, games, web systems, databases, and data science. His academic path includes institutions such as Pittsburg State University, City University of London, and University of Oxford.