Creating a 9-Slice Panel from Scratch

The following video tutorial shows you how to create a 9-Slice panel from scratch. I’ll be using Lua and Love2D, but the same technique could be applied to just about any language or framework.

For those of you who don’t like using existing libraries or just simply want to know how it’s done, this should be useful. It’s also good to know how these things are made because it’s the basis of creating a lot of other UI elements. Sometimes a hand-made solution works better than something in a library or framework.

[Read More]

Setup Guide For Love2D And Visual Studio Code (Windows)

A lot of people have asked me how I set up Visual Studio Code to work with Love2D. The video below will show you how I set it up, but it’s not necessarily the only way to do it. With this setup you get Lua syntax highlighting, code auto-complete and the ability to use Love from the console without having to enter the full program path.

It also shows how to download and install Love.

[Read More]

Using The Push Library With Love2D

There’s a good chance that you’ll make a game and won’t even know what screen size your player will have. This can make it difficult to design things like user interfaces, sprite sizes, etc. There are many ways to deal with this problem, but I think the simplest thing is to draw to a render texture at a fixed size and have that scale automatically to fit any screen.

I think the Push library is great for handling that, and it’s excellent for making games with pixel art as well. The video below is quick guide to setting it up.

[Read More]

Game Objects and Inheritance in Lua

Some people think that inheritance is impossible in Lua. It’s not a built-in feature of the language like in C++ or Java, but there’s still a way to fake it with meta-tables. This video shows one way to do it and how it can allow you to create a variety of game objects without having to rewrite a lot of code.

This video was originally published on October 30, 2024.

[Read More]

Love2D Physics Car

In this series of videos, I show you how to make a simple arcade-style car using Love2D and its built-in physics system (Box2D).

These tutorials were originally made back in 2024.

Part 1

Part 2