Page 1 of 2

How gibs work?

Posted: Sat Apr 06, 2013 2:38 pm
by speedoflight
Hi fellas, im trying to figure it out , how to make the gibs moving in the direction i write on the xml file. So far, not luck at all.

I dont know if the problem is im using full-gibs(meanning i picked the entire image with the transparency), but the game will not obey the direction values i write on the xml file. If i write a direction of 45-50, the gib should move to the right, not to the left or up-left, but i cant get the gib to move to the right. And i am really out of ideas here.

Before anyone post it, i already read the guides about the xml file, i know exactly wat is the purpose of every line.. (that the direction values are 0-360, that u can write negative values, etc etc bla bla). If im posting this topic is beacuse i dont have any idea on how to make the gibs working right , even if they should.

So, there is any other thing i need to be aware, besides the direction of the gibs????

Thanks in advance.

Re: How gibs work?

Posted: Mon Apr 08, 2013 12:12 am
by kartoFlane
If I recall correctly:
Angle of 0 degrees is equivalent to facing north / 12 o'clock.
Positive values go counter-clockwise. Negative values go clockwise. So it's actually moving as it is supposed to.

If Superluminal is showing anything that differs from this description, then the editor is wrong. Gib animation is still largely experimental. Don't trust it.

Re: How gibs work?

Posted: Mon Apr 08, 2013 1:17 am
by speedoflight
Nah, i dont blame superluminal KartoFlane :), i never used superluminal for gibs creation, i am trying to do it as i always did, through the txt files.

YES, i know it should move right, but it doesnt, thats the reason im freaking out!!

Last attempt -> 4 gibs. The main gib (1) is the top and the centered one, it should be static. The ship should explode moving the right side gib to the right (gib 2), the left - down gib to down-left (gib 3) and the top-left gib to up-left (gib 4)

<explosion>
<gib1>
<velocity min="0" max="0"/>
<direction min="90" max="90"/>
<angular min="0" max="0.1"/>
</gib1>
<gib2>
<velocity min="0.1" max="0.4"/>
<direction min="90" max="90"/>
<angular min="0" max="0.1"/>
</gib2>
<gib3>
<velocity min="0" max="0.4"/>
<direction min="180" max="190"/>
<angular min="0" max="0.1"/>
</gib3>
<gib4>
<velocity min="0" max="0.4"/>
<direction min="285" max="315"/>
<angular min="0" max="0.1"/>
</gib4>

So, why this is not working? i cant see the second gib moving to the right (i see it moving down, or left.. etc) and the 2 last gibs are moving in almost opossite directions... -help-! :lol:

Re: How gibs work?

Posted: Mon Apr 08, 2013 9:29 am
by kartoFlane
Huh. Weird.

Well, JLPH's documentation (yeah, I know, this again) is rather difficult to understand in this regard, but it is written there that the min property means the counter-clockwise-most direction, while max means the clockwise-most direction.

Which would imply that positive values go counter-clockwise for min, and clockwise for max. So this:
<direction min="90" max="90"/>
would actually be an arc spanning 180 degrees, facing north.
I don't know, maybe try it with min=90 and max= -90, see what the results are?

Re: How gibs work?

Posted: Tue Apr 09, 2013 12:47 pm
by speedoflight
Still no luck, i tried with every possible value. Nothing seem to work. The Gib movemente is picked randomly.

I noticed i coudnt find any example to look into it, any modded thips i looked into, has the direction between 0-360 degrees, meaning the ships just blow up to random directions... thats really weird, the original ships of the game too, they dont have specific directions..

Maybe its not possible to move a gib only in 1 direction? maybe u can only make the ship to blow up randomly??

Re: How gibs work?

Posted: Wed Apr 17, 2013 9:36 pm
by kartoFlane
In order to avoid derailing Superluminal's thread further, I'll put my post here :P
Anyway, your response prompted me to test gibs a little more. Hopefully it'll be of some use.

edit -- deleted the gibberish!

edit:
Actually, scratch that, values min=170 max =-170 result in the gib moving wherever the hell it wants to go... Back to the drawing board

Re: How gibs work?

Posted: Fri Apr 19, 2013 4:41 pm
by kartoFlane
Take number two.
  • The lower value (out of Min and Max) is used to determine the starting angle.
  • Arc span begins at the starting angle.
  • Arc span is always equal to (Max - Min)
    • If (|arc span| > 360), the gib will move in whichever direction it pleases
  • Starting angle and arc span behave the same way as Min and Max:
    • Positive values go counter-clockwise.
    • Negative values go clockwise.
Of course, I may still be wrong, but this allowed me to accurately predict the outcomes of all my tests.

Re: How gibs work?

Posted: Sat Apr 20, 2013 1:21 am
by speedoflight
As i said, some examples of the game are working perfectly fine, but when i am going to do the same thing with my ship, i cant get the gibs moving in the same way!!!. I just picked the kestrel and put the same values to my gibs, and it didnt work!!. So yes, im sure im doing something wrong, but i suspect its not related to the values of the xml file.. thats the whole point of my "anger", cuz even doing the exactly same thing as the kestrel, or the auto-scout, i cant get it to work LOL. Anyways, i will still again your tips, cuz this cant be so hard , darn it. :lol:

Anyways, wat do u mean with "if arc span > 360" ¿?¿? arc span cant be never more than 360. Or i just dont understand u .. :(

And, arc span = max-min? u sure?? u mean, if i have max value of 100 and min value of 70, the arc span will be 30? so the gib will move in that dgree limit?

Re: How gibs work?

Posted: Sat Apr 20, 2013 9:40 am
by kartoFlane
Yep, arc span is always (max - min).
Because of this, the arc span can be more than 360 - for example, if min= -180 and max= 270, the arc span will be (270 - (-180)) = 270 + 180 = 450. This will result in the gib moving wherever it wants to, because the arc span will be "bigger" than a full circle (360°)

If max is 100, and min is 70, the arc span will be (100 - 70) = 30, yes.
The lower value is taken as the starting angle (70). Arc span of 30 is "added" at the starting angle (70+30=100). So the gib can move in directions between 70 and 100 - that is, in the general direction of 9 o'clock.
(of course, remember to set both min and max velocity to positive values, so that the gib doesn't end up moving backwards)

Re: How gibs work?

Posted: Sat Apr 20, 2013 1:48 pm
by speedoflight
Nah, still i cant get it to work. It doesnt matter if the arc span is min =100 max= 200, for example, the gib movement still is completely random. In fact, i always used values lower than 300, and i never used negative values so far , so its impossible i got an arc span higher than 360. And the gib mechanics completely ignores me lol. I just decided, since i will never get to understand this (i keep saying there is a realy bug in the gibs mechanics) that i will just make random gibs and thats all. They will not look great, but almost they will look. lol.