An author's reference for Bisquixe, a tool for adding audiovisual content to Inform projects (up: final (?) comments on Cloak of Darkness)

A note on organizing Bisquixe code

Since Bisquixe leverages CSS, and since there are nearly endless permutations of elements, properties, and values possible, we could easily get lost in a morass of similar-looking lines of code. That being so, two suggestions are offered:

Use multiple rules

Our initial styling rules could all fit into one when play begins rule. This would work fine, mechanically. However, if we separate these phrases into multiple rules, they will be easier to read and troubleshoot.

Additionally, should we ever need to reapply some of our styling, we only need follow the existing rule, i.e.,

after examining the teapot:
	follow the default BufferLine rule;

Assign logical names to the rules

It is best to have an organizational strategy. Perhaps our game features both “light” and “dark” color schemes. Since these might change during play, it makes sense to make rules specifying colors for each mode.

This is the dark mode rule:

and

This is the light mode rule:

General styling phrases pertaining to .play, #gameport, a:links and so forth might be homed in their own rule:

This is the initial window setup rule:

And so on. The important thing is that we arrive at a sensible scheme that is easy for us to read and troubleshoot.

3 Likes