Lua Tutorials — Complete Beginner to Advanced Guide
In this tutorial series, you'll learn Lua from the ground up. Lua is a lightweight embeddable scripting language designed for extensibility -- used in games, embedded devices, Redis scripts, and configuration files.
1. What is Lua?
History, design, use cases
2. Setup
Install, REPL, first script
3. Syntax
Variables, types, operators
4. Tables
Arrays, dictionaries, mixed tables
5. Functions
First-class, closures, varargs
6. Metatables
Metamethods, operator overloading
7. OOP with Prototypes
self, colon syntax, inheritance
8. Coroutines
Cooperative multitasking, yield
9. File I/O
Read, write, serialization
10. Modules
require, module pattern, packages
11. C API
Embedding, extending, Lua stack
12. Love2D
Game framework, graphics, input
13. LuaRocks
Package manager, dependencies
14. Strings
Pattern matching, manipulation
15. Numbers
Arithmetic, math lib, precision
16. Booleans & Nil
Truthiness, logical operators
17. Control Flow
if, elseif, else, while, repeat
18. Loops
for numeric, for generic, break
19. pairs vs ipairs
Iterator functions, traversal
20. Varargs
..., select, unpack
21. Closures
Lexical scoping, upvalues
22. Tail Recursion
Optimization, proper tail calls
23. Error Handling
pcall, xpcall, error handling
24. Debugging
Debug lib, stack traces
25. Standard Libraries
math, string, table, os, io
26. Bit Operations
bit32, bitwise operators
27. LuaJIT
JIT compiler, FFI, performance
28. Testing
busted, unit testing, TDD
29. String Patterns
Pattern matching, captures
30. Mini Projects
Config parser, game, CLI tool
Let's begin with Lesson 1.
Published Topics
All 30 topics in Lua Tutorials — Complete Beginner to Advanced Guide are published.