I introduced in Riven X 0.4 arbitrary engine variables. The intent is for them to control various behaviors of the engine as development continues. Engine variables are categorized according to the sub-system they affect, and can have any arbitrary numerical, alphanumeric or boolean values.
At this time, there’s only one category, “rendering”, which contains only one variable, “renderHotspots”. As the name suggests, this variable is interpreted as a boolean by the engine and controls whether or not hotspot rectangles are rendered over regular card content.
To change the value of an engine variable, you can use the new “set” debug shell command as such:
set <category>.<variable> <value>
set rendering.renderHotspots 0
Right now, there is no way to query for the value of a single variable, nor for a complete listing of valid engine variables. To remedy that, I am currently working on a variable editor interface which will not only allow easy viewing and editing of engine variables, but also of game variables (what determines and control the state of the game; that is which doors are open, etc.).
Update: Riven X 0.5 is now available.
There it is at last, a new binary release of Riven X. This new version is of course far beyond the previous release. Some highlights:
- Basic hotspots are working (mouse up and mouse down), which means you can walk around the islands, flip switches, push buttons, and so on.
- Major improvements in movie and audio rendering. Ambient sounds now fade in and fade out correctly.
- Game variables are implemented and have sane default values, which means simple puzzles should be working correctly.
Of course, there’s still a lot of work left to be done. CD media is still not supported, transitions are not rendered, there are a lot of stability and performance issues left to address, many opcodes and all external functions are missing, water animation is not implemented, saving and loading games are not implemented and full-screen is not available yet.
In addition, this new release comes with Sparkle, the popular technology for self-updating applications. All development builds are set to check a development appcast which gets automatically updated daily with a fresh build from Subversion. In short, Riven X will update itself to the latest revision automatically every day. I hope this will help get new versions into the hands of testers more rapidly.
I’ll be preparing a short series of posts about useful tricks for finding problems and using the debug console in the coming days. In the meantime, enjoy this new release.
Download Riven X 0.4 (4.60 MB). A permanent link is available in the blog’s sidebar.
MPQFS is implemented in Objective-C in order to interface with MPQKit. However, because the FUSE user-space library (provided by MacFuse) is a C library, I had to write a thin wrapping layer to convert the C callback functions required by FUSE to Objective-C method invocations. This layer is simplistic enough that I had to disable multi-threading support in MPQFS (I’m not too sure of MPQKit’s thread safety status either).
Well today, a new MacFUSE release introduced an Objective-C framework with well-defined classes and protocols ready to be sub-classed (and delegated) to implement filesystems entirely in Objective-C. I may or may not adopt this framework in MPQFS (don’t change code that works), but I will certainly take a look at its implementation to see if I can improve my implementation in any ways.
I also recommend anyone using MPQFS to grab the new MacFUSE version. It has a short, but always appreciated, list of bug fixes.
Quick note to those interested by MPQFS. I’ve made available version 0.3.3 (0.3.2 was released silently earlier today). The two updates fix a small number of annoying issues, such as read-only files and folders copied from an MPQFS filesystem, and include a work around for a bug in Core Foundation which would result in a crash.
If you’re visiting the blog site, you’ll also notice the sidebar now includes a Downloads category. I’ll be adding direct download links to the latest version of my programs there in the coming days. I’ll also see if I can add a link to the appcast feed.
From eastern Canada, I’d like to wish all my readers, however few or many you may be, a happy new year. This will be quite a big one for me, with both my graduation in software engineering and my humble beginnings at Apple, Inc. I hope also it will mark the end of some of my projects, or at the very least the end of the first major development phase. Hear hear!