The QtScript branch (perim/qtscript) now has a working implementation
of javascript for scavengers. The old scripting system runs fine side
by side with it. Saving and loading works as well. The code should be
short and easy to understand, but I have been writing it incrementally
by myself, so it is inevitable that I have overlooked obvious things
that ought to have been documented or explained better. Or have added
bugs alongside features. Or made really poor API choices. The latter
is perhaps the least worrisome. If the merger is approved and
completed, I will start explaining and documenting the new javascript
API on the forums, and take suggestions for improvements, as it is
fleshed out.

I would like for someone to review the changes in the branch, if possible.

I would also like to merge it into the qt branch very soon. Any
objections to this should be voiced now.

Note that the API itself is far from feature complete. I only
implemented the parts that I needed for scripting the scavengers.
However, this meant implementing all the difficult parts -- objects,
groups, globals, timers, triggers and events. So what remains is
"merely" porting of the old scripts and adding the functions they
need. I do not think that a 1:1 porting of the old scripting functions
should be done -- it is better to see what is needed for the scripts,
and see if we can do them better. If you review the branch, note how
the new scavenger script is nearly half the size of the previous
script, while doing exactly the same thing. And I dare say it looks
better.

And if the above is approved, lua branch will no longer be needed. So
once qtscript is merged, I intend to remove the lua branch. Any
objections to this should also be voiced now.

 - Per

PS The new javascript scavenger script is attached as an example for
those too lazy to look in the qtscript branch.

Attachment: scavfact.js
Description: JavaScript source

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to