Lua Scripting: Master complete Lua Programming from scratch

Lua Scripting: Master complete Lua Programming from scratch

English | MP4 | AVC 1280×720 | AAC 48KHz 2ch | 13.5 Hours | 9.09 GB

Learn complete Lua scripting from scratch; integrate Lua with C and understand how Lua is used by the Roblox Game Engine

This course will teach you everything you need to know about the Lua scripting language.

We will start from scratch, installing Lua in your platform (Windows, macOS, or Linux), and progress to learn the main aspects of the Lua language. I will use Linux during the videos, but you can easily follow along with any other OS. If by any chance you cannot or do not want to install Lua in your machine, you can simply use the Replit website which allows you to run your Lua scripts inside your web browser.

This course is divided into three main parts:

The first part is where we will cover the basics of the Lua language. We will learn the fundamentals of programming with Lua using variables, expressions, conditional statements, loops, functions, metatables, and other important commands and modules from the Lua language. This part covers Lua from the beginning to an advanced level, and it is a super course even if you never programmed before.

The second part of the course is aimed at programmers that want to learn how to embed Lua within the C programming language. You’ll learn how to embed and expose scripting capabilities to your C code and create a project that controls the movement of a player in C using Lua. If you don’t want or don’t care about integrating Lua with C, you are welcome to skip this section of the course, but this integration with C is one of the most powerful aspects of the Lua language and it is extremely important for professional programmers that want to take their Lua skills beyond the basics.

The third part of the course is a set of short bonus lectures that cover the basics of using Lua with Roblox Studio. Roblox is a popular game engine that uses Lua to script game logic and aspects of the game scene. We will learn how to use everything we learned to understand how Lua is used by Roblox and also understand the basics of the Roblox Studio interface.

This course is a super complete package about one of the world’s favorite scripting languages. You will benefit from it if you are a beginner or if you are a seasoned developer that wants to discover the power of the Lua language.

What you’ll learn

  • Lua Scripting
  • Integrate Lua with C and C++
+ Table of Contents

1 Introduction and Motivations
2 A Message for Roblox Users
3 History and Language Evolution
4 Why do you want to learn Lua

Installing and Using Lua
5 A Quick Message About Installing Lua
6 Using Lua with REPL
7 Installing Lua on Linux
8 Installing Lua on MacOS
9 Installing Lua on Windows

Course Source Code (Download)
10 Source Code (Download)

Variables and Expressions
11 Our First Lua Script
12 Variables
13 Older Lua Versions and REPL
14 Proposed Activity Variables
15 Variables Activity Solution
16 Exercises Variables and Expressions
17 Incrementing and Decrementing Variables

Conditionals and Logical Operators
18 Conditionals
19 Elseif
20 Proposed Activity Conditional Statements
21 Conditionals Activity Solution
22 Logical Operators
23 Exercises Conditionals

Strings and Standard Library Modules
24 String Manipulation
25 Multi-line Strings
26 Multiple Assignment
27 Standard Library Modules
28 Exercises Strings and Random

Loops and Functions
29 The For Loop
30 The While Loop
31 Loop Options
32 Variable Scope
33 Local Scope and Lua Chunks
34 Syntax & Semantic Errors
35 Solving Logical Mistakes
36 Input Values from the Keyboard
37 Handling Input Options
38 Finding Distance Between Points
39 Finding Angle Between Points
40 Arctangent Function in New Lua Versions
41 Loop Activity Example
42 Loop Activity Solution
43 Exercises Loops
44 An Introduction to Functions
45 Exercises Functions

46 Tables in Lua
47 Tables Example
48 Proposed Activity Reading Table Entries
49 Table Activity Solution
50 Tables as Configuration Files
51 Tables as Matrices
52 Proposed Formative Project

Metatables and Object-Oriented Programming
53 Moving Forward
54 Metatables
55 Exercises Metatables
56 Object-Oriented Programming in Lua
57 Creating Classes and Objects
58 Exercises Classes and Objects

More on Lua Functions
59 Higher-Order Functions and Closures
60 Variadic Functions
61 Coroutines

Integrating Lua with C
62 Working with Lua and C
63 C Project Folder Structure
64 Executing Lua File From C
65 Get Lua Global Values in C
66 The Stack
67 Push Pop and Peak
68 Calling Lua Functions From C
69 Checking and Handling Script Errors
70 Calling C Functions in Lua
71 Userdata
72 Sending and Receiving Userdata
73 Reading Lua Tables in C
74 Installing SDL
75 Creating a SDL Window
76 The Game Loop
77 SDL Rendering
78 Fixing Our Game Loop Timestep
79 Delta Time
80 Controlling the Player Movement with Lua
81 Proposed Exercise Creating the function rect()
82 Final Considerations on Integrating Lua and C

Conclusion and Next Steps
83 Next Steps
84 LuaJIT

Bonus Section Using Lua with Roblox Studio
85 Intro to Roblox and Roblox Studio
86 Installing and Accessing Roblox Studio
87 Roblox Parts and Properties
88 Roblox Vectors and Colors
89 Roblox Object Instance
90 Proposed Activity Sun and Moon System Hour
91 Sun and Moon Activity Solution
92 Roblox Loops and the Wait Function
93 Roblox Loops and Conditionals
94 Roblox Events
95 Roblox Humanoid Properties
96 Roblox Players and Characters
97 Roblox Models and Assets
98 Roblox Terrain Editor
99 Roblox Day-Night Lighting & ClockTime
100 Roblox Leaderboard
101 Roblox Debugging and Code Inspection
102 Roblox CFrame
103 Roblox Following Parts
104 Roblox Conclusion and Getting Help

Bonus Section Building Lua 5.4 from Source
105 Compiling the Lua 5.4 Language from Source
106 Compiling Lua 5.4 on Linux

Bonus Lecture
107 Discount on Our Other Courses