Page 10 of 46

Posted: Wed Oct 07, 2009 4:23 pm
by Ramirez
I'm in the middle of scripting the Cascade event - things are working OK but it needs a bit of polish. Hopefully some of you guys can help me out on some questions:

1. In amongst an asteroid field I have things that need to be scooped, but I want to be able to identify them on the scanner. Would I be right in thinking only objects with a scanClass of CLASS_ROCK or CLASS_CARGO can be scooped?

2. I tried borrowing some asteroids from Asteroid Storm OXP and they have a nice slow rotation to them. The buoys do the same kind of thing. How is this done? I can get an object to rotate around a certain axis but it always goes as the same speed, no matter what I do to the pitch/roll, thrust or the rotational velocity quarternion.

3. I believe in 1.73 it's possible to use all the various oolite font icons in the ASC. What do you need to enter in the shipdata.plist to use these as beacon icons? Are there specific codes or something?

Posted: Wed Oct 07, 2009 9:37 pm
by JensAyton
Ramirez wrote:
3. I believe in 1.73 it's possible to use all the various oolite font icons in the ASC. What do you need to enter in the shipdata.plist to use these as beacon icons? Are there specific codes or something?

Code: Select all

beacon = "R";
You can also get the icons in the first two rows, except the Anarchy one, by fiddling with codes like beacon = "\10". These codes are octal – "\10" is eight, "\11" is nine, "\7" is 7, "\8" is meaningless. The XML equivalent is <string>& #08;</string>, without the space (in this case, the number is decimal).

Posted: Wed Oct 07, 2009 10:04 pm
by Kaks
...and you can even add your own icon to the beacon in 1.73.x - it's in the same format as the hud missile icons. As an example, Thargoid is using a beacon icon inside his fuel station oxp, courtesy of _ds_.

Posted: Thu Oct 08, 2009 11:33 am
by Commander McLane
Is there a howto guide for the HUD missile icons? I seem to be unable to create any shape with a flat top (like something resembling the letter 'T' or 'E'). It seems the line between the first and second coordinate couple is always drawn as a diagonal, no matter what. You probably don't notice it with small, box-like icons, but it becomes pretty obvious with bigger icons.

Posted: Thu Oct 08, 2009 12:41 pm
by Thargoid
If I remember correctly all points defined have a line drawn back to 0,0 from them. That tends to mess up shapes like F and E.

Posted: Thu Oct 08, 2009 12:51 pm
by Commander McLane
Ah! That explains it. And why, tell, have they?

Posted: Thu Oct 08, 2009 2:13 pm
by Ramirez
That would explain why the icon for my anti-Thargoid missile, which was meant to be a 'T', is a triangle with the point at the bottom. Also I suppose that's why you often see shaded diagonals in some of the large square icons.

Posted: Thu Oct 08, 2009 3:19 pm
by Thargoid
Commander McLane wrote:
Ah! That explains it. And why, tell, have they?
Now there is a question I too would like to know. My knowledge in this area is entirely empirical and experimental...

Posted: Thu Oct 08, 2009 9:02 pm
by JensAyton
Because the icons are drawn in GL_POLYGON mode, which is only intended for convex polygons. The result of using GL_POLYGON mode for non-convex polygons is undefined.

This would be quite an easy thing to fix, but since there’s no bug report on the bug tracker, there is officially no bug. ;-)

Posted: Fri Oct 09, 2009 1:50 am
by zevans
There is no mention of "bug tracker" on the Wiki, which I thought was now our canonical documentation. So what we need is some documentation on how to submit a bug, on the Wiki.

Ha! King me!

Posted: Fri Oct 09, 2009 9:31 am
by Commander McLane
zevans wrote:
So what we need is some documentation on how to submit a bug, on the Wiki.
Hmmm. As you and I--and most of the other people who would report bugs--are active members of these boards, the official documentation on how to submit bugs should be sufficient, shouldn't it?

And it shouldn't really surprise you that this documentation can be found as a sticky in the Testing and Bug Reports forum of the boards. That should be the first place for you to look anyway, shouldn't it?

Posted: Fri Oct 09, 2009 9:36 am
by Commander McLane
Ahruman wrote:
Because the icons are drawn in GL_POLYGON mode, which is only intended for convex polygons. The result of using GL_POLYGON mode for non-convex polygons is undefined.

This would be quite an easy thing to fix, but since there’s no bug report on the bug tracker, there is officially no bug. ;-)
To repeat myself from yesterday: Now there is. :wink:

Oh, and the one from yesterday got fixed already. Thanks, Eric! :D

So, who is going to bring the number of open bugs down to nine again today? :wink:

Posted: Fri Oct 09, 2009 9:37 am
by Kaks
Ahruman wrote:
This would be quite an easy thing to fix, but since there’s no bug report on the bug tracker, there is officially no bug. ;-)
Indeed it's quite easy to forget some issues if they're not on the bug tracker, but while this is still fresh in our minds, I expect you're talking about polygon tessellation...
In that case, I'd vote to use the ODD tessellation winding rule when that part of the code is changed, since it would make it easier to create really interesting shapes! :) (see here for a little example of what I mean)

edit: Commander McLane, I think it's Ahruman's turn this time! :P

Posted: Fri Oct 09, 2009 3:13 pm
by JensAyton
Kaks wrote:
In that case, I'd vote to use the ODD tessellation winding rule when that part of the code is changed, since it would make it easier to create really interesting shapes! :) (see here for a little example of what I mean)

edit: Commander McLane, I think it's Ahruman's turn this time! :P
Conveniently, the even-odd winding rule is GLUtesselator’s default setting. :-) (The eagle-eyed will observe that I have assigned the bug to myself.)

Posted: Tue Oct 13, 2009 8:09 pm
by Ramirez
I've managed to answer some of the questions I posted earlier:
Ramirez wrote:
2. I tried borrowing some asteroids from Asteroid Storm OXP and they have a nice slow rotation to them. The buoys do the same kind of thing. How is this done? I can get an object to rotate around a certain axis but it always goes as the same speed, no matter what I do to the pitch/roll, thrust or the rotational velocity quarternion.
It looks like performTumble does the job - I've tried applying it to other objects and so long as the pitch and roll are reasonable it results in a nice slow rotation.
Ramirez wrote:
3. I believe in 1.73 it's possible to use all the various oolite font icons in the ASC. What do you need to enter in the shipdata.plist to use these as beacon icons? Are there specific codes or something?
Thanks for the help on this - I have the hunting lodges showing up on the compass with the little castle icon.

One other question (for the moment at least) - what's the syntax for calling a function from one javascript to another? For example, in the feudal-challenge.js script I have a function, 'defineChallengerGender'. To save repeating stuff I want to call on this in the feudal-tournament.js script.