It’s been a while since I’ve talked about what I’ve been working on. Mostly the reason was that I felt it would get a bit repetitive. Development has definitely been plowing along (something like 2500 more lines of code have been added to the project since the last update) but the actual “things” I’ve been working on are from the same list.
- I’m still trying to “get something on the screen.”
- I’m still trying to “make a texture atlas.”
- I’m still “messing with serialization.”
Mostly it’s been a lot of serialization lately. There are really two types of serialized objects in QubeKwest. The first is the type that is a fixed size. These are things like Blocks that always take the same amount of data. That makes them easy to deal with on pretty much every level when serializing them. They simply have the data they have and it’s always in the same place.
The other type is variable sized. Most of the structures in the game are actually this type. For example, even though a Cluster always holds the same number of Chunks and should therefore theoretically be a fixed size, the Chunks themselves can actually be one of three types, each with their own fixed size. That means that a Cluster can actually be anywhere from just over 2 KB all the way up to about 33.5 MB. That’s obviously pretty variable.
The reason for my dive back into serialization was actually the difficulties involved with serialization and deserialization of variable sized objects that contain a variable number of variable sized objects. (Which is unfortunately exactly what a TextureAtlas is.) That led me to create a deserialization factory system. Which in turn led me to making a bunch of tests for the deserialization factory, because you just have to know it’s going to work correctly. Which in turn led me to the realization that I had a bunch of objects that had the methods needed to be serializable, but that didn’t do anything.
If you’ve read my previous posts, this probably sounds like rehashing things about texture atlases, checklists of things that need finishing, or solving problems that led to other problems. Naturally, I’ve been buried in the coding of all the missing serialization functions instead of progressing toward fun goals. I figure I’ll have enough code in this project for it to either become self aware or get something on the screen, what I’m not sure of is which one will happen first.