First campaign javascript dissected

For AI and campaign script related discussions and questions

Re: First campaign javascript dissected

Postby NoQ » 17 Oct 2014, 07:45

Hmm, on lvl2 the timer is set to 4 hours too, even though it's wzscript and timer value is different :hmm:
User avatar
NoQ
Special
Special
 
Posts: 6041
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Postby NoQ » 18 Oct 2014, 18:21

Per: i'm ready to commit the first level, more or less refactored to my liking, with docstrings for libcampaign, could you hang around in -dev some time today or tomorrow (or next weekend) to investigate any buildbot problems that i may accidentally cause, on the server side? :oops: I should be available for pinging most of the time. And i think it shouldn't be hard; i added the relevant line to Makefile.am and to javascript.tex, and i guess it's enough. And then i guess i'd proceed on my own. And i guess i'd have to push it to master to get the docs used?
Attachments
0001-jscam-Refactor-cam1a.js.patch
The updated patch.
(58.52 KiB) Downloaded 189 times
javascript.pdf
Added section 7.
(152.42 KiB) Downloaded 231 times
User avatar
NoQ
Special
Special
 
Posts: 6041
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Postby NoQ » 19 Oct 2014, 17:06

I mean, the server may fail to run autogen.sh properly, or something like that.
Compiling the documentation locally works well for me, to both pdf and html.

Or maybe i just push in a new branch and you merge it when ready to ... :hmm:
Second level almost ready.

Edit: pushed d480fd0 and 9d6203e, into a separate branch.
Will make a new thread now, and probably a wiki page, for further discussion.
User avatar
NoQ
Special
Special
 
Posts: 6041
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Postby Goth Zagog-Thou » 19 Oct 2014, 19:14

I'll get started on Mission 2 then. :)
User avatar
Goth Zagog-Thou
Regular
Regular
 
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base

Re: First campaign javascript dissected

Postby NoQ » 19 Oct 2014, 19:32

Mission 2 is already done in the second commit, next step is the power module and the away mission. I'm preparing a wiki page now.
User avatar
NoQ
Special
Special
 
Posts: 6041
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Postby Goth Zagog-Thou » 19 Oct 2014, 19:35

Hehe, nice, beat me to it. Very well, Mission 3 then. ;)

[EDIT] Are we using any elements from the prototype Libcampaign yet, or are we sticking to the items in the .pdf file?
User avatar
Goth Zagog-Thou
Regular
Regular
 
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base

Re: First campaign javascript dissected

Postby NoQ » 19 Oct 2014, 20:10

Are we using any elements from the prototype Libcampaign yet?
We are using a *lot* of them. Actually, most likely *all* of them. And the PDF i posted is already outdated. Try to learn-by-example or see the code of the library for up-to-date documentation (or run
Code: Select all
make javascript-doc
make javascript-doc-html
), before buildbot is set up.
User avatar
NoQ
Special
Special
 
Posts: 6041
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Postby Goth Zagog-Thou » 19 Oct 2014, 20:33

Yep, I was looking at your Cam1.js Refactor and I saw the include. I'll hop over to the new thread in a sec. That's the new Wiki entry. heh.
User avatar
Goth Zagog-Thou
Regular
Regular
 
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base

Re: First campaign javascript dissected

Postby Per » 19 Oct 2014, 20:57

NoQ wrote:Per: i'm ready to commit the first level, more or less refactored to my liking, with docstrings for libcampaign, could you hang around in -dev some time today or tomorrow (or next weekend) to investigate any buildbot problems that i may accidentally cause, on the server side? :oops: I should be available for pinging most of the time. And i think it shouldn't be hard; i added the relevant line to Makefile.am and to javascript.tex, and i guess it's enough. And then i guess i'd proceed on my own. And i guess i'd have to push it to master to get the docs used?

Sorry, I was off mountain hiking this weekend. I just had a look at your commits, and they look fine to me. Feel free to push to master.

(Not sure if campaign documentation should be in the same document as the js API, but that we can sort out later once we see the big picture clearer.)
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
 
Posts: 3561
Joined: 03 Aug 2006, 19:39

Re: First campaign javascript dissected

Postby NoQ » 19 Oct 2014, 21:07

Feel free to push to master.
Oh well, here goes nothing (:
User avatar
NoQ
Special
Special
 
Posts: 6041
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Postby Goth Zagog-Thou » 19 Oct 2014, 21:25

Okee dokey. I'll wait for Buildbot to do the fresh build and I'll grab it.
User avatar
Goth Zagog-Thou
Regular
Regular
 
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base

Previous

Return to Scripting

cron