
Embrace a hands-on learning approach by debugging and solving mistakes as you explore Lua and Love2D, following a proactive course philosophy with practical homework tasks.
Install Visual Studio Code and love 2D, create a test folder with Main.lua, install the love 2D extension, and configure the path to the love executable to run your game.
Begin your first Love2D project by creating a hangman game in main.lua, learning folder naming, file extensions, saving workflows, and using the console for debugging.
Explore the core Love2D functions - love.load, love.update, and love.draw - and learn how to use comments, variables, numbers, strings, and printf to display both console output and on-screen text.
Explore functions in Lua by defining reusable operations with arguments, returning results, and using string concatenation to print clear outputs.
Create and populate Lua tables with curly braces and comma-separated values, access elements with one-based indexing via square brackets, and use Math.random to pick a random word.
Explore Lua tables within tables to represent words to guess, then loop through the nested structure with ipairs and pairs, handling key presses to reveal letters in a word.
Learn how if statements control flow in Lua, using else if and else chains to execute the first true condition and skip later checks, with numeric examples.
Map out game logic in comments, translate it into code for love2d, and build a five-letter word guessing game. Draw spaces, track guessed letters, manage lives, and restart on click.
Draw lines in love2d by specifying coordinates with love.graphics.draw, experiment with x and y values, and organize letter positions in a nested table to print letters above the line.
Learn to print letters on the screen in a Love2D Lua project by looping through the current word, computing x and y positions from a positions table, and centering text.
Draw lines from a data table in Lua and Love2D by iterating with for i, v in pairs positions, extracting x1 y1 x2 y2, and centering letters above each line.
Practice using a table to track guessed letters, update it on correct guesses, and print revealed letters, while keeping indentation for readability.
Track guessed letters in a Lua and Love2D game by using a boolean table to reveal letters at indices, and reset by selecting a new word while hiding all letters.
Implement a word-guessing game in Lua with Love2D by selecting a random word, resetting letter visibility, and detecting when the word is fully revealed to start a new game.
Create a function to check win conditions that returns true only when all checks pass, using an early return to stop at the first false value.
Master updating the background color in Love2D using a four-argument set background color function with red, green, blue, and alpha, and convert 0-255 colors by dividing by 255.
Learn to drive win and idle colors with a colors table in Love2D, then implement wrong-letter feedback by boolean tracking and flashing the screen red.
Capture delta time in love.update and drive a short red flash timer when a wrong key is pressed. Decrease the timer with dt to reset color after the interval.
Explore implementing a lives mechanic in a Lua Love2D game: initialize ten lives, decrease on incorrect letters, render the count with Love2D's draw, and reset on a new word.
Implement lose conditions in a Lua and Love2D game using a global game lost flag, color feedback, and lives; apply or logic and early returns for win or lose states.
Track guessed letters with a wrong letters guessed table, inserting new wrong letters and checking if they’re already guessed before deducting lives, then reset the table for a new word.
Seed the random generator with the operating system time to achieve practical randomness in Lua and Love2D projects, and understand math.random behavior and seeding.
Explore the and/or keywords in lua, track last key pressed and last mouse pressed, handle nil values, and manage a timeout with dt, while emphasizing readable indentation for clarity.
Explore Lua tables by comparing ipairs and pairs, understand numeric indices and gaps, and learn how the hash operator reveals element counts and guides iteration.
Learn how a Love2D program executes from top to bottom, how the update and draw loops run, and why function declarations must precede calls to avoid nil errors.
Discover how the local keyword confines a variable to its scope, making it local rather than global, and how this improves memory use and readability.
Discover how to organize a Love2D project by using external files in Lua, including a words table and a colors table, via require to load data.
learn to build a dice application in Love2D using custom fonts, implement a one-second roll delay with Love.update, display results on screen, and add a cheater mode for double sixes.
Learn to build a dice roller in Lua with Love2D: roll two dice, display their values and total, and toggle cheetah mode with F1, while seeding randomness with os.time.
Learn to build a flag guessing game in Love2D, loading flag images, presenting four button options, and validating clicks with visual red/green feedback and new rounds.
Load an external flags file into a flags table with image and name fields, then center and render the flags and set up four bottom buttons using screen width.
Set up a buttons system in Lua and Love2D, define idle and hover states and hover color, detect mouse hover with bounds, and render hover text with a chosen font.
Learn to implement hover and click feedback for Love2D buttons using a button states system, update/draw loops, and a colors table, with a predeclared local color. We cover state debugging.
Select a random flag from a data table, display its name and image, generate three distractor options from other flags, randomize option positions, and reset state after each guess.
Evaluate whether an answer is correct by updating a table, resetting flags on new selections, and marking buttons as clicked correct or wrong, with green feedback in the update loop.
Add a one-second delay after a correct answer by using a timer, a constant wait time, and frame-based updates. Next, map letters to a single option for the next task.
Learn how to handle special cases in Lua by defining an anomaly letters table, checking the first letter of country names against it, and using a boolean flag.
Explore how Lua tables use dot notation and square brackets to access keys, differentiate string and number keys, and review common mistakes like spaces in keys and incorrect access.
Compare strings by case using string.lower and string.upper to see how capitalization affects equality, and distinguish an empty string from a string with a space in Lua and Love2D.
Explore using a states table in Lua and Love2D to manage game states such as play and pause. Replace string comparisons with numeric values for readability and performance.
Map out the typing game project by detailing conf file and main.lua setup, with letters spawning from right to left toward a finish line and timer-driven speed and key-press mechanics.
Spawn alphabet letters off screen to the right, move them leftward with a speed setting, and draw them with a font; new letters appear every 1.5 seconds.
Learn to implement a spawntimer that spawns random letters off-screen, at random y, into current letters, seed randomness, and remove them when the correct key is pressed.
Convert keypresses to uppercase to match current letters, remove the correct letter by index, and trigger a finish line event that flashes red and removes the letter via a function.
Check each frame for when a letter crosses the finish line and remove it from the letters table. Flash the screen with a timer-based color effect and increase speed.
Learn to progressively raise game difficulty by adjusting movement speed, max speed, and spawn timing in a Lua Love2D project, while implementing on-screen score and dynamic font rendering.
update the score in a Love2D typing game by handling correct and wrong letters, tracking a correct letter found boolean, and adding visual feedback like color flashes.
Demonstrate flashing a correct letter in green in Love2D, using a cached letter and timer, with numbers and F keys introduced after set letter counts.
Advance the game’s difficulty in a Lua and Love2D project by adding numbers and f-keys at score thresholds of 20 and 40, using guards to prevent duplicate additions.
Learn how the modulo operator works, using examples like 200 modulo 7 yields 4 and 6 modulo 6 yields 0, with practice problems and a quiz to test understanding.
Learn how while loops repeat actions while a condition is true, shown by counting down from 100. Explore recursive functions that call themselves, creating inbuilt looping and exponential behavior.
Set up a minesweeper project in Lua and Love2D by building a grid, placing bombs, calculating adjacent counts, revealing zeros, and implementing flag and new board gameplay.
Set up game states and a menu flow in Love2D with Lua, load fonts, and implement easy, medium, and hard menu buttons to control difficulty.
Learn to implement a Love2D menu by defining button states (idle, hover) and hover color. Use bounding boxes to detect clicks in play or menu mode and switch to play.
Configure bomb spawn probability by difficulty—easy 1 in 12, medium 1 in 8, hard 1 in 4—then iterate over grid squares to place bombs and show bombs remaining.
Learn to evaluate adjacent squares on a grid by counting neighboring bombs, including diagonals and bounds checks, and store the result as a numeric value for each square.
Learn to find adjacent squares in a Lua and Love2D grid by implementing left, right, above, below, and diagonal checks with edge handling and modulo bounds.
Implement left and right click actions to reveal squares, handle bomb reveals, and manage game states including wait for new game and resetting the board for a new round.
Fix the bomb reset bug by clearing the value on a new board so bombs reset correctly, and implement zero value auto-reveal using existing functions.
In this lecture, you implement a recursive reveal that uncovers neighboring zeros and a square around a clicked zero, using directional checks and square index recursion to avoid stack overflow.
Debug a Lua Love2D minesweeper clone by tracing an infinite recursive loop caused by zeros and nil values, and fix case sensitivity and revealed-state guards.
Learn to implement flag behavior in Lua and Love2D minesweeper-style board, using a map from cell value to colors, managing flag states, bomb counters, and mouse controls.
Explore building and debugging a colors map table for a minesweeper style game, mapping values to colors, handling revealed and flagged states, and using love.graphics.setColor to render colors.
Learn to implement win conditions in a Lua Love2D game by checking bombs remaining, validating flags against stars, and transitioning to victory and menu states.
learn to customize Lua and Love2D games by adding sound, expanding hangman and Minesweeper grids, and using the config file to scale with screen size, then build small projects.
This course is designed for absolute beginners in programming who wish to make their start in the field!
As a university lecturer of many years I've interacted with students enough to get a feel for what works in terms of teaching and practicing. The concept of this course is to take more of a 'classroom' approach to teaching and hopefully encourage you to practice and learn with me as we make our way through the course material together.
The course is centred around the Lua programming language and the Love2D framework. Lua is a great beginner language to get started with as it is a lot simpler and more straight-forward than other languages.
The course structure is basically that we jump straight into making stuff and explain concepts as we come across them. After we make our first game together, we go back and clarify some concepts. I have taken this approach because a criticism I have of most programming tutorials that I've come across is that they overwhelm you with out-of-context theory at the start before actually doing anything fun. With my model, we immediately make something tangible and then go back and talk about the theory, but since we've already used it in a meaningful way, the theory and concepts will make a lot more sense and will be enjoyable to learn about!