2011-01-20, 10:54 PM
Well....
I really tightened up the input today. That did not much help the "Take this item?" screen however in and of itself. But it created a much more sound environment for banging out a kludge that basically takes over input for the player.
I have no clue what circumstances cause this bug. It doesn't seem to affect Dark Destiny, but it may be very map/timing dependent. The input polling is not synchronized with framerate at all, but all of Som is single threaded. It makes for a pretty chaotic environment. Ultimately it would be nice to basically just hand off Som's "jobs" to different worker threads for sound/input/drawing. Which is an odd way to program since everything comes from a single thread, but would not be too hard, because Som is pretty much oblivious to just about everything it does. It doesn't seem to ever check the failure or success of an API even. Call it blissful ignorance. Anyway, I think that will happen at some point. Probably before upgrading to anything better than D3D9.
Anyway, the kludge I worked out is very voodoo, but it seems to have a nearly 100% success rate, and doesn't seem capable of doing anything destructive... though very rarely it kicks the player back into the Take menu when cancelling with the NO option (how often will that ever happen right?)
It doesn't seem to affect working games in any way.
There is definitely a huge bug going on, but I don't have the diagnostic tools to make sense of it at this point. The way SomEx is setup to take over the controls so to speak if necessary tends to run for about 200!! frames on average. But it happens in nearly an instant. That means Som is basically going totally out of control. The take over basically hits the button every 3rd poll, which should be one or less frames. I guess I should get some data on how many actual polls go by during that 200ish frames (because the two are basically unrelated)
Basically it seems like half of Som doesn't realize it's in the Take this menu? and the half that does just steps in and out at random.
I tried to deal with the frames getting smashed on top of one another but generally that just led to a bunch of frames you probably don't want the player to see. Basically Som doing shit its not supposed to be doing, but no one ever noticed because the frames are never actually displayed...
But ultimately working around that led to a number of input innovations which are really very nice.
Anyway, probably I will upload a new SomEx.dll build tomorrow-ish with these fixes.
I really tightened up the input today. That did not much help the "Take this item?" screen however in and of itself. But it created a much more sound environment for banging out a kludge that basically takes over input for the player.
I have no clue what circumstances cause this bug. It doesn't seem to affect Dark Destiny, but it may be very map/timing dependent. The input polling is not synchronized with framerate at all, but all of Som is single threaded. It makes for a pretty chaotic environment. Ultimately it would be nice to basically just hand off Som's "jobs" to different worker threads for sound/input/drawing. Which is an odd way to program since everything comes from a single thread, but would not be too hard, because Som is pretty much oblivious to just about everything it does. It doesn't seem to ever check the failure or success of an API even. Call it blissful ignorance. Anyway, I think that will happen at some point. Probably before upgrading to anything better than D3D9.
Anyway, the kludge I worked out is very voodoo, but it seems to have a nearly 100% success rate, and doesn't seem capable of doing anything destructive... though very rarely it kicks the player back into the Take menu when cancelling with the NO option (how often will that ever happen right?)
It doesn't seem to affect working games in any way.
There is definitely a huge bug going on, but I don't have the diagnostic tools to make sense of it at this point. The way SomEx is setup to take over the controls so to speak if necessary tends to run for about 200!! frames on average. But it happens in nearly an instant. That means Som is basically going totally out of control. The take over basically hits the button every 3rd poll, which should be one or less frames. I guess I should get some data on how many actual polls go by during that 200ish frames (because the two are basically unrelated)
Basically it seems like half of Som doesn't realize it's in the Take this menu? and the half that does just steps in and out at random.
I tried to deal with the frames getting smashed on top of one another but generally that just led to a bunch of frames you probably don't want the player to see. Basically Som doing shit its not supposed to be doing, but no one ever noticed because the frames are never actually displayed...
But ultimately working around that led to a number of input innovations which are really very nice.
Anyway, probably I will upload a new SomEx.dll build tomorrow-ish with these fixes.