Warning: long, detail-packed post
I've been working on a hi-speed transit system recently. Despite all the safeguards I've added into it as I go along, I notice that every so often (it's completely random, and doesn't seem to have anything to do with the speed of the vehicle) - this mysterious problem seems to occur.
The first sign of trouble is
always small posts and corrupted bushes flashing up across the landscape.
My first thought was that the tiledefs were being edited (despite the fact that no script I'm operating at this point has even one addtiledef command), so I opened up the tiledefsOffline.txt file and, sure enough, it contained corrupted entries. So I took those out, added in entries I knew worked, and made the file read-only. This has lowered the frequency of the problem, but it still occurs.
When you stop using the transit system and go back to normal movement, the tile array also seems to be weirded. You'll notice that in the screenshot below the character is sitting on deep water.
No matter how corrupted the level appears, the editor shows no adverse effects whatsoever. Below is what the editor makes of the above situation.
At this point, I began to think that Graal wasn't correctly reading its tiles, and was confusing one tile type with another. So I made a NPC (which are completely unaffected by this glitch) that would give me the tile type of whatever location the mouse was over, thinking Graal would show the tile type that
should be in that position. It didn't. It showed the type of the corrupted tile as if it was supposed to be there. Even the tiles like the water-seat showed up as water, despite the fact they were acting as chairs.
The above stage - Graal seeing these corrupted tiles as part of the landscape - may make some of you think that one of my scripts is inadvertently calling some kind of board[x,y] command and updating the tiles for the level. The only thing that's using this array at this point is the tile identifier utility, and that can only read tile types, not edit them. So it's not that.
So, to summarize, something which I haven't coded and which doesn't seem to be present in any of the levels I'm using is adding random tiles to all Graal levels, redefining which tiles do what (I didn't think this was possible), and attempting to write junk to my tiledefs file. Help?