I made some changes to this site today, mostly related to the navigation. In my first blog post I described the system of Markdown + bash scripts that I use to generate the pages here. I've made it so that the navigation now gets automatically populated with all static pages, the main blog page, and the last five blog entries. The navigation is applied to each page in the following way:
- Start with the first half of the header template
- Generate the list of links for the navigation
- Use sed to find the first line containing the current page's filename (i.e. the link to the current page in the navigation)
- Use that line number with sed to insert a class attribute to the link. This allows giving the link current page its own background color in the navigation
- Append the second half of the header, the page contents, and the footer (in that order)
Points 3 and 4 are pretty neat in my opinion. The only options to get this effect would be to either:
- Use unique CSS classes for each page. Not ideal for how I'm generating pages.
In other news, Flare engine is at a state I'm happy calling version 1.0. The primary task now is to work on the Empyrean campaign, which is the replacement for the alpha demo game the was bundled with version 0.19. Development of the Empyrean campaign has been slow. While part of this is due to my own laziness, a good portion of the blame lies in the fact that game design is hard. Most of the gameplay values (stats, items) from the alpha demo have been thrown out. Getting things reasonably balanced is a tall order, and I feel like I'm just now getting close to a fair level of difficulty after much iteration. While I've been steadily developing maps to test content on, I look forward to going full speed into map and quest creation.