September 2021
Posted 3 years ago
attribute 'contenteditable' not allowedattribute 'blocktype' not allowedattribute 'data-image-style' not allowed
I rewrote the way network variables are written to be more agile. Entities can have classes that have lists of classes that have classes that have lists of classes now. It can recurse pretty much forever.

This was a big flaw in the previous implementation, where you could have a network class but its children all had to be simple data types, and you also couldn't have lists of those classes.

This system should support more raw data too. This is something Layla ran into when making the voxel gamemode, that we had no decent way to network all the blocks. That should be a little bit more possible now.

It should be faster too. I was previously using a Vector of bytes to store the data. Which in engine meant that each byte was serialized individually - something that became apparent when you had 32kb of data on it. I found that the Source2 networking system can send straight up data via CUtlBinaryBlock - which has made things a lot simpler and faster.

I ended up rewriting this code about 5 times over as many days. I would lie in bed thinking about how the code I spent all day writing was a pile of dog shit, and then completely rewrite it the next day until it started to make sense to me.