Narrative scripting/programming tool. Write stories in your favorite editor using a feature-rich language, compile them into a very small and simple language to easily integrate them into your game.
Scripting languages need the ability to perform application-specific computations and instructions.
Currently, Tonkadur provides this for instructions, although the naming ( declare_event_type/event) is not fitting.
Extensions can theoretically provide both, but are not actually supported yet (barely defined interface for the extension and no stable/clean interface to Tonkadur as a library). In any case, Tonkadur extensions are meant for more generic computations and instructions that Tonkadur does not provide by default but that could be useful on many application (e.g. string management). Proper support for extensions is meant to be a V2 feature.
However, application-specific computations and instructions should be very easy to add. To allow this, the following modifications should be made:
The term "event" should be reserved to input events.
declare_event_type should be renamed to declare_extra_instruction.
(event {instruction_name: String} ...) should be the current (#{instruction_name: String} ...). Force the # to be part of the declaration.
Add declare_extra_computation, which will then use the current (${computation_name: String} ...) syntax. Also force the $ to be part of the declaration.
Write a big warning about computations being something that should not perform any modification to any state. Probably give some warning like:
Scripting languages need the ability to perform application-specific computations and instructions. Currently, Tonkadur provides this for instructions, although the naming (
declare_event_type
/event
) is not fitting. Extensions can theoretically provide both, but are not actually supported yet (barely defined interface for the extension and no stable/clean interface to Tonkadur as a library). In any case, Tonkadur extensions are meant for more generic computations and instructions that Tonkadur does not provide by default but that could be useful on many application (e.g. string management). Proper support for extensions is meant to be a V2 feature.However, application-specific computations and instructions should be very easy to add. To allow this, the following modifications should be made:
declare_event_type
should be renamed todeclare_extra_instruction
.(event {instruction_name: String} ...)
should be the current(#{instruction_name: String} ...)
. Force the#
to be part of the declaration.declare_extra_computation
, which will then use the current(${computation_name: String} ...)
syntax. Also force the$
to be part of the declaration.Write a big warning about computations being something that should not perform any modification to any state. Probably give some warning like:
Which is allowed to compute both
$something_else
and$my_comp
.