ESP Microcontroller engine + games banner

ESP Microcontroller engine + games

6 devlogs
34h 29m 3s

Just a project I have been working on among some other guys from a programming Discord group I'm a part of.
We are developing a nice game on a microcontroller (currently an esp32), also wire them up to buttons, a display, etc. and finally put all…

Just a project I have been working on among some other guys from a programming Discord group I’m a part of.
We are developing a nice game on a microcontroller (currently an esp32), also wire them up to buttons, a display, etc. and finally put all that in a final, finished, 3D printed case and basically have built our own small little hand-console type thing with whatever features we want ^^.
The others mainly focus on the game, while I focus on a bigger concept of a performant kind of everything-engine that (in concept) is just so clean, as I FINALLY got the time & this is also my main private project the whole time. I already have a pretty reasonably sized engine, but it’s for an OpenGL based library and not for microcontrollers, though I want to expand.
Ah and yea obviously all of this is in C++ <3.
Pretty bad introduction to all this but this is just my passion(!!) project and there is so much more to say I can’t fit in here so text me if you ever wanna know more yk :).

This project uses AI

The others use claude for the game a little, but I ain’t using anything whenever I develop my stuff, so the engine is also completely ai-free! :D

Repository

Loading README...

unicode101010

FINISHED! (for now)
Still have to do a lot of experimenting and actually getting to use it in practice, but the first version of the new abstracted (hopefully equally as performant & zero-cost abstracted) color system is done ^^ :DDD. Had to solve a lot of issues here and there still because of the entire type system of C++ but I thiiiink it’s all pretty fitting now and comes together real nice when it works.
Because the idea ain’t bad, but what I have to deal with and manage so much at such a low level (literally interacting and relying on specific bit-orders) that I was sometimes feeling like I’m fighting the type system and the assembly instructions themselves. I had to learn to accept many quirks and find different ways that go with the rather than trying to force my first intuitive ideas onto the language.

Anyways, way too much to get into here but I can definitely say that even though I thought I knew my favourite language pretty damn well, also down to (some of the) the lowest level stuff, I learned a lot implementing this. Mostly about memory management and stuff like member aligning & padding bytes for structs/classes, automatic promotions/conversions with arithmetic operations, the pragma pack directive, the no_unique_address member var modifier, and some more stuff still.

Excited to now finally use this for our display and rendering stuff. We’ll see how it goes ^^.
Have a chill day you guys! :]

Attachment
0
unicode101010

Ohh came close today (or rather cumulative over the past few days) in terms of time per devlog :o.
Anyways, first fully working state of the abstracted color struct one can use to represent colors of any bit size and color channel bit distribution efficiently (at least I hope so).
Pretty nice, though I am really not sure if this ain’t just hella overengineered tbh. I mean it may not even be that generic and everywhere-applicable (with almost any driver & display) because I can’t reeally control the padding and alignment bytes my color struct may get and thus have it not possible to just allocate an array of them that can then just be treated and uploaded as a void* data array… not sure though yet, testing (and refining) will tell :).
I may go for a simpler or driver-specific variant after all.

Still fun to implement and definitely learned things along the way ^^. So let’s see if I can do anything with it and how it goes.

See ya

Attachment
0
unicode101010

Intermediate devlog again cuz I will cross 10 hours before I can finish this feature.
Basically I now code a nice bitset struct to manage some amount of bits cleanly and abstracted to then have it posible to create templated color structs with ANY bit count for each color channel and cleanly (and as performant and zero-cost abstraction like as possible) just interact with the color concept/interface itself and not having to even know about the internal representation :).

More info will follow in the future :D.
Have a good day and see ya!

Attachment
0
unicode101010

Ok Ima write a devlog now because I’m not quite sure if I’ll stay below the 10 hour limit for devlogs when continuing work now, so just a quick intermediate update here :D.

Put a lot of thought into how one would be able to easily and beautifully work with colors and basically a single abstracted type in the entire application but across potentially multiple simultaneously connected displays with each their own color representation. So the problem: Multiple color used color representations, at best a single universal interface and type across the entire engine and all projects using ist, but at the same time without the need for potentially peformance reducing conversions for each and every pixel when using a different color format in user space than the display drivers accept.

Thought about combining them into a universal color struct that redundantly stores every used representation and uses the correct ones accordingly without needing to convert everytime for every pixel in different displays.
Not sure yet though.. I’ll think a lil more bout that. So let’s see ;))).

Attachment
0
unicode101010

Added/extracted our bare bones display interaction into the new engine project to just break it down as far as possible and have something to refactor and actually start writing the engine for.
So now I got the raw, redundant, boilerplaty, verbose, not really structured at all code in the test project and can use this as a starting point for developing and abstracting everything that is needed to make this as clean and architectually as perfect as possible.
Needed this cuz you can’t develop something into the void if you haven’t got any problems to fix :).
I just love this and I’m having so much fun. Let’s see when I’ll be able to continue work here! (Hopefully already tomorrow :D.)

Attachment
0
unicode101010

Yeahh just started fresh with the engine as I now FINALLY have the time to finally work on this! I am so excited as I barely had any spare time I could dedicate to this project and it can now finally start!
I thought so, so much about this already and worked out an entire concept (overview on an Excalidraw board actually) and it is literally perfect in my head, I just had to have the time to frickin finally start this and work on this omggg yess!!
This is for so long now my No. 1 project (connected to my own engine I already develop whenever I’ve got the time) cuz it’s just the most fun thing in the world rn and I’m so passionate about all this.
Anyways, enough of my sleepy rambling about how excited I feel about finally being able to start and build this and connect it to the bigger picture and parts of my already existing engine.. just feels SO good to be back in my element after almost half a year (basically when university started) not really being able to.

Ok ok. So devlog today: Start of the project and ESP-IDF CMake configuration so I don’t have to frickin use their verboose aass component system brruhhh ;).

Attachment
0