> I've been following your game for a while now and I don't have a good
> handle on why that is worth doing. It's clearly a huge effort. Why not
> write everything in the same language, or use an existing scripting
> language?
This is a really good question, and it has a number of different
answers. I actually really think that the work put into
IncursionScript
is justified at this point (and that part is almost done, so to be
clear
there's no chance of going back and using Lua or somesuch).
1. IncursionScript is woven really deeply into the event framework
of the game in a way that a plug-in script language wouldn't be. It
lets me hook and modify events in an extremely precise, ordered
manner, rather than defining specific hook points manually. That's
actually really valuable. It also lets me store strongly typed data
in dynamic member variables attached to Incursion objects, that
are then saved in Incursion save-game files. That's also really
important.
2. IncursionScript is a language specifically designed for the d20
game system and Incursion's needs, and it integrates the data and
the special-case rules all-together in one place in a format that I
find really readable. It has a number of different nifty features like
extensible auto-validation as well that I don't see in many "plug-in"
script languages.
3. As a programmer I find it a lot easier to troubleshoot my own
code than someone else's, and if I went for a really feature-heavy
script language that could rival IncursionScript at it's own intended
goal, I'd also have the chance of being stopped dead by a bug I
can't find in someone else's code. Likewise, if I find I desperately
need a new language feature in Incursion, I can just add it. If I do
that to the Lua code, I'd lose any hope of bugfixes, patches, etc.
4. Incursion was started in 1999, as I mention in that last website
post, when free, non-copyleft script languages weren't as prominent
or developed. So the choice was made and design inertia developed,
and now I have a great deal of code already written in IS.
5. Lua is the big gorilla on the block in terms of scripting
languages,
and I find it really unreadable and unintuitive, simply due to it not
being a curly-brace-family language. This would make it a lot harder
to maintain large amounts of code in, and maintainability and
scalability are the big goals here.
6. I like compilers, parsing and language-tinkering. It's a topic of
interest to me, so I decided to roll my own. It's a great deal of
work,
but also really rewarding. If I was really in a code-reuse mindset,
I'd
use Lua -- but I'd probably also be writing an Angband variant rather
than a from-scratch roguelike, and that would give Incursion a very
different identity, I think.
The white paper on the website talks a bit about what I hoped to
accomplish with IncursionScript 1.0, but it's old and doesn't really
highlight the ways that IS is better at what IS does than, say, Lua.
Desirsar mentions community modding -- I mean for Incursion to
allow that in the long-term, actually, but I could allow that with any
other scripting language, too. Granted, though, there's some design
features in IncursionScript that will eventually made add-on modules
a lot easier to handle.
The real need for a script language is to integrate data (i.e., the
stats of a monster or spell) tightly with code (i.e., the
implementation
of a unique effect for a monster's special ability) all in one place,
and
in an easily readable form. IncursionScript does that in (to me) a
more
readable and maintainable form than Lua or similar generic tools.