The source alone is here:
And an explanation is here:
http://kooneiform.wordpress.com/2009/11/10/pawsy/
The goal is to write IF so that when you're writing prose, it looks as
much as possible like prose, and when you're writing code, it looks
like Python, and to make things as easy on the author as possible in
terms of code structure.
I'm interested in suggestions, and feedback on improvements and
potential pitfalls. The source kind of turned into a TADS/I7/Python
hybrid. Not sure if that's a bad or good sign.
Thanks for any help!
This looks interesting, although the mishmash of different
styles isn't really to my taste. Would it be so bad to use
triple-quoted strings instead of lumps of unquoted text?
You also seem to be setting yourself up for some parsing
headaches. Your TADS-template-style declarations and your
raw text blocks are going to look fairly similar to a
parser - do you have some scheme in mind for telling them
apart?
--
Greg
> This looks interesting, although the mishmash of different
> styles isn't really to my taste. Would it be so bad to use
> triple-quoted strings instead of lumps of unquoted text?
>
> You also seem to be setting yourself up for some parsing
> headaches. Your TADS-template-style declarations and your
> raw text blocks are going to look fairly similar to a
> parser - do you have some scheme in mind for telling them
> apart?
In an earlier version I had '::' to note an object declaration. The
worst case is something like this:
<code>
Cloakroom
The walls of this small room were clearly once lined with hooks,
though now only one remains. The exit is a door to the east.
</code>
Like you said there's nothing obvious here to distinguish the
Cloakroom object from its description, except the punctuation in the
description.
Instead of triple quotes I could use indentation for everything but
the object declaration; I was looking at PyLit and this sort of
inspired the style.
I should note there's an analogue to this in the RenPy visual novel
syntax, though I'd like the integration of code and prose here to be
cleaner than how RenPy looks to me.
One thing that's bugging me is I don't necessarily want the author be
restricted to just objects; I'd like to allow for more declarative
structures (as much as that's possible with Python), but I'm not sure
a good way to fold that into this kind of syntax.