How To Draw Graphics In Love2D With Lua: Learn Programming and Game Development with Lua

Опубликовано: 25 Апрель 2026
на канале: Charles Studio Tech
288
8

In this video in my series Learn Programming and Game Development with Lua I introduce callback functions in Love2D, and Game Engines in general, and demonstrate how to use callback function in to draw graphics using the Love2D Game Engine with Lua.

#programming #gamedevelopment #gamedev #lua #love2d

00:00 - Start
00:06 - Introduction
00:49 - Callback Functions
02:08 - Setting up the project in ZeroBrane Studio.
03:57 - Adding the Call Function declarations
06:28 - Changing the background color.
07:30 - Setting the background color with love.graphics.setBackgroundColor.
07:55 - Drawing a line.
09:00 - Coordinates
09:59 - Drawing an ellipse.
11:19 - Creating a simple character from the ellipse.
12:49 - Using a table to represent the character.
14:56 - Replacing the ellipse numerical parameters with the Table fields.
16:06 - Why you should follow the Naming Convention of the Framework.
16:33 - Refactoring the code to make it easier to maintain.
17:13 - Refactoring love.load by moving the code that generates the character into a new function, generateCharacter().
18:15 - Optional Exercise in using tabless in Lua.

Link to the code on GitHub:
https://github.com/CharlesKirkSD/Lear...