More threads. More responsive.
The IBFListener calls don't wait for the WinForms updates to finish
now. They put changes onto a few variables using a lock and then
activate a dormant thread to actually run those on the worker thread.
Once it's done, that dormant thread goes back to waiting for an
AutoResetEvent to fire that tells it when there's actually work to
do. So it shouldn't chew up any CPU. I found out about this object
working on this project and now I want to find everywhere in the game
that uses a while loop to wait for stuff, and replace it with this.
* MindBlow now lets you reset memory before you start a new
program, and kill one that is still executing
* The MindBlow site now uses the correct button theme
For 50,000 Codepoints you can write and run Brainfuck programs in
a dedicated IDE. Check out the site on "shiftnet/mindblow".
The IDE seems to be working perfectly. The site has some theming
issues.
Refactored every part in the code that used that damn foreach loop.
All assemblies are now loaded on startup into an array, and the
results of GetType() on each are concatenated into another array.
The parts of the code that were loading the assemblies and scanning
them themselves now look to ReflectMan.Types, and all disk I/O is
limited to the first time ReflectMan is accessed. While I was there
I also replaced some other foreach loops with array comprehensions
and such to speed things up - there is a noticeable improvement.
It doesn't seem to have broken anything, but I'd appreciate if
someone could do more stress testing for me.
Recently, Codepoints have been changed to ULong64. While SuperDoggo (on
discord) was playing ShiftLotto, he tried to bet 100cp with only 80cp.
The check to make sure you don't overbet failed because ShiftLotto
subtracts codepoints*difficulty - currentCodepoints. If this value is
negitive, it should give you an error. But, due to the transition to
ulong,, this does not work and the check passes, removing (or adding if
you're lucky) codepoints, crashing the game. I fixed this by simply
changing thechecking statment from subtraction to a Less Than check (<).
WOW I TYPED ALOT OF STUFF