To use a scripting language or not to use a scripting language?
solidstate1991 via Digitalmars-d
digitalmars-d at puremagic.com
Thu Jan 5 14:37:21 PST 2017
I'm thinking on possibly implementing a scripting language for my
game engine for general purpose and AI. At one point I was
thinking on making a scripting language based on D with
ECMAScript and Prolog/Planner influences.
Basic principles for the planned scripting language:
- Adding the possibility for logic programming, mainly for
decision making engines, could be altered on the fly via code on
the fly
- Built-in support for fuzzy logic
- Scripts that run either on step or time basis, intervals can
be altered by code on the fly
- Running from a virtual machine either directly from the source
code or from bytecode
- Ability to call functions through the virtual machine
- Portability with certain compromises regarding to the function
calls
- And making this available for other projects, also making it
optional for the engine as it's not crucial
However I was also thinking on why not just put a few helpers
into the engine's code for scripting and the AI. I already
planning to create an automated animator for the engine to
replace sprites if a certain time elapses (uses milliseconds as
its timebase to make it independent from refresh-rate), I don't
think some helpers for creating a decision making engine in D
would be much harder (much easier than creating a new language).
More information about the Digitalmars-d
mailing list