Multi Asset
New day, new bug to fix.
The game has been plagued by a bug in the asset system for some weeks now.
I was able to work around it somehow.
But since I want to use my tree assets, this bug needs to be fixed sooner or later.
It took a bit of investigating, but then found out it only happens when the assets don’t get loaded immediately. So multithreading is preventing the game from working properly. I have a hunch that something is modifying the asset data while not actually having a lock on the assets. As the reading part of the code, where the game crashes, actually has a lock around it. So that seems to be doing its thing the correct way. Therefore the mission is now to track down who is not properly asking for a lock. And that may actually be the most obvious place, but we’ll see.
UPDATE:
Since I could easily disable the multithreaded loading of the bitmaps I wanted to see if I could get the trees working.
Just to know if the parallaxing is working and to hopefully implement a robust way of doing stereoscopic 3D in the future.
Unfortunately the parallaxing doesn’t seem to work at all anymore.
No matter what I tried during my commute back home, the bitmaps were moving all at the same speed.
As they were also scaling at the same speed.
So something in the projection is wrong, but I couldn’t figure out what it was yet.
Though I probably want to redo that part as well.
Actually figuring out what the correct values are to get some solid results when using perspective rendering.