Page 1 of 1

Problem with advanced rotor override

Posted: 09 Nov 2004 09:36
by DaleStan
I am trying to code the Chinook, with this code:

Code: Select all

30 * 4  01 03 08 04
//the rotor views
63 * 9   02 03 03 01 01 00 00 00 00
64 * 9   02 03 04 01 01 01 00 01 00
//etc., to
70 * 9   02 03 0A 01 01 07 00 07 00
71 * 11  02 03 0B 83//...
72 * 38  02 03 0C 82 9F 00 FF 07 03 00 00 00 04 00 01 01 05 00 02 02 06 00 03 03 07 00 04 04 08 00 05 05 09 00 06 06 0A 00
73 * 14  02 03 0D 82 B2 00 01 01 0C 00 00 00 09 00	
74 * 7   03 03 01 26 00 0B 00
75 * 10  03 03 81 26 01 FF 09 00 0D 00
which appears to be working, except that the rotor goes through the animation once, and then stops. The rotor will reanimate, in not-obviously-deterministic ways, each time the chopper turns, but will then stop at a sprite (I think it's the fourth) in the appropriate set. When waiting for a load, it eventually stops at the correct sprite, at least at a small airport. The vehicle stats window always shows a stopped sprite, but I am unsure of how to cause that to always be the eastbound stopped sprite.

I expect you'll want a .GRF too, so here it is. I know about its other problems (mis-aligned sprites, sprites that will never be shown, fewer sprites than specified), I just don't feel like fixing them right now.

I feel like I'm posting nothing but problem reports, but, to some extent, that's my way of saying "Good work." If I didn't like it, I'd just leave, instead of reporting information that will hopefully improve the patch.

Posted: 09 Nov 2004 17:02
by Patchman
For a heli you need 1+3*n sprites in the action 1, the first is stopped and the rest are successive rotations. Sorry, I guess this isn't documented anywhere yet, but the Chinook is the first aircraft to make use of this feature...

There are a bunch of other problems with the heli override that you only notice when trying to change sprites are the heli changes direction, I'll fix those eventually. Szappy said it wasn't very urgent... is it now?

Posted: 09 Nov 2004 17:29
by DaleStan
Patchman wrote:For a heli you need 1+3*n sprites in the action 1
You mean (1+3)*n (where n tends to be 1, 4, or 8), right? If I do 1+(3*n) then there's only one stopped sprite, but I need n stopped sprites, one for each direction. (or direction pair, if 4 sets of rotor sprites will work)
Patchman wrote:There are a bunch of other problems with the heli override that you only notice when trying to change sprites are the heli changes direction, I'll fix those eventually. Szappy said it wasn't very urgent... is it now?
Not particularly. IMO, the graphics still need work, and there are other planes that aren't drawn yet. But if the graphics aren't appearing when they should, it's hard to tell when they are correct.

But I think you misunderstood the problem. The sprites all appear to be loading, they just aren't animating the way I would expect them to.

Posted: 09 Nov 2004 18:00
by Patchman
DaleStan wrote:
Patchman wrote:For a heli you need 1+3*n sprites in the action 1
You mean (1+3)*n (where n tends to be 1, 4, or 8), right? If I do 1+(3*n) then there's only one stopped sprite, but I need n stopped sprites, one for each direction. (or direction pair, if 4 sets of rotor sprites will work)
No, in that case I mean (1+3*n)*m, where m is the number of directions and n is the number of cycles. Most likely n=1 in your case.

Posted: 09 Nov 2004 18:28
by DaleStan
Patchman wrote:No, in that case I mean (1+3*n)*m, where m is the number of directions and n is the number of cycles. Most likely n=1 in your case.
And that's what I have. One stopped, three moving, repeat for each of the 8 directions. n=1, m=8.

Posted: 09 Nov 2004 20:30
by Patchman
Oh yeah... sorry for the red herring. I'll have to look at it in more detail when I get home.

Posted: 15 Nov 2004 05:19
by DaleStan
I recoded the Zeppelins with 2, 3, 4, and 5 animated sprites, and discovered that with 2 and 3, only the first was displayed, with 4, the first 3 were displayed, and with 5, the first 4 were displayed. This is in addition to the one stationary sprite.

Extending this to the Chinook, I added an invisible pixel to the end of all eight rotor spritesets, and came up with this.

Most of the directions now animate, however some still do not.

I also updated the stats, so it does not get introduced until ~1981.

Posted: 18 Nov 2004 02:37
by DaleStan
Josef, have you made any progress on this? I'd like to be able to tell Spaceball that his rotor sprites are good, and 459 would like a working Chinook. I'd also like to have this solved before the Osprey gets drawn, as it'll be even more involved.

Posted: 18 Nov 2004 05:54
by Patchman
Well, last I heard it wasn't very urgent, so I worked on other things.

Besides, I was waiting for an inspiration.. which I now had. Here's a test version, it works ok with the chinook you just posted here, except that the rotor sprites are now wrong.

Each sprite set has five views, but the last view is always empty. However now that I've fixed the bugs, the game uses the first sprite as stopped rotor, and cycles through all the others when it's spinning, so one of the spinning sprites will be the empty one.

Posted: 18 Nov 2004 15:30
by DaleStan
Patchman wrote:Well, last I heard it wasn't very urgent, so I worked on other things.
That's fine. It's just that things changed, and it got more urgent.