Use Director Xtra as driver?

Elizabeth Dalton dalton_runrev at gaeabooks.com
Sat Jun 26 08:40:52 EDT 2004


Hi,

I've had my trial version of Runtime Revolution for about a week and 
I've been having fun importing my old Hypercard stacks and tweaking them 
to take advantage of the larger feature set of RR. However, I have a 
specific purpose in mind which I've been working toward, and I've hit a 
point where I have a question that doesn't seem to be answered in the 
documentation or this list's archives.

I'm trying to create an event editor and player for a biofeedback input 
device sold with the game "The Journey to Wild Divine" 
(http://www.wilddivine.com). This is a game with a feel a lot like Myst, 
but "events" in the game, rather than being logical puzzles, are 
exercises in raising or lowering "energy" (operationalized as skin 
conductivity level) or adjusting one's heart rate variability. Skin 
conductivity and heart rate are measured by clip-on sensors on the 
fingers, interpreted by a device called a "Light Stone", and passed to 
the computer (Mac or PC) via the USB port. Freeware apps to read input 
from the device have been available from other sources for several 
months now. But there is now a substantial body of users who have 
finished the game (it takes about 10 hours or so), and while the game 
has a lot of replay value, we are all eagerly awaiting the sequel. It 
occurred to me that we needn't wait so impatiently if we had the ability 
to create our own standalone events, which we could swap with each 
other, and RR seemed perfect for the job. The company thinks this is a 
neat idea, and has encouraged me to pursue it.

In searching through the list, I found lots of questions and few answers 
about how to access a device driver, but I think I've got that generally 
sorted out. The handler I am using to test is as follows:

on mouseup
   put empty into field output
   put field driverField into thisDriver
   open driver thisDriver for binary read
   repeat for 500
       read from driver thisDriver for 16 chars
       put it into theInput
       put binaryDecode("h*",theInput,theHex) into ConvertResult
       put binaryDecode("a*",theInput,theChars) into ConvertResult2
   put theHex && theChars &return after field output
   end repeat
   close driver thisDriver
end mouseup

Using this handler, I am able to get data from a file which I thought 
was the driver, but the data is the same whether the device is plugged 
in or not, let alone whether my fingers are in the sensors or not, so I 
checked with Wild Divine tech support (and the author of the Mac 
freeware utility) and was told that this isn't a driver after all. In 
fact, there is no driver. The game accesses the device directly, I 
guess, and the company has an SDK which others could license to write 
their own interface to the device, but no general purpose driver.

I haven't seen the SDK directly, as that involves signing a licensing 
agreement and I'm trying to figure out if there would be any point 
before I go there. I assume the SDK is written in C. It's been a long 
time since I've written any C, and I don't think I even have a C 
compiler on my OSX system (unless you count perlcc, which I don't). I 
may be able to find someone to write a driver using the SDK, but in the 
meantime, I noticed that the SDK also includes a Macromedia Director 
Xtra to access the device. Is there any chance I could use that instead? 
Does anyone have any experience controlling or using an Xtra from RR? 
I'm guessing I might need a shim, at the least....

Thanks for any pointers,

Elizabeth Dalton



More information about the use-livecode mailing list