scripting support
Posted: Tue Feb 07, 2006 3:10 am
Hi.
As we now have a new release and it seems to be quite stable, I would like to discuss the idea of adding scripting support to oolite, again.
An excellent candidate is: Lua at http://www.lua.org/
It is lightweight, mature, portable (in C) and has an objc-c bridge.
These are the points in favor of scripting:
- full fledged language (loops, debugging, calculations, etc.)
- good documentation & community support
- existing libraries (e.g., for string operations, so no more [[commander_name]] hacks)
- no explicit function enabling
- can be run in parallel with the existing one
A simple script could then be:
Also ship's AI would be more readable and can be easier programmed, e.g., multiple escorts attack in formation or with certain styles (e.g., distance shooting instead of fencing).
I know, the decision is up to Giles, but what do you think?
As we now have a new release and it seems to be quite stable, I would like to discuss the idea of adding scripting support to oolite, again.
An excellent candidate is: Lua at http://www.lua.org/
It is lightweight, mature, portable (in C) and has an objc-c bridge.
These are the points in favor of scripting:
- full fledged language (loops, debugging, calculations, etc.)
- good documentation & community support
- existing libraries (e.g., for string operations, so no more [[commander_name]] hacks)
- no explicit function enabling
- can be run in parallel with the existing one
A simple script could then be:
Code: Select all
function OnExitWitchpoint() {
if ( random() < 0.1 ) {
if ( numberOfShips("pirate") < 3 ) {
// trader festival
addShips("trader",10)
}
}
}
I know, the decision is up to Giles, but what do you think?