Story Time: Of sandstorms and time loops
Back in the year 2005-2006, while working on Evil Islands: Spring on Jigran project, we have noticed something really weird. Evil Islands has this weather system, where to each game zone one of the three weather types (rain, snow and sandstorm) is assigned, and the game would at random times activate the weather. Rain and snow were just particles that would fill the visible on the screen area, but sandstorms were… well, they were particles as well, but they were also actual in-game objects that communicated with units on the map – dealt damage to whoever got into contact them. Sandstorms would last for 10-15 seconds before disappearing, though, so it wasn’t that big of a problem. And it was a rarity to have more than one sandstorm active at a time.
But on one map something strange has happened. When a particular quest was active, and only that one quest, the sandstorms were EVERYWHERE. Dozens of them, roaming around, killing poor unsuspecting citizen NPCs (and also players who at that point in the game didn’t have enough armor to protect themselves from sandstorm damage). What could possibly happen?
Now, obviously, it had something to do with that quest, but the scripting language didn’t have any commands to control the weather, it was all done by the engine (for which we didn’t have access to the source code itself). We were pretty much clueless. I was really baffled myself, because that particular quest was scripted by me. However, we did notice that the command that would set the day time to midday for this mission was caught in a permanent loop. A little accident. Quickly fixed. Now, back onto trying to figure out what to do with sandstorms and… there were none anymore?
As it turned out, if the command for setting the day time is looping, it constantly activates the weather effect of the game zone we’re in. We still don’t have any idea how in the world that makes any sense, but, hey, at least we could turn this into a feature if so desired, right?