This course is a comprehensive immersion in the Lua programming language - one of the most popular scripting languages in the world. Lua is fast, compact, and easily integrates with C and C++, making it an excellent choice for extending and scripting applications in C and C++.
Master the Lua Scripting Language
The course consists of three parts:
The first part is aimed at beginners and covers the basic elements of Lua. We will start with the very basics and explore topics such as variables, expressions, conditions, loops, functions, tables, object-oriented and functional programming, as well as popular Lua modules and tools.
The second part is intended for intermediate developers who want to learn how to integrate Lua into C or C++ projects. We will discuss how to embed Lua in a compiled application using the powerful Lua C API.
The third and final part consists of bonus lectures explaining how Lua is used in Roblox Studio. Roblox is a popular game engine that uses a dialect of Lua as the primary scripting language.
Necessary Tools
You will only need a Lua interpreter. The official Lua tools support cross-platform functionality, so you can work on Windows, macOS, or Linux.
Is this course suitable for you?
The course requires no prior knowledge. We will start with the official Lua language from scratch, so even beginners with no programming experience can confidently join!
What makes this course special?
The course is entirely dedicated to Lua! We will learn how to think like Lua programmers, understand the syntax and popular modules. Unlike most Lua resources, this course also covers integrating Lua with C and C++ code! We will learn to work with the Lua C API to embed Lua into C projects, making Lua a full-fledged scripting language.
About the Author: Gustavo Pezzi
Gustavo Pezzi is a UK-based computer-science lecturer (Pikuma) and one of the most distinctive teachers working at the intersection of low-level programming and game development. His material is unusual in the modern course market for how deep it goes into the foundations: assembly, computer architecture, classical raycasting / rasterisation algorithms, and the math underneath modern graphics.
His CourseFlix listing reflects that range: courses on 3D Computer Graphics Programming, Raycasting Engine Programming, 2D Game Physics Programming, NES Programming with 6502 Assembly, PS1 Programming with MIPS Assembly & C, Atari 2600 Programming, Compilers, Interpreters and Formal Languages, plus C++ engine programming and Lua scripting. Material is paid and aimed at developers who want to understand systems from the ground up rather than ship CRUD apps.
Watch Online 96 lessons
| # | Lesson Title | Duration | Access |
|---|---|---|---|
| 1 | Motivations and Learning Outcomes Demo | 03:14 | |
| 2 | History and Language Goals | 27:53 | |
| 3 | How to Take this Course | 02:59 | |
| 4 | A Message for Roblox Users | 01:40 | |
| 5 | Using Lua with REPL | 03:31 | |
| 6 | Installing Lua on Linux | 02:03 | |
| 7 | Installing Lua on macOS | 01:04 | |
| 8 | Installing Lua on Windows | 11:30 | |
| 9 | Our First Lua Script | 09:06 | |
| 10 | Variables | 16:36 | |
| 11 | Using REPL with Lua 5.1 | 05:27 | |
| 12 | Proposed Activity: Variables | 02:10 | |
| 13 | Variables Activity Solution | 04:16 | |
| 14 | Incrementing and Decrementing Values | 06:54 | |
| 15 | Conditional Statements | 09:18 | |
| 16 | The Elseif Statement | 11:26 | |
| 17 | Proposed Activity: Conditionals | 04:14 | |
| 18 | Conditionals Activity Solution | 10:26 | |
| 19 | Logical Operators | 06:09 | |
| 20 | String Manipulation | 19:14 | |
| 21 | Multi-line Strings | 04:38 | |
| 22 | Reading the Contents of a File | 08:19 | |
| 23 | Multiple Assignment | 03:36 | |
| 24 | Popular Standard Library Modules | 10:18 | |
| 25 | Lua String Patterns | 03:07 | |
| 26 | The For Loop | 06:17 | |
| 27 | The While Loop | 10:59 | |
| 28 | Loop Options | 02:32 | |
| 29 | Variable Scope | 04:02 | |
| 30 | Local Scope and Lua Chunks | 02:38 | |
| 31 | Syntax and Semantic Errors | 04:14 | |
| 32 | Solving Logical Mistakes | 02:50 | |
| 33 | Inputting Values from the Keyboard | 13:25 | |
| 34 | Handling Input Options | 05:44 | |
| 35 | Input Options | 04:28 | |
| 36 | Finding Distance Between Points | 09:59 | |
| 37 | Finding Angle Between Points | 12:00 | |
| 38 | Proposed Exercises on Loops | 05:54 | |
| 39 | Proposed Exercise Walkthrough | 08:36 | |
| 40 | An Introduction to Lua Functions | 14:14 | |
| 41 | Lua Tables | 22:16 | |
| 42 | Table Example | 08:04 | |
| 43 | Proposed Activity: Looping Table Entries | 06:53 | |
| 44 | Looping Table Entries Solution | 09:27 | |
| 45 | Example of Tables as Configuration Files | 04:40 | |
| 46 | Tables as Matrices | 05:45 | |
| 47 | Formative Project: Tic-Tac-Toe | 16:20 | |
| 48 | Moving Forward | 02:09 | |
| 49 | Metatables | 19:57 | |
| 50 | Object-Oriented Programming in Lua | 21:52 | |
| 51 | Creating Classes and Objects | 13:35 | |
| 52 | Higher-Order Functions and Closures | 07:14 | |
| 53 | Examples of Higher-Order Functions | 06:44 | |
| 54 | Variadic Functions | 07:04 | |
| 55 | Integrating Lua with C | 02:16 | |
| 56 | C Project Folder Structure | 12:50 | |
| 57 | Executing Lua File from C | 19:48 | |
| 58 | Get Lua Global Values in C | 12:02 | |
| 59 | Accessing the Stack | 05:52 | |
| 60 | Push Pop and Peak | 01:55 | |
| 61 | Calling Lua Functions from C | 12:21 | |
| 62 | Checking for Script Errors | 05:10 | |
| 63 | Calling Native C Functions from Lua | 17:44 | |
| 64 | Userdata | 05:32 | |
| 65 | Sending and Receiving Userdata | 14:34 | |
| 66 | Reading Lua Tables in C | 06:03 | |
| 67 | Installing SDL | 07:38 | |
| 68 | Creating SDL Window | 13:59 | |
| 69 | The Game Loop | 14:26 | |
| 70 | SDL Rendering | 11:22 | |
| 71 | Fixing the Game Loop Timestep | 13:55 | |
| 72 | Update as a Function of Delta Time | 05:49 | |
| 73 | Controlling the Player Movement with Lua | 26:01 | |
| 74 | Final Considerations on Lua and C | 06:20 | |
| 75 | Next Steps | 04:15 | |
| 76 | Lua and Roblox | 02:25 | |
| 77 | Accessing Roblox Studio | 05:45 | |
| 78 | Roblox Parts and Properties | 12:15 | |
| 79 | Roblox Vectors and Colors | 11:02 | |
| 80 | Roblox New Object Instance | 06:08 | |
| 81 | Proposed Activity: Sun & Moon Script | 05:48 | |
| 82 | Sun & Moon Script Activity Solution | 09:43 | |
| 83 | Roblox Loops and the Wait Function | 07:22 | |
| 84 | Roblox Loops and Conditionals | 09:02 | |
| 85 | Roblox Events | 10:25 | |
| 86 | Roblox Humanoid Properties | 16:44 | |
| 87 | Roblox Players and Characters | 10:00 | |
| 88 | Roblox Models and Assets | 06:48 | |
| 89 | Roblox Terrain Editor | 03:59 | |
| 90 | Roblox Lighting and ClockTime | 09:19 | |
| 91 | Roblox Leaderboard | 08:46 | |
| 92 | Roblox Debugging | 02:53 | |
| 93 | Roblox CFrame | 07:47 | |
| 94 | Roblox Following Parts | 11:02 | |
| 95 | Getting Help with Roblox | 05:14 | |
| 96 | Building Lua 5.4 from Source on Linux | 08:08 |
Get instant access to all 95 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.
Learn more about subscriptionRelated courses
-
Updated 2y agoPS1 Programming with MIPS Assembly & C
By: Gustavo PezziThis course is a deep dive into the world of PlayStation programming! We'll explore the PS1 hardware, understand its sub-components, and learn how to code games34h 39m5/5 -
Updated 2y ago1-Bit Godot Course by Heartbeast
By: Benjamin Anderson (HeartBeast)So you're trying to learn Godot Engine. You've been digging through YouTube videos but there aren't as many learning resources as other engines like Unity or Ga16h 50m -
Updated 2y ago[PRO] Make Professional 2d Games with the Godot Game Engine
By: GDQuestBecome a better game developer! With this course, you will learn to create your own top-down game inspired by Zelda, using the Free and Open Source game engine23h 26m