Page 1 of 1

Additional sprites for vehicles going on/off a slope

Posted: 30 Aug 2007 10:45
by Hyronymus
[12:38] Hyronymus: question: is it possible to use the tilting train sprites approach to add sprites for vehicles goin up/off slopes
[12:40] Hyronymus thinks how long ago it was that he bothered patchman with a question related to TTDp
[12:40] Hyronymus: must be quite some time
[12:40] Islacrusez: I recall I enquired into something similar not too long ago
[12:40] Islacrusez: actually, ages ago
[12:40] Firemark has joined
[12:40] Hyronymus: you do, Islacrusez?
[12:40] patchman: in principle yes
[12:40] patchman: somebody just needs to add the variable
[12:40] Hyronymus: wicked
[12:40] Hyronymus: but I assume "just" serves as an euphemism
[12:41] patchman: actually it wouldn't be hard
[12:41] Islacrusez: first time I've heard that from patchman
[12:41] Islacrusez: XD
[12:42] patchman: basing it on the slope of the tile would be hard-ish
[12:42] patchman: what with buildonslopes etc.
[12:43] patchman: but just calculating the height difference between the previous and following vehicle would be quite easy
In more detail my question is that when a train leaves flat track and enters a steep track (upwards or downwards) you get more sprites between the stages. Now there is just 1 sprite to mark the difference from flat to sloped which really makes the "movement" appalling.

I'm not behind a PC with TTDPatch or OTTD installed, perhaps someone can illustrate what I mean with a screenshot?!

Re: Additional sprites for vehicles going on/off a slope

Posted: 30 Aug 2007 13:38
by Purno
Hyronymus wrote:Now there is just 1 sprite to mark the difference from flat to sloped which really makes the "movement" appalling.
I thought I knew what you meant, until I read this line. ATM TT makes no difference in sprites wether a train is on a flat track or a sloped track, AFAIK.
I'm not behind a PC with TTDPatch or OTTD installed, perhaps someone can illustrate what I mean with a screenshot?!
Don't you just mean the vehicle will be sloped too when driving on a sloped tile? (e.g. driving downwards will have additional sprites, and driving upwards will have additional sprites.)

Re: Additional sprites for vehicles going on/off a slope

Posted: 30 Aug 2007 14:38
by Hyronymus
Yes, I do. Instead of their bad looking anti-gravitational movement.

Re: Additional sprites for vehicles going on/off a slope

Posted: 30 Aug 2007 16:24
by m3henry
I thought of this recently, but I didn't get round to posting it, i made a poor mockup too, :wink:
EDIT: actually, I remember this morning thinking how many sprites would be needed for a tilting train to use this as well!

Re: Additional sprites for vehicles going on/off a slope

Posted: 30 Aug 2007 16:40
by SuperTycoon
m3henry wrote: I remember this morning thinking how many sprites would be needed for a tilting train to use this as well!
Not a huge amount - we can't have corners on downhills, so it shouldn't be a big deal.

Re: Additional sprites for vehicles going on/off a slope

Posted: 30 Aug 2007 16:47
by m3henry
but the tilting train tilts just before and just after the corner, as there is no smooth cornering

Re: Additional sprites for vehicles going on/off a slope

Posted: 31 Aug 2007 16:57
by DanMacK
Just a quick mockup of a train on a slope and the angled sprite. The amount of work needed for this would be enormous with some sets graphics-wise. Each train would need an additional 8 sprites in addition to the current 8, effectively doubling the number of sprites. With a set like the NARS that has almost 10,000 sprites... this is a lot of work... lol

Very interesting concept though.

Re: Additional sprites for vehicles going on/off a slope

Posted: 31 Aug 2007 17:46
by DaleStan
I think you could probably get away with only four additional sprites; slopes can only happen in the cardinal directions, not the diagonal directions.

Re: Additional sprites for vehicles going on/off a slope

Posted: 31 Aug 2007 18:17
by PikkaBird
DaleStan wrote:I think you could probably get away with only four additional sprites
Only if your vehicles are symmetrical.

Re: Additional sprites for vehicles going on/off a slope

Posted: 31 Aug 2007 20:15
by Rendall
"this is a lot of work... lol"

Maybe not if it can be coded with an option in a set? I am not a coder but it might be possible with something like "if set include -false- than use slope drawings" and "if set include -true- than only use horizontal drawings"?

If it can be coded that way it is up to the drawer(s) and the coder(s) as a set-team to choose if they want to do the extra work.
If it is possible I would redraw all my trams.... I do like the idea.

Re: Additional sprites for vehicles going on/off a slope

Posted: 31 Aug 2007 20:32
by DaleStan
It is always up to the GRF artists and coders which features they want to use.

Re: Additional sprites for vehicles going on/off a slope

Posted: 01 Sep 2007 07:25
by Rendall
"It is always up to the GRF artists and coders which features they want to use."

- It is up to someone install TTD
- It is up to someone to buy a computer
- It is up to someone to love trains

I do not want to abuse you Dalestan but reading you reaction my only thoughts are " DUH , that's a wise answer" :?
Ehmmm, yeah I really can do something with your answer :( :P

Re: Additional sprites for vehicles going on/off a slope

Posted: 01 Sep 2007 08:20
by DaleStan
Well, then, I don't understand your statements here:
Rendall wrote:Maybe not if it can be coded with an option in a set?
If it can be coded that way it is up to the drawer(s) and the coder(s) as a set-team to choose if they want to do the extra work.
You seem to be suggesting that it might somehow be possible for Patch to enforce the use of sloped sprites.

That will never happen.

Nothing mandatory has been added to the spec since Action 8, which came sometime before 2.0 final.

Re: Additional sprites for vehicles going on/off a slope

Posted: 01 Sep 2007 09:11
by Rendall
"You seem to be suggesting that it might somehow be possible for Patch to enforce the use of sloped sprites."

No. I do suggest "Let patch automaticly use this slope option when possible" and were do you have to give the option that it is possible... in the set itselve. And why do I ask if it is possible to code that way? Because otherwise some sets have to be recoded and redrawn at once. And although it is a lot of work to do that. It is possible. But not at once... Did this make clear what I do mean? :)

Re: Additional sprites for vehicles going on/off a slope

Posted: 01 Sep 2007 09:26
by DaleStan
Ah. Well, the likelihood of that depends on your definition of "automatically". Or maybe "give the option that it is possible".

Most likely, if adding a few extra var. action 2s per vehicle counts as "give the option", then Patch will automatically obey those action 2s. In the absence of those action 2s, then Patch will "automatically" use only the flat graphics.
Rendall wrote:And why do I ask if it is possible to code that way? Because otherwise some sets have to be recoded and redrawn at once.
I still don't get this. No previously-valid sets have been made invalid, nor had their behaviour changed, since before 2.0 final, and such invalidation will (AIUI) never happen again.

(GRFs that do not obey the documentation are not valid, even if TTDPatch ignores their disobedience.)

Re: Additional sprites for vehicles going on/off a slope

Posted: 01 Sep 2007 11:55
by Rendall
"In the absence of those action 2s, then Patch will "automatically" use only the flat graphics."

This is the answer I think. If there are no slope sprites than flat sprites will be used.