lainchan / λ

Beginner's general-purpose game engine in C & raylib

Spooky · 2026-01-29 21:35
I created a minimalist game engine in C using raylib, small enough that a single person could understand the whole codebase top to bottom, with the purpose of it being that it could be used to make small or retro style games, be easily hackable and modifiable, and serve as an educational tool for people who intend to create their own game engine. It currently weighs in at uner 3700 lines of C, and while it's far from finished yet, it's the largest program I've written to date and I've found it's not been difficult to keep extending it, so it's kept me motivated to keep going. There's an included FPS example, which exists as a demonstration of how to use the engine if anyone wants to try it out. I'd like to know what y'all think. https://github.com/8bitprodigy/kolibri_engine
JARGON · 2026-01-31 05:18
so you built a framework on top of a framework? what if somebody makes another framework with your framework?
queue · 2026-01-31 14:44
>>43909 your comment gave me a nosebleed from how utterly retarded you are. heards of mountain goats fell to their deaths from the rippling effects of this comments' mere existence.
Unidentified · 2026-01-31 18:46
>>43909 Yeah, that was always an option. It says as much in the readme. Did you even read the copypasta? > I'd just like to interject for a moment. What you're refering to as Kolibri is in fact, raylib/Kolibri, or as I've recently taken to calling it, raylib plus Kolibri Engine. Kolibri is not an engine unto itself, but rather another free component of a fully functioning game engine made useful by the raylib corelibs and raylib extra libraries comprising a full game engine. >>43912 Based.
Netrunner · 2026-02-05 09:28
on fedora with gcc 15, errors out on "private" engine functions usage in entity.c: src/entity.c:317:9: error: implicit declaration of function ‘Engine__removeEntity’; did you mean ‘Engine__removeScene’? [-Wimplicit-function-declaration] 317 | Engine__removeEntity(self->engine, self); Don't want to pollute your issues so posting here
The Oracle · 2026-02-05 13:10
Fixing this issue by defining the function in entity.c triggers another issue: include/dynamicarray.h:13:63: error: passing argument 1 of ‘DynamicArray_append’ from incompatible pointer type [-Wincompatible-pointer-types] 13 | #define DynamicArray_add(array, datum) DynamicArray_append(&(array), &(datum), 1) | ^~~~~~~~ | | | Entity *** src/entity.c:178:9: note: in expansion of macro ‘DynamicArray_add’ 178 | DynamicArray_add(scene->entity_list, self); | ^~~~~~~~~~~~~~~~ include/dynamicarray.h:24:41: note: expected ‘void **’ but argument is of type ‘Entity ***’ 24 | void DynamicArray_append( void **array, void *data, size_t length);
Dozer · 2026-02-06 04:29
>>43928 > gcc 15 Well, that's probably your problem, as I'm still stuck on 13, here, and each successive iteration is more and more anal retentive as to what it considers valid C. And yeah, my DynamicArray macros seem a bit fiddly, I'll have to take a look at them when I get the chance. Thanks for letting me know!
H.R. Giger · 2026-02-17 10:23
Update: Working on a BSP Scene implementation example so you can make maps in Trenchbroom. Currently it just compiles the BSP and I'm working on support for other brush types, then I'll support PVS, then textures, then lightmaps. After that, I'll have it caching the processed maps to their own sort of filesystem, similar to idTech4's dmap.
DOOMlover · 2026-03-15 21:38
Nice to see Lainchan back! The site was down for quite some time. I will use this thread so as not to saturate the board by creating another one. How can I create a game like the original DOOM from 1993? I've been searching on the web and everyone says that creating a WAD is the way to go, but what I want is to create a game that, at least, is a complete modification of the original game and not just a single level that uses the game's pre-programmed assets. I'm aware that, at least for a novice like me in terms of graphics programming, it's very ambitious to develop an engine from scratch, so I wanted to try making a total conversion of the game engine (like Grezzo 2, Batman Doom or Chex Quest). But to be honest I'm completely lost. I took a quick look at this book: https://math-books.github.io/application/(Math%20Book)%20Mathematics%20for%203D%20Game%20Programming%20and%20Computer%20Graphics%2C%203rd%20Edition%20(2011).pdf Also, I've been educating myself about Binary Space Partitioning. I don't know if grabbing the source code published on Github will be a complicated task for someone who hasn't worked on this kind of thing. Do you know any other teaching material or have a piece of advice for a newbie, pretty please? The "tutorials" on YouTube are, and I'm being very kind, bad as hell. Typical video be like: "OK, I'm going to show you how DOOM works!" *proceeds to write a bunch of code without explaining anything at all* "Done! Please like, comment and subscribe!" In advance, thank you very much!
Masami Eiri · 2026-03-20 12:49
>>43994 Learn Ultimate Doom Builder and SLADE first. Then learn scripting at Zdoom wiki. Then learn how to make graphics for Doom. >complete modification of the original game The WAD just need to replaces the files in original Doom. Take a look at doom.wad and freedoom's wad in SLADE.