#miniEngine

So the #MiniEngine project is abandoned, as so many other projects!
I lost interest as soon as I had iterated over it a few times, and saw how I wanted it to be and how I needed to do it. It's a weird thing, but I see it being a pattern for me. I loose interest as soon as I "solved" the challenge.
I really need to practice finishing things. But I guess I suffer from lack a of time, and "Uhh! Look, #NewAndShiny!

I've also just surrendered to #godot.
Can't wait for WebBuild for C# to work again.🤞

Maybe you know the feeling already, but here goes.
With so many projects, I have a tendency to loose interest as soon as I've "solved" the problem. It's the main reason I finished only a few of my 50+ game projects. I get the mechanics done, and see the rest as details that I don't care enough about to get done. Such as making level, adding music, sfx, menus.
This now also happened with my #MiniEngine. I got it running, saw the issues, rewrote it.

No real visual has changed, but much has changed under the hood.

Everything is now renderable GameObjects, they are all sorted according to z position, then group together according to shader and texture. So each group will be one draw call. 😃

The only issue I can see right now is that all shaders have to have the same input for me to keep things simple, and I did set out to make a VERY simple #miniEngine, so I might just accept that limit, until I need it... 🤔

#gamedev #OpenTK

I've managed to add mouse clicking on game objects. It's not the right way of doing it 🙊 , but it works.... As a proof of concept.

I'll soon have to start structuring everything and generalizing buffers, might even have to optimize a few things. But the parts are almost there 😀

Not sure how to keep the collision check-area size down, when the objects are big? Like a floor collider that might be 100s of pixels wide, the center can be a long way away. hmmm. 🤔

#miniEngine #Gamedev #OpenTK

So, there might be a tiny bit of value in doing some data structuring before checking for collisions 😄

I improved performance from 7 FPS with 3,000 balls all colliding with each other, which comes to 9 million collision checks, down to around 22,000 collision checks, with an FPS of ~65 FPS using the newly implemented Quadtree! 👀 And that's without any optimizing of the code.

I feel like I'm creating and destroying a lot of objects when building the Quadtree. 🤔

#gamedev #openTK #miniEngine

Low resolution image of 3000 small balls, green if they are colliding with another ball, and gray if not colliding.

Today might be the day where I implement a quadTree for the first time. I have never needed it before but I do think I need it now, as the frame rate went way down when I added very basic collision detection to my mini-game-engine.

But I'll have to wait an see if I actually get to have the time to do it today. 🤞

#gamedev #miniEngine #quadtree

Got depth working using sorting on Z position, just have to do it for each buffer. But that makes sense. Just have to do it. Maybe one for background, one for main game, and one for UI. I'll figure it out. 🤔

I also got naive collision to work, circle vs circle vs rectangles. But it's SO slow as I check all vs all. So there's a lot of room for improvement.

There are still so much to learn 😄

#openTK #gamedev #miniEngine

Sigh.. So I thought that GL.Enable(EnableCap.DepthTest);
would fix the last part of my optimization struct and rendering. That the depthbuffer would solve all the ordering. But NOOoo.. oo.. 😢 I DO have to sort the gameobjects so they rendere back to front.
So I can't used my array of sprite struct as I use pointers directly into it.

A lot of words.. In short I can't use current optimized structure and will need to copy all data to the array each frame. 😞

#OpenTK #GameDev #miniEngine

Image of the Depthbuffer failing to take alpha channel into account. :(

Fighting the Garbage Collector in C#!
I'm using a lot of unsafe code to optimize, but I need the arrays of data to stay at the correct addresses in memory as gameObjects references and updates position, scale, UV and so on directly into it.
So I'm learning something new about the GC. It adds more complexity, but I guess it's needed to do this.

Currently @63 FPS with 100.000+ sprites, all moving of cause.
So I guess I must be doing something right 😃

#OpenTK #Csharp #gamedev #miniEngine

image of 100000+ small round sprites in different colors randomly distributed on screen.

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst