TaleSpire Dev Log 469
Phew. The last few days have been tough.
In my last dev log, I discussed a bug occurring when tiles or props have scripts added or removed. Back then, I thought it would take me a couple of days. Four days later, I finally think the worst is done.
On paper, the fix isn’t too painful. Check all of the assets on load to see if:
- The save has data for a state-machine script, but the asset doesn’t. OR
- The asset has a state-machine script, but the save has no data for that script. OR
- The script itself was changed for that asset.
To support the last one, we now hash the scripts and store the hashes both in the assets and also in the board data so we can compare them on load.
We also have two places the board can be pulled from:
- The unmodified parts are pulled from the server
- The modified parts are pulled from another person on the board.
The data in both these cases are serialized and processed very differently, so we have to handle that.
State changes also come from player actions. When you right click on an interactable object and click on an action in the radial menu, as message is sent from the object’s script to the other connected clients. That message only makes sense if the script on the other clients is the same, so we must also handle that.
And so it goes on and on.
The good news is that I can see the light at the end of the tunnel. I am now down to the following:
- Move the load-time processing of the scripts to the job system to make it faster
- Update TaleWeaver to check for some invalid combinations of script-related data
- Update TaleSpire to perform the same check as above on load and refuse to load anything that fails the test.
- Test it all. HEAVILY.
Hopefully, I can wrap this up tomorrow and get back to TitanCraft next week.
I hope you’re having a nice day.
Ciao
Disclaimer: This DevLog is from the perspective of one developer. So it doesn’t reflect everything going on with the team
Guest
UserGuest
User