BraneEngine Weekly Update #2

Much less work happened on BraneEngine than in the last few weeks. The end of the semester is approaching fast so I’ve been working on planning that out and finalizing an internship. But I still did get some work done.

The first half of the week was spent trying to fix a single bug. Whenever I closed the client the ASIO io context would throw a memory error. I was eventually able to figure out that it had something to do with a connection not being properly closed or something similar but was unable to trace it back to anything. So I had to spend a few days going over literally every bit of code that touched a socket to see what the problem was, wasn’t able to find anything, so started making random guesses and found out it had to do with where I was passing in a raw pointer into a lambda and then converting it into a unique pointer. Swapped it to using shared pointers and somehow that fixed it, even though I’m 90% sure there wasn’t a memory leak before.

The second thing I did was change up the way that assets are being stored. Before they were stored by just dumping all the raw binary data into a file, and then reading it back in the same order. But I realized that this isn’t great if people will be upgrading to a newer version of the engine that may add or remove things from assets. Before all that data would just become unreadable making you lose everything. The way I chose to fix this is by doing something similar to GLTF. Every asset file now stores a JSON header that tells it the location of every stored attribute, that way if attributes are removed or added the data is still easily recoverable. It’s mostly done, but I need to figure out a better way to store lists of objects than just making a bunch of root attributes…

Yeah, this isn’t great. Better than before, but not great. Wait… while writing this I think I figured out a solution…

That’s all for this week, not much I know, and I probably won’t get much done next week since I’ll be flying home between semesters. But when I get back… we gonna get a lot done. I am very excited for next semester, a lot of things behind the scenes of my life that are going to be better. Also, I’m going to be working on keeping consistent schedules for stuff, so eventually scheduled streams are going to become a thing.

Liked it? Take a second to support WireWhiz on Patreon!
Become a patron at Patreon!