Skip to content
New this month 24 fresh C++, C#, F#, JavaScript, TypeScript and Lua courses just landed. Browse new releases Use code WELCOME10 for 10% off your first order · 14-day refund

Lua from Scratch: Tables, Metatables and Your First Scripts

The whole language in an afternoon, then the depth that makes Lua genuinely powerful.

Rated 5.0 out of 5 from 2 reviews 16 students

VC Created by Victor Chen

  • Last updated August 2026
  • English
  • 4h 48m of material
  • 36 lessons

What you will learn

8 concrete outcomes

Every bullet below is something you will have built, shipped or be able to explain by the time you finish the last lesson.

  • Write idiomatic Lua with local scoping, multiple returns, varargs and closures
  • Use tables as arrays, dictionaries, sets, stacks and queues without extra libraries
  • Implement object orientation, inheritance and operator overloading with metatables
  • Match and transform text with Lua patterns instead of a regular expression library
  • Write coroutines for cooperative multitasking and generator-style iteration
  • Handle errors with pcall and xpcall and produce useful tracebacks
  • Organise code into modules with require and a sensible package path
  • Build and run a complete command-line tool in pure Lua

Course curriculum

6 modules · 36 lessons · 4h 48m of material

8 lessons running 1h 02m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

8 lessons running 1h 04m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

8 lessons running 1h 06m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

5 lessons running 38m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

4 lessons running 30m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

3 lessons running 28m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

6 modules · 36 lessons

4h 48m total length

Requirements

Short list, and deliberately so. If you meet these you can start today.

  • Some programming experience in any language
  • Lua 5.4 installed locally, which the first lesson walks through
  • No prior Lua or game development experience needed

About this course

Lua is small enough that you can hold the entire language in your head, which is exactly why it ends up embedded in games, network proxies, editors and devices everywhere. This course teaches all of it, then spends most of its time on the one construct that matters most: the table.

The first modules cover values, functions, scope, the numeric and generic for loops, multiple return values, varargs and string handling with patterns. Lua conventions that surprise newcomers are addressed directly, one-based indexing, nil versus false, the length operator on tables with holes, and why global variables are a trap in embedded environments.

The second half is tables and metatables. You build arrays, dictionaries, sets and queues from the single table type, then use metatables to implement object orientation with a clean prototype chain, operator overloading, read-only tables, default values and property access hooks. Coroutines follow as the natural way Lua expresses cooperative multitasking. The course closes with modules, require, error handling with pcall, and a small command-line tool that reads configuration and processes text files.

Topics covered

Frequently asked questions

Still unsure about something? Write to misteryjj100@gmail.com and a human answers, usually the same working day.

Lua 5.4, with explicit notes wherever 5.1 or LuaJIT differ, since embedded hosts such as Roblox and many game engines pin older versions.

No. Everything runs in the standalone Lua interpreter. The game scripting course covers Roblox and Love2D specifically.

It remains the default embedded scripting language in games, and it powers configuration and extension layers in tools like Neovim, Redis modules and OpenResty.

The project module introduces busted for unit tests and luacheck for static analysis, both installed through LuaRocks. If you plan to embed Lua in a C or C++ host, the dedicated C API course continues from there.

Checkout is handled on our provider's secure payment page. The moment your payment clears we email your personal access link and access code to the address you used at checkout, and the same link appears in your account library. There is nothing to install and nothing to wait for.

Email misteryjj100@gmail.com within 14 days of your purchase, quote your order number, and we refund the full amount to your original payment method. No form to fill in and no questions about how much of the course you watched.

What students say

Reviews are written by people who bought this course. We publish the critical ones too.

5.0

Rated 5.0 out of 5

Course rating · 2 reviews

Rating distribution

  • 5 stars 100%
  • 4 stars 0%
  • 3 stars 0%
  • 2 stars 0%
  • 1 star 0%
  • ME

    Malin Ekström

    Tools programmer

    Jan 2026
    Rated 5.0 out of 5

    One table type, and it is enough

    Arriving from Python I kept hunting for the list type and the dictionary type. Ten minutes on how both are the same table with different keys reframed the entire language for me.
  • RA

    Rui Almeida

    Freelance game dev

    Sep 2025
    Rated 5.0 out of 5

    The patterns section is underrated

    Lua patterns are not regular expressions and most tutorials mumble past that. Here they are taught on their own terms, character classes included, and the almost-familiar ones are called out specifically so you stop guessing. The configuration-driven CLI at the end tied everything together neatly.

Your instructor

VC

Victor Chen

Lua developer and game-scripting instructor

  • 65 students taught
  • 4 courses published
  • 4.1 instructor rating
  • Lua
  • Roblox
  • LÖVE 2D
  • Game scripting

Victor has spent most of his career on the scripting side of games, from Roblox experiences with a live player base to small LÖVE 2D releases he built entirely himself. He teaches Lua as an embedded language first — tables, metatables, coroutines and the C boundary — because that is what makes an engine's API stop feeling arbitrary. Every course ends with something playable and, more usefully, something you can keep changing without it falling over. He runs a scripting help channel that has outgrown him twice.

$29 USD

One-time payment · lifetime access

The WisdomCharms dispatch

One useful email a week. No fluff, no spam.

New course releases, discount codes before anyone else, and a short, practical breakdown of one technique — a prompt pattern, a C++ idiom, a TypeScript trick — that you can use the same day.

  • Subscriber-only launch pricing
  • Unsubscribe in one click
  • We never sell your address

By subscribing you agree to our Privacy Policy. Questions? Write to misteryjj100@gmail.com.