Original Post
One of the things I've been working on in my spare time are some tools for Gabriel Knight 3. One of those tools is a viewer for viewing rooms and models and stuff. As part of that I started work on implementing the scripting language used by GK3, "Sheep." I think my Sheep implementation has finally reached a level of maturity that it is ready for some outside attention. It's still in an alpha stage, so I wouldn't use it for anything important, and I'm sure it's full of bugs and memory leaks. But my hope is that someday Sheep would be useful to people as a general purpose scripting language for games, not just for my little GK3 tools project. Here is a quick sample of what Sheep looks like:
symbols
{
int foo$ = 5;
float bar$ = 3;
}
code
{
main$()
{
if (foo$ > bar$)
{
PrintString("Foo is bigger");
}
else
{
PrintString("Bar is bigger!");
}
}
} Since it's probably Sheep's most important feature I should mention waiting. Basically each external function (like PrintString() in the example above) cannot block. So, for example, the StartDialogue() function from GK3 executes asynchronously. To pause the script while the dialogue plays you use the "wait" keyword, like this: code
{
main$()
{
wait PlayDialogue("woots");
}
} You can also wait on multiple functions at once: wait
{
PlayDialogue("lalala");
PlayAnimation("dance");
} Now both things happen at once, and the script waits for both to finish before continuing. Anyway, any feedback on anything at all would be appreciated. download clicky Edit: For some more documentation on Sheep you can look at intro_to_sheep.txt and using_sheep.txt inside the zip. Edit again: I just uploaded a version of intro_to_sheep.txt that can be read online: clicky [Edited by - BradDaBug on November 6, 2009 2:52:59 PM]