Saturday, January 18, 2014

FMod - Double Buffer, So Intense

Fudge, the first GUI consumer of FMod, has all the critical functionality required for being a decent level editor! Not only did I fix the flickering issue, I added a few more level-related commands, generalized functionality, and squashed little GUI bugs!

Apparently, one is not supposed to dispose IDisposable objects that were created by the system. My reflection trick that I tried to use to enable double buffering would have worked if I had not disposed the graphics after painting them. It's too late to go back to that - I switched everything over to the dynamically generated subclassed control - but this is probably better programming practice and it works perfectly

Generalizing the level creation dialog, I created commands to edit level properties - name and dimensions - and copy levels. There were a few issues with tile sets not being re-rendered when changing the advanced settings, which I resolved by using my fancy GUI methods instead of just setting the field.

I've always wanted to create an API and this gives me the perfect opportunity to do so. Since I don't really want to be maintaining this for forever, I'd like everyone to be able to create extensions for Fudge and load them easily. To that end, I started on a reflection-based assembly loader. If an extensions directory is present, it will load all files inside it with the FEX file extension, check the assembly for an IFudgeExtensionServer, and ask it for a list of IFudgeExtension to load.

No comments:

Post a Comment