Skip to content
Demo of SFML and Lua scripting.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Deus Vult

What is this?

I have a keen interest in making games without using mainstream game enignes, so I have been exploring SDL and SFML recently. This project was my first attempt to implement scripting into a game - I wanted to make an engine which could have its data serialised and manipulated with scripts rather than hard code.

This project uses SFML for the main game using the window and graphics modules. I then use Sol2 for some bindings in lua. The result is that I have is the start of a game where scripts influence a lot of the game. I wanted to implement hotloading so that I could be editing a script and reloading it without recompiling or possibly even within the game itself.

The Core folder is where I placed resources that I felt could be shared between multiple projects, whereas the Game folder was for stuff I felt was pretty specific to the current game. the Data folder is where you'll find the scripts. The most interesting scripts are located in the NPCs folder - I called him 'bruh'. There are two definitions for him, one which uses a spritesheet and one that uses the Spine Animation Runtimes, both which point to a script which is also in the same folder. The script details how the NPC will interact with the player when interacted with, or simply walked up to.

Learning Lua for this project was pretty fun and it was interesting to learn how to bind languages together.

Gif of the game

You can’t perform that action at this time.