It has been a very productive week
BitEngine Update:
Hello! and welcome back to this...thing; I’m glad that u could make it! I have been hard at work so there is a lot to talk about so let’s jump right into the update;
So to start with; It is important to comment your code, even when u know it might only be you who is going to read it, comment it; Because when I sat down to read my code and get back into it, let’s just say that I was sitting there for a few hours; But in the end I had a basic understanding on what I was doing and what my code is actually doing;
So moving on from getting back into the code; I had a big problem to solve first; It was not rendering anything even tho the code I had was suppose to render the information I gave it; And i’m not going to say “O it was an easy problem and I will just quickly fixed it”; O no I will be completely honest and say I spent at least an hour; But in the end I found that I sent the memory instead of pointers to the memory and after I changed that it was up and running;
And as you can probably see I also spent some time adding texture support, rotation support to quads and a very simple particle system (I ended up removing it but it was a good way to test the batch renderer);
Next on my list of things I ended up doing, I added support for SpriteSheets; It did not take as long as I expected and with some magical wizardry I had support for SpriteSheets;
Now i’m no artist; I started to program at an early age and thru out my school years, I was trained in programming so to compensate for my lack of artist skills, I got a nice small spritesheet from kenney.nl; It is a great site for assets with no strings attached, or so they say on there website;
So at this stage of the development I was quite…I don’t know how to say it but I wanted to start with an editor because my current way of getting sprites and other stuff is to just hard code it into a “SandBox“ project I had; But there is a problem with that, currently the renderer is drawing directly to the window and that is fine for like a finished product that u want to distribute but it is not that good if I what to make and editor; So next on my list is getting a Framebuffer working;
And OpenGL doesn’t make it difficult, but for some reason it does it a bit different from what some other API’s do, and if I what support for other API’s in the future ill have to think a bit clever not to make it a hassle for future me;
And so I went digging into the documentation of glad and glfw; And now I am happy to present a working Framebuffer, and if I what to talk about some problems with this;
When I first got it working, I had a problem that I would describe as everything was flipped on the horizontal line; This is an affect of my engine rendering {0, 0} at the bottom left of the screen; But Framebuffers {0, 0} is at the top left of the “image“; This is not a difficult problem to fix, I just have to display the image I put the frame on upsidedown;
And I had a few problems with my old code, so I had to spend some time cleaning up my past self mistakes;
The third bug I had was not so much a bug but an effect that I dide’t like; I Could not send any input to the game if the viewport with the framebuffer was undocked and away from the main window and when it was docked and not in focus I could still move around and zoom; A small problem with an easy fix but when I when started to dig in the input code I saw that I had written it really poorly so I went ahead and cleaned it up and made some modifications to it;
But both these problems sort of loop back to one problem I have at the moment; As I said in the beginning of this post, commenting code is more useful then u could think; A lot of my time this week has been on searching for stuff in my code and trying to figure out what it does; And that is time that I don’t have, but because I didn’t comment my code then I have a difficult time relearn my self to always comment my code; so next week I might need to spend some time going thru my code and commenting it;
But back to the main story now; Now that I have an “editor” sort of, I what to implement some sort of ECS (Entity component system); Now I could spend some a week or two to make one; But I think that is a future project; So I went with entt; It is nice and has a lot of features I can work with to make it easier for future me making games; And after some testing and implementing I have some sort of entity class but the ECS is far from done;
And yeah, this is the end of this week; There will be no life update this week because it has been quite a slow week and nothing exciting happened;
And so I am happy that u read thru this and I hope that u will come back next time and have a nice week;
“Comment your code. Or u will suffer in the future!”
-Official404