skeezix
Internal Development
(Okay, not that anyone cares )
Its quite capable (you can declare functions, constants, variables, and call Zot-provided functions); its vaguely C and Pascal-like so should be mediumly hard for people to use.
I'm still bulkding interfaces into Zot and building ot-functions into its callable function list, but right off the top it can do neat stuff without using zot functions..
In the games config, for the InitGame call, one could for instance add this script:
gp_showoff() {
return ( pow ( 3,2 ) * 2 );
}
/* returns x raised to the power of y */
pow ( x, y ) {
assert y >= 0;
new r = 1;
for (new i = 0; i < y; i++) {
r *= x;
}
return r
}
Then in the config you could anytime you want call gp_showoff() and it'd return 18 (3 to the power of 2, times 2), or just call "pow(3,3)" to get 9, or the like. No work from Zot needed since you defined it in your own script!
I'm so stoked this damn thing works after all this time
This will be crazy useful if I build it into the system, but doing so is a tonne of work, since really, half the config system should be rewritten and redesigned around this.
ie: I could put the main render loop as script call instead of built into the game, then you'dbe able to render anyway you like. It'd slow things down to move it to script, but it'd definately allow one to script Zot to do damned near anything
Likewise.. I need to adjust it so when a sprite gets impacted by anpother sprite, it calls a script in the receiver, so you can respond however you like.. rather than making you define "triggers" and "events" and all that stuff as it does now.
Also, let you script the AI's perhaps, rather than use built in ones.
Each script would slow it down, and I'm not sure a Zodiac or GP32 is powerful enough to run a few dozen scripts per frame and still keep the framerate up, but its damned cool anyway, and will be fun to see.
(For gp32 folks.. this could be a cool alternative to Fenix if I get enough time into it
The only downside is right now the compiler for the scripts is desktop-only; I could make a web based one, too. I think in practice I'll try and port the compiler into Zot itself, so that as it encounters scripts it'll just compile them on the handheld itself, and not worry about pre-compiling them... this would add to the coolness and mean you could edit the scripts right on the device.
So much to do, but .. so cool
jeff
Its quite capable (you can declare functions, constants, variables, and call Zot-provided functions); its vaguely C and Pascal-like so should be mediumly hard for people to use.
I'm still bulkding interfaces into Zot and building ot-functions into its callable function list, but right off the top it can do neat stuff without using zot functions..
In the games config, for the InitGame call, one could for instance add this script:
gp_showoff() {
return ( pow ( 3,2 ) * 2 );
}
/* returns x raised to the power of y */
pow ( x, y ) {
assert y >= 0;
new r = 1;
for (new i = 0; i < y; i++) {
r *= x;
}
return r
}
Then in the config you could anytime you want call gp_showoff() and it'd return 18 (3 to the power of 2, times 2), or just call "pow(3,3)" to get 9, or the like. No work from Zot needed since you defined it in your own script!
I'm so stoked this damn thing works after all this time
This will be crazy useful if I build it into the system, but doing so is a tonne of work, since really, half the config system should be rewritten and redesigned around this.
ie: I could put the main render loop as script call instead of built into the game, then you'dbe able to render anyway you like. It'd slow things down to move it to script, but it'd definately allow one to script Zot to do damned near anything
Likewise.. I need to adjust it so when a sprite gets impacted by anpother sprite, it calls a script in the receiver, so you can respond however you like.. rather than making you define "triggers" and "events" and all that stuff as it does now.
Also, let you script the AI's perhaps, rather than use built in ones.
Each script would slow it down, and I'm not sure a Zodiac or GP32 is powerful enough to run a few dozen scripts per frame and still keep the framerate up, but its damned cool anyway, and will be fun to see.
(For gp32 folks.. this could be a cool alternative to Fenix if I get enough time into it
The only downside is right now the compiler for the scripts is desktop-only; I could make a web based one, too. I think in practice I'll try and port the compiler into Zot itself, so that as it encounters scripts it'll just compile them on the handheld itself, and not worry about pre-compiling them... this would add to the coolness and mean you could edit the scripts right on the device.
So much to do, but .. so cool
jeff