Sunday, September 4, 2011

Round Reinvention

If a change is major enough at this stage of a project, I sometimes just knuckle down to reboot the entire thing to have an easier time incorporating the change. Looking at my projects folder, Sharpening has undergone 4 of those reboots.Unless I am misremembering, the first time was when I added the provisions for text-altering spells (Artificial Evolution and the like), the second time was when Activatables took off, and the latest time(a week or so ago) was when I discovered that I was actually reinventing the wheel by rolling my own "Treat C# as scripts" solution for the cards.
I now make use of the excellent CSScript library, which eliminates roughly a third of my own experimental, buggy code to load,compile and sandbox the scripts.The only downside versus my solution is that I haven't found a way in CSScript to specify multiple scripts to be compiled into one assembly but that is not a major downside, as all scripts will be sandboxed the same way and I can instantiate objects from the assemblies as I go.It's also not really the domain of CSScript, so meh.

No comments:

Post a Comment