So firstly I want to announce that now this mod has a Discord server so you can get the latest news about the mod and chat about Half-Life and life in general! Click this Discord icon to get the invite!
So, what has been going on in the last 20 days? Well, it was mostly figuring out how to get pass the GoldSrc entity limit. I have been using individual entities for blocks, which was the simplest thing to implement at that time, however, it presented me with a maximum 8192 block limit. If you are confused, picture this: a single chunk in Minecraft has 256*16*16=65536, and even if we were to fill that up to the quarter, it would be 16386 blocks! This is going to be a problem, so I started implementing an independent subsystem for chunks and blocks. I also needed to implement custom drawing routines on the clientside.
Everything went fine until I encountered a bug at the last moment which prevented the cube to be properly rendered. It took me a couple of hours to realize that OpenGL asked for a horizontal FOV, and GoldSrc worked with a vertical FOV. I was pissed by the sheer amount of not documenting code properly in GoldSrc already, but this was the worst case. This took me a week to finish due to high school also being a thing.
Problems rose up again as I was implementing the networking for the blocks. The base for this networking system is the message system that GoldSrc generously provides with, but it's less generous with the buffer size limits.
See, I was sending a message every time when I spawn a block. This instantly filled up the message buffer when I filled up a single 16*16*16=4096 space. My solution? Create a queue which GoldSrc point entity would empty by a certain amount every time the game looped. This again took a week to finish, but it was worth it and you can see the result in this screenshot.
I was planning to write a new article a few days ago when I realized: Should I implement physics? I said yes, and yet again implemented another system for the physics system that GoldSrc uses. GoldSrc uses C for the physics, while the rest of the code is C++, so this lead to me removing the entire system altogether and physics still doesn't work. Since I was planning ahead in my block system before, I could easily add in new blocks, so I added in 15 blocks into the game and made the world look like dust in the summer sunlight.
As a last thing to add, I will link a Youtube video that shows the current performance of the networking and the drawing system
See you later guys :))))