Beginning Programming with Lua (Working Title)

By Richard Anton and published by RasterCat.


Why learn to program?

Why learn Lua?

What to expect

What you need to get started

Computer Concepts

Basic Concepts

Data types

Programming Languages

Folders and Files

Graphical User Interfaces (Windows, OSX, and X Windows)

Terminals and Command Line Interfaces

Setting Up

Optional: Getting Linux (Fedora live on USB or CD)

Installing software

Using The terminal

Getting busybox for Windows

OS X Terminal

Bash on Linux

Introduction to Bash Shell Commands

Programming Editors

TextWranger for Mac

Scintilla for Linux or Windows

Other Editors

Intro to Lua

About Lua

Lua First Lesson

Data types

Project: Multiplication tables


Flow Control

Example: FizzBuzz

Project: Guess your age or weight

Data structures

Debugging Lua

Debugging Concepts

Lua Debuggers

Lua Tables

Searching and sorting

Lists and Queues

Project: Xmas wish list

Maps and Trees

PLACEHOLDER: Example project using maps or trees.

File I/O


Graphics Concepts

Introducing LuaSprite

Example: Mondrain

Example: Bouncing Balls

Project: FatBits (make your own sprite drawing program, learn about mouse input)

Game Programming

SDL Setup

What is SDL?

SDL Hello World

Cannon Fodder



Input Events

Lemon Attack (pun on Demon Attack, lemons falling from the sky out the hero)

Concept: Prevent dangerous lemons infected by alien parasites from reaching the Earth

Alien and Player Sprites

Playing Sound

Player Controls

Alien AI

Keeping Score

The Adventure Continues (i.e. expanding and making your own levels)


Concurrency in Lua

PLACEHOLDER: concurrency example, graphical trafifc light at intersection?


Where to go from here

Send us Feedback



Shell commands cheat sheet

LuaSprite reference

Additional Resources

Example and solution source code

Image and Sound Assets

Other Programming Resources