The official --=jscam=-- thread

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: The official --=jscam=-- thread

Post by NoQ »

51db9f6: finally base detection messages make some sense (and hopefully work like in original campaign, eg. on cam1a only the third base is hinted).

We really need some fix for eventObjectSeen. Currently we cannot guarantee that any given object would actually trigger this event any soon after it has been seen, so we can't really use it for anything, and have to rely on a timer check instead.
User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: The official --=jscam=-- thread

Post by Goth Zagog-Thou »

According to the IRC channel NickServ, I'm banned. :annoyed:

Any idea how/when that happened? It's news to me. I don't visit the IRC channel often .. last time was perhaps a year or two ago.

Weird.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: The official --=jscam=-- thread

Post by NoQ »

o_O dunno. Asked Berg, he doesn't seem to know either. I have no rights anywhere near there. Channel or FreeNode as a whole?

Anyway, i guess i'm getting some sleep and proceeding tomorrow (:
User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: The official --=jscam=-- thread

Post by Goth Zagog-Thou »

Ok bud. Have a good sleep. I'll plug away on my end of things and hopefully have something constructive accomplished today.

I didn't check all of Freenode, although I assume one registered Nick is good for ALL of Freenode so I'm assuming it applies network-wide. I'm a complete noobie when it comes to IRC, I've never used it aside from Warzone chat. I'm not that bothered by it, just found it troublesome since I wanted to live chat with you guys today and couldn't.
User avatar
ClockWork
Trained
Trained
Posts: 219
Joined: 07 Sep 2008, 03:22
Location: USA

Re: The official --=jscam=-- thread

Post by ClockWork »

I must confess that your meaning of Very little knowledge is required may be different than my vocabulary :lol2:
May I insist that I have a push-or better yet, a shove in the right direction? I'm a bit confused when it comes to where to start. Specifically, what do I download? I need to emphasize that I am horrible with directions, so a direct link would be the capital idea.

You can take a horse to a river, but you can't make it drink the water :lecture:
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: The official --=jscam=-- thread

Post by vexed »

Goth Zagog-Thou wrote:According to the IRC channel NickServ, I'm banned. :annoyed:

Any idea how/when that happened? It's news to me. I don't visit the IRC channel often .. last time was perhaps a year or two ago.

Weird.
First, you need to register your nick, and it seems you did that.
Once that is done, you need to use an actual IRC client, something like Ychat or mirc or whatever else.
The 'banned' message isn't directed at you, it is directed at the freenode's webchat applet, since, people abuse that too much.

You can still use the webchat applet if you go to #warzone2100-games or #warzone2100 though.
Right now, by far, #warzone2100-games is where most people are at (active).
The other channels, for whatever reason, people leave their clients connected all day, so, it may look like the channel is full/active, when it isn't.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: The official --=jscam=-- thread

Post by NoQ »

ClockWork wrote:Specifically, what do I download?
If you want to run and test the campaign, get the latest master from here (as you did, but it was temporarily broken). The last hex number in the filename is an index of a particular change ("commit") in this timeline, so you can figure out how recent your build is.

If you want to code the scenarios, either take the same buildbot snapshot and do it as you make mods, or clone the git and compile from source and enjoy fancy git features.

If all you want to do is the labeling stuff (writing out original campaign scripts in a human language, with area coordinates), then you don't need to download anything, just take any existing game version, unzip base.wz and read original scripts and take your notepad to write down your observations, run the game to test how exactly it behaves if you're not sure. You can also read the same source code online. In fact, if you own the original 1.x release, you may also use that as a reference, in case some bugs were introduced later (never heard of that, but possible).
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: The official --=jscam=-- thread

Post by NoQ »

Hmm. Was mostly afk, couldn't convert a level today yet. Investigated a few engine bugs though. Time limits are finally working outside GMT+0 (lol funny bug).

I've got a bit of talking though, regarding rules.js. It's currently being loaded from wrf/basic.wrf. Which means:
  • It gets loaded for the first campaign level (of alpha, beta, gamma campaigns, when you start them from the menu screen), which is good.
  • It doesn't get loaded for the second or third or whatever next campaign level when you play through, which is bad. You'd notice that because minimap on-off on command center construction-destruction is not working.
  • It gets loaded for the tutorial mission, which is bad (this mission needs custom control of UI buttons; but not loading rules.js is not enough to fix it).
  • It gets loaded for the fastplay mission, which is good ... i think, haven't paid much attention to it.
First of all, adding rules.js to every campaign level .wrf file (eg. cam1a.wrf) fixes the problem with campaign, while adding it to every campaign .wrf file (eg. cam1.wrf) doesn't. It's not hard to add though. On the other hand, do we need rules.js at all when we have libcampaign, which was designed to be sort of more powerful, and runs with the same rights anyway (as a global script)?

Then, what really bothers me is that tutorial and fastplay are a separate entity. I never understood what the fastplay level is, but i think it's what we now call a "challenge", and nowadays we've got a whole mechanism to support this sort of entities. And it's a really well-made single-player challenge. Tutorial, on the other hand, needs an extra support from the UI: it needs to be accessible from top-level menu, and the "challenges" menu is a wrong place for it. That's the only thing that makes the tutorial different from a normal challenge.

So i've got a plan: Rewrite tutorial and fastplay in JavaScript together with the campaign, reimplement them as a single-player challenge (two separate challenges), make the top-level "Tutorial" menu item point at the tutorial challenge (upon clicking, it should probably start bypassing the game setup dialog). Only the last part of this plan is something i'd probably need help with, from someone familiar with UI code.

P.S. Looked at the tutorial code. 82 sounds, 37 phases :doh: gonna be fun.
User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: The official --=jscam=-- thread

Post by Goth Zagog-Thou »

That explains all the problems I've had getting the baseline going. Nice job, NoQ. I never would have found it myself.

What I do, every time I make a new mission (this goes for Cam 4 as well as now) is I get the map together and a basic script file in place. We already have the map. The script file, easy enough. function eventStartLevel() has the basics we need from the others, trimmed down enough to at least get us running before we script the mission out. I call this "baseline"; and no, it does not do very much at that point. It's meant to work out any and all technical issues getting the mission to actually run on Warzone. A "foundation", if you will.

Thanks for getting it sorted. :)
User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: The official --=jscam=-- thread

Post by Goth Zagog-Thou »

My next question, and I was thinking about this last night when I was trying to sleep (why does it always happen like that?!) ... is the information at Aubergine's JS API Site still valid? He went through a lot of pains to document everything he could before going MIA.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: The official --=jscam=-- thread

Post by Per »

Nice finds, NoQ! Let me know when/if you need UI changes.

I think the info at Aubergine's site is still valid.
User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: The official --=jscam=-- thread

Post by Goth Zagog-Thou »

Thanks, Per. I was hoping someone could confirm that.

NOW we're cooking. Not that we weren't before ... :lol2:
User avatar
vexed
Inactive
Inactive
Posts: 2538
Joined: 27 Jul 2010, 02:07

Re: The official --=jscam=-- thread

Post by vexed »

NoQ wrote: Then, what really bothers me is that tutorial and fastplay are a separate entity. I never understood what the fastplay level is, but i think it's what we now call a "challenge", and nowadays we've got a whole mechanism to support this sort of entities. And it's a really well-made single-player challenge. Tutorial, on the other hand, needs an extra support from the UI: it needs to be accessible from top-level menu, and the "challenges" menu is a wrong place for it. That's the only thing that makes the tutorial different from a normal challenge.
No, fastplay was more for training, than anything else.
In fact, when pumpkin released some demos, they had different 'training' missions for them.

I did have fastplay converted 1:1 to JS, along with all required functions need to make it work, back when I was evaluating how feasible JS is. Sent Per a copy as well as some stuff I found out about how all this works.

However, for one reason or another, all that stuff never was put into the codebase.
No idea where that stuff is now, it is most likely archived on one of my HDs...

BTW, we really need JS lint, so we can all run it through and also pick a style that is as close to what we have for C/C++ as well.
/facepalm ...Grinch stole Warzone🙈🙉🙊 contra principia negantem non est disputandum
Super busy, don't expect a timely reply back.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: The official --=jscam=-- thread

Post by NoQ »

Goth Zagog-Thou wrote:is the information at Aubergine's JS API Site still valid?
I'd encourage you to look at the c++ source code more often, especially when you are hunting for a bug and suspect it to be in the API. That's the only truth we have, as new bugs are being introduced regularly, and many functions are still never-tested. And it's also quite easy to lookup and read (search for js_functionName for functions and triggerEventName for events).
vexed wrote:I did have fastplay converted 1:1 to JS
Yay, if anybody finds it, please post (:
User avatar
Goth Zagog-Thou
Regular
Regular
Posts: 1582
Joined: 06 Jan 2007, 08:08
Location: Delta Base
Contact:

Re: The official --=jscam=-- thread

Post by Goth Zagog-Thou »

Yeah, reading the source code more often than I do (it's been nearly two years) would probably serve me well. Heh.

Last time was when I was tinkering with getting 500x500 map sizes to work ... and it did .. up until the Minimap got displayed, and then all sorts of performance problems (aka MAJOR lag) arose. No amount of throttling the update interval helped, either -- much to my eternal annoyance. I even got pathing to cooperate, but that darned minimap thing was the deal breaker. *sigh*

Memories ...
Post Reply