First campaign javascript dissected

For AI and campaign script related discussions and questions
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Post by NoQ »

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: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Post by NoQ »

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 345 times
javascript.pdf
Added section 7.
(152.42 KiB) Downloaded 420 times
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Post by NoQ »

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
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: First campaign javascript dissected

Post by Goth Zagog-Thou »

I'll get started on Mission 2 then. :)
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Post by NoQ »

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
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: First campaign javascript dissected

Post by Goth Zagog-Thou »

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
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Post by NoQ »

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
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: First campaign javascript dissected

Post by Goth Zagog-Thou »

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.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: First campaign javascript dissected

Post by Per »

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.)
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: First campaign javascript dissected

Post by NoQ »

Feel free to push to master.
Oh well, here goes nothing (:
User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: First campaign javascript dissected

Post by Goth Zagog-Thou »

Okee dokey. I'll wait for Buildbot to do the fresh build and I'll grab it.
Post Reply