Rewriting text output

Rendering text in a graphical environment is … let’s call it ‘involved’. Assuming you want to output a single line of text in a single typeface and colour, that’s pretty easy. The interface libraries will even probably be willing to word-wrap it for you.

If you want to do other things, like mix plain text with italics orĀ bold or text in other colours, well suddenly you’ve got dozens of hoops to jump through.

Well, I did want that, so I had to work for it.

Continue reading Rewriting text output

Decoupling

As a result on doing some more work on Argus’ story compiler (which makes the module sound far more impressive than it actually is), I discovered that the early development prototyping had made the core engine code (the really portable workhorse library) far too tightly coupled with the platform-specific UI code.

That is, there were sections of the engine library that you couldn’t pull in without having to satisfy a lot of platform UI dependencies.

Thankfully, Observer patterns came to the rescue, and I was able to use these to decouple the engine library from having to have any direct knowledge or linkage to the UI module.

Well, mostly. Almost every case has been handled, but there’s still two parts left to do: The display of interstitial images, and managing the UI elements for character selection.

That’s all just a matter of dog-work, though. Sit down and actually cut the code. Bum on seat, code in editor.