Pig Engine

Pig “Engine” is a personal toolset that I’ve created over the span of 6 years making various games and tools. It isn’t a an engine in the sense that it’s fully reusable by a variety of people, but rather is a collection of useful tools that I have accumulated that help me create things.


History

The first version of Pig Engine was created for a tool I called Const Port which I eventually uploaded as a Handmade project (link). A large portion of the tech that runs the in-engine debug console sources directly from Const Port. For example the “String Fifo” data structure that backs Const Port was refined and used as the backbone for handling variable length lines of text that need to laid out and measured and pushed into a fixed size FIFO in an efficient manner while also allowing the application to reason quickly about which lines are currently on-screen and need to be rendered. Now days it also has support for arbitrary “metadata” to be inserted for each line, like what filename and line number the printout comes from, or a timestamp for when the line was printed. Not to mention Const Port was the first swing I took at laying out characters on screen after rasterizing them using Stb TrueType.

Starting in December of 2017 I migrated a majority of the code for Const Port to start on a new game project called Princess Dungeon Smasher, which eventually became Princess Castle Quest. Over the three and a half years of development on PCQ, we participated in 2 game jams (ORSLA and Loco Stoko) using a similar method where we would clone the current PCQ codebase and strip it down to a base. I also tried to factor out pieces of the code base from time to time in various ways in order to make this process easier, but I kept running into problems where development on one game would by necessity make another game that depends on the same files go out of date pretty quickly. Thus the idea of making an “Engine” out of this code kept getting pushed to the back-burner while we ramped up to the release of PCQ.

After the release of PCQ in 2021, I took some time to start reorganizing the the code into a more standard format that would be easy to transfer between projects, and possibly even keep multiple projects in flight with changes getting integrated into each game on an as needed bases. I ended up “re-writing” every single file from the ground up to ensure a minimum level of consistency in style, since some files had been created almost 5 years ago. This refresh of the code-base is where “Pig Engine” gets it’s name and properly becomes a re-usable piece of software. After working refining the codebase for a year, we participated in another game jam in 2022 and the results could not have been better. The entire team had a blast creating Roll-O-Seum and we were able to create way more functionality than we thought possible in a game jam.

With a successful game to prove the utility of the engine, we’ve now started work on another project, which currently doesn’t have a name. Codename “Pig Parts” is a voxel factory game set on asteroids. Given that this is the first time the engine has gone 3D a lot of the functionality is rapidly expanding and advancing. Even as that happens, it’s been easy to do some post-jam work on Roll-O-Seum to properly finish it off as a polished experience.

If you’d like to follow along with our development of Pig Parts or Pig Engine as a whole, you can join the Discord server for Pig Parts.


Info Card

 
 

 

Games

Princess Castle Quest

Released on Steam March 24th 2021

Steam Store Page: https://store.steampowered.com/app/1103550

Trailer: https://www.youtube.com/watch?v=T5lt-aCkOwk

 
 

Pig Parts

A WIP voxel game being made in Pig Engine

Discord: https://discord.gg/Crbvz9eBZT

 
 

Roll-O-Seum

Made in 48 hours for GMTK Game Jam 2022

Itch Page: https://princesscastlequest.itch.io/rolloseum

 
 

Loco Stoko

Made in 48 hours for GMTK Game Jam 2020

Itch Page: https://princesscastlequest.itch.io/loco-stoko

 
 

ORSLA

Made in 48 hours for GMTK Game jam 2019

Itch Page: https://stampede247.itch.io/orsla

 

Feature Blocks


Contact

Pig Engine is not publicly available for commercial or private use. I’d like to make Pig Engine publicly available in some form eventually but I have not done the work to give it a license and document it to the extent that someone can use it externally. If you are interested in helping with it’s development or documentation, please reach out to me at PrincessCastleQuest@gmail.com

If you are interested in following along with the development of codename “Pig Parts” (a voxel game in Pig Engine) you can join the Discord server at https://discord.gg/Crbvz9eBZT