This course includes

  • 12 hours on-demand video

  • Downloadable resources and exercises

  • Full lifetime access

  • Access on mobile and desktop

  • 14 day money back guarantee

  • Secure checkout through PayPal or Stripe

Watch Intro Video

Motivations & Learning Outcomes

Is this course for you?

This first part of this course expects no prior knowledge about coding. Lua is our favorite programming language to teach beginners to code, and even if you never wrote a single line of code before you'll learn the basics of scripting with Lua. The second part of the course is for seasoned developers that want to take their knowledge beyond the basics. This second section covers advanced aspects of the language, including how to integrate Lua with native C and C++ projects.
Buy $12.99
Is this course for you?

What you'll learn

Course overview and structure

This is a complete course dedicated to Lua, one of the world's favorite scripting languages. Lua is a fast, simple, and easy to integrate language which makes it an excellent choice to extend applications and script games. This course is divided into two parts. The first part is a complete beginner journey into the basics of the language, where we'll look at variables, expressions, conditionals, loops, functions, tables, and other popular statements and modules of Lua. The second part is for intermediate and seasoned programmers that want learn how to integrate Lua with C and C++. We'll put our C programmer's hat on to learn how we can embed Lua and use it to script native applications. You will also find a series of short bonus lectures at the end of the course that demonstrate how Lua is used inside Roblox, a popular game engine that uses Lua as its main scripting language.
Buy $12.99
What you'll learn
  • Lifetime access

    Enroll now and get lifetime access to the course content

  • Access to discussion forum

    Discuss course topics and engage with other students using the discussion board

  • Money back guarantee

    We offer a 14 day money back guarantee for all our courses. No questions asked.

Course Content

  • 2
    Installing and Using Lua
  • 3
    Building Lua 5.4 from Source
    • Versions of Lua
    • Building Lua 5.4 from Source on Linux
  • 4
    Variables and Expressions
    • Our First Lua Script
    • Variables
    • Using REPL with Lua 5.1
    • Proposed Activity: Variables
    • Variables Activity Solution
    • Exercises: Variables
    • Incrementing and Decrementing Values
    • Quiz: Variables and Expressions
  • 5
    Conditionals and Logical Operators
  • 6
    Strings and Other Standard Library Modules
    • String Manipulation
    • Multi-line Strings
    • Multiple Assignment
    • Popular Standard Library Modules
    • Exercises: Strings and Random Numbers
  • 7
    Loops and Functions
    • The For Loop
    • The While Loop
    • Loop Options
    • Quiz: Loops
    • Variable Scope
    • Local Scope and Lua Chunks
    • Syntax and Semantic Errors
    • Solving Logical Mistakes
    • Inputting Values from the Keyboard
    • Handling Input Options
    • Finding Distance Between Points
    • Finding Angle Between Points
    • Proposed Exercises on Loops
    • Proposed Exercise Walkthrough
    • Exercises: Loops
    • An Introduction to Lua Functions
    • Exercises: Functions
  • 8
    Tables
    • Lua Tables
    • Table Example
    • Proposed Activity: Looping Table Entries
    • Example of Tables as Configuration Files
    • Tables as Matrices
    • Formative Project: Tic-Tac-Toe
  • 9
    Metatables and OOP in Lua
  • 10
    More on Lua Functions
    • Higher-Order Functions and Closures
    • Examples of Higher-Order Functions
    • Variadic Functions
    • Coroutines
  • 11
    Integrating Lua and C
    • Integrating Lua with C
    • C Project Folder Structure
    • Executing Lua File from C
    • Get Lua Global Values in C
    • Accessing the Stack
    • Push Pop and Peak
    • Quiz: Stack
    • Calling Lua Functions from C
    • Checking for Script Errors
    • Calling Native C Functions from Lua
    • Userdata
    • Sending and Receiving Userdata
    • Reading Lua Tables in C
    • Installing SDL
    • Creating SDL Window
    • The Game Loop
    • SDL Rendering
    • Fixing the Game Loop Timestep
    • Update as a Function of Delta Time
    • Controlling the Player Movement with Lua
    • Source Code (Download)
    • Proposed Exercise: Function rect()
    • Final Considerations on Lua and C
  • 12
    Conclusion and Next Steps
    • LuaJIT
    • Next Steps
  • 13
    Bonus Lecture: Roblox Studio
    • Lua and Roblox
    • Accessing Roblox Studio
    • Roblox Parts and Properties FREE PREVIEW
    • Roblox Vectors and Colors
    • Roblox New Object Instance
    • Proposed Activity: Sun & Moon Script
    • Sun & Moon Script Activity Solution
    • Roblox Loops and the Wait Function
    • Roblox Loops and Conditionals
    • Roblox Events
    • Roblox Humanoid Properties
    • Roblox Players and Characters
    • Roblox Models and Assets
    • Roblox Terrain Editor
    • Roblox Lighting and ClockTime
    • Roblox Leaderboard
    • Roblox Debugging
    • Roblox CFrame
    • Roblox Following Parts
    • Getting Help with Roblox
  • 14
    Moving Forward
    • Similar Courses

Reviews

  • Excellent Course!

    Matthias Falk

    Very well structured and delivered.

    Very well structured and delivered.

    Read Less

Instructor

  • Gustavo Pezzi

    Senior Lecturer

    Gustavo Pezzi

    Gustavo teaches computer science and mathematics at BPP University, London. He studies how teaching game programming can help enhance awareness and understanding of basic mathematics and physics. He is also a professional software engineer with more than 10 years of experience, with an industry background in 3D systems, games, systems, databases, and data analysis. His academic path includes institutions such as Pittsburg State University, City University of London, and University of Oxford.