Master the Lua Scripting Language

Master the Lua Scripting Language

English | MP4 | AVC 1920×1080 | AAC 44KHz 2ch | 96 Lessons (13h 59m) | 2.10 GB

Learn to code using the Lua scripting language and learn how to integrate Lua with your native C and C++ applications

This is a comprehensive course dedicated to the language Lua, one of the world’s favorite scripting languages. Lua is fast, small, and super easy to integrate with C and C++, which makes Lua an excellent choice to extend and script compiled C and C++ applications.

This course is divided in three parts:

1. The first part is a beginner-friendly journey into the building blocks of the Lua language. We’ll start from the very beginning and look at things like variables, expressions, conditionals, loops, functions, tables, object-oriented programming, functional programming, and other popular tools and modules of Lua.

2. The second part is aimed at intermediate-experienced developers that want to learn how to integrate Lua with their native C or C++ projects. We’ll put our C-programmer’s hat on and review how to embed the Lua programming language inside a compiled application using the powerful Lua C API.

3. The third and last part is a series of short bonus lectures. These lectures will explain how the Lua language is used inside Roblox Studio. Roblox is an example of a popular game engine that uses a dialect of Lua as its main scripting language.

The tools you’ll need
All you need is a Lua interpreter. The official Lua tools are all cross-platform, which means you’ll be able to code along on either Windows, macOS, or Linux!

Is this course for you?
This course has no prerequisites. We’ll cover the official Lua language from the ground up, so even beginners with no prior experience in coding are welcome to join!

How is this course different?
This is a complete immersion in the world of Lua! We’ll learn how to think like Lua programmers, carefully covering the syntax and the most popular modules from Lua.

Differently than most Lua resources out there, this course also covers the integration of Lua with native C and C++ code! We’ll learn to work with the Lua C API to embed the Lua language inside a C project, exposing Lua to be used as a proper scripting language.

Table of Contents

1 Motivations and Learning Outcomes
2 History and Language Goals
3 How to Take this Course
4 A Message for Roblox Users
5 Using Lua with REPL
6 Installing Lua on Linux
7 Installing Lua on macOS
8 Installing Lua on Windows
9 Our First Lua Script
10 Variables
11 Using REPL with Lua 5.1
12 Proposed Activity: Variables
13 Variables Activity Solution
14 Incrementing and Decrementing Values
15 Conditional Statements
16 The Elseif Statement
17 Proposed Activity: Conditionals
18 Conditionals Activity Solution
19 Logical Operators
20 String Manipulation
21 Multi-line Strings
22 Reading the Contents of a File
23 Multiple Assignment
24 Popular Standard Library Modules
25 Lua String Patterns
26 The For Loop
27 The While Loop
28 Loop Options
29 Variable Scope
30 Local Scope and Lua Chunks
31 Syntax and Semantic Errors
32 Solving Logical Mistakes
33 Inputting Values from the Keyboard
34 Handling Input Options
35 Input Options
36 Finding Distance Between Points
37 Finding Angle Between Points
38 Proposed Exercises on Loops
39 Proposed Exercise Walkthrough
40 An Introduction to Lua Functions
41 Lua Tables
42 Table Example
43 Proposed Activity: Looping Table Entries
44 Looping Table Entries Solution
45 Example of Tables as Configuration Files
46 Tables as Matrices
47 Formative Project: Tic-Tac-Toe
48 Moving Forward
49 Metatables
50 Object-Oriented Programming in Lua
51 Creating Classes and Objects
52 Higher-Order Functions and Closures
53 Examples of Higher-Order Functions
54 Variadic Functions
55 Integrating Lua with C
56 C Project Folder Structure
57 Executing Lua File from C
58 Get Lua Global Values in C
59 Accessing the Stack
60 Push Pop and Peak
61 Calling Lua Functions from C
62 Checking for Script Errors
63 Calling Native C Functions from Lua
64 Userdata
65 Sending and Receiving Userdata
66 Reading Lua Tables in C
67 Installing SDL
68 Creating SDL Window
69 The Game Loop
70 SDL Rendering
71 Fixing the Game Loop Timestep
72 Update as a Function of Delta Time
73 Controlling the Player Movement with Lua
74 Final Considerations on Lua and C
75 Next Steps
76 Lua and Roblox
77 Accessing Roblox Studio
78 Roblox Parts and Properties
79 Roblox Vectors and Colors
80 Roblox New Object Instance
81 Proposed Activity: Sun & Moon Script
82 Sun & Moon Script Activity Solution
83 Roblox Loops and the Wait Function
84 Roblox Loops and Conditionals
85 Roblox Events
86 Roblox Humanoid Properties
87 Roblox Players and Characters
88 Roblox Models and Assets
89 Roblox Terrain Editor
90 Roblox Lighting and ClockTime
91 Roblox Leaderboard
92 Roblox Debugging
93 Roblox CFrame
94 Roblox Following Parts
95 Getting Help with Roblox
96 Building Lua 5.4 from Source on Linux

Homepage