Master the Lua Scripting Language

13h 59m 27s
English
Paid

Course description

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++.

Read more about the course

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.

Watch Online

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 96 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing

Watch Online Master the Lua Scripting Language

0:00
/
#1: Motivations and Learning Outcomes

All Course Lessons (96)

#Lesson TitleDurationAccess
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

Unlock unlimited learning

Get instant access to all 95 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Comments

0 comments

Want to join the conversation?

Sign in to comment

Similar courses

Ultimate C++ Part 2: Intermediate

Ultimate C++ Part 2: Intermediate

Sources: codewithmosh (Mosh Hamedani)
Enhance your C++ skills by mastering arrays, pointers, and other key concepts. Ideal for those with basic knowledge from part one. Course by Mosh Hamedani.
3 hours 37 minutes 48 seconds
NES Programming with 6502 Assembly

NES Programming with 6502 Assembly

Sources: Gustavo Pezzi
This course is a complete immersion into the world of the Nintendo Entertainment System. We will learn to program games for the NES using the Assembly 6502...
27 hours 55 minutes 3 seconds
Building a Parser from scratch

Building a Parser from scratch

Sources: udemy, Dmitry Soshnikov
Parsing or syntactic analysis is one of the first stages in designing and implementing a compiler. A well-designed syntax of your programming language is a big
2 hours 31 minutes 11 seconds
Ultimate C++ Part 1: Fundamentals

Ultimate C++ Part 1: Fundamentals

Sources: codewithmosh (Mosh Hamedani)
Master C++ fundamentals with Mosh Hamedani's course. Ideal for video games, IoT devices, and more. Enhance your coding skills with real-world examples.
3 hours 52 minutes 48 seconds
Ultimate C++ Part 3: Advanced

Ultimate C++ Part 3: Advanced

Sources: codewithmosh (Mosh Hamedani)
To take this course, you should have watched the first two parts or have a thorough understanding of the concepts covered there. You should be able to write basic C++ programs a...
3 hours 41 minutes 57 seconds