Page 1 of 1

Improved road vehicle acceleration (unrealistic but fun)

Posted: 07 Jun 2009 21:41
by andythenorth
It doesn't matter that road vehicles don't accelerate 100% realistically. Simply not important for gameplay.

It does matter that an expensive 500hp, 30t, 35mph truck goes up a 10 tile slope at the same speed as a low-cost 50hp, 30t, 35mph truck. Very important for gameplay.

The current acceleration model is limited:
If you get why this is a problem you won't need it explained further. :)

My suggestion is that improved RV physics would be useful, and more fun than the current RV physics. I would also like a pony please.

Unless you are either (a) a developer of road vehicle newgrfs or (b) a developer of OpenTTD patches, you are politely requested to not join this discussion :shock:

cheers,

Andy

Re: Improved road vehicle acceleration (unrealistic but fun)

Posted: 08 Jun 2009 19:37
by Hirundo
Some questions to be answered:

If some of the physics properties (13, 14, 18, 19) are not specified, what should be the default value? The vehicle would need to be able to attain the top speed in a normal fashion, even when loaded, and be able to climb up hills.

How to handle articulated parts? Can they have their own values for these properties, or does only the first 'wagon' count?

What to do with curves?

Re: Improved road vehicle acceleration (unrealistic but fun)

Posted: 08 Jun 2009 20:01
by DaleStan
Are there circumstances were "Do it the way TTDPatch does" fails to be an acceptable answer to all those questions?

Re: Improved road vehicle acceleration (unrealistic but fun)

Posted: 09 Jun 2009 10:12
by Hirundo
DaleStan wrote:Are there circumstances were "Do it the way TTDPatch does" fails to be an acceptable answer to all those questions?
That would depend on how TTDPatch does this. I could find documentation regarding curves (limit to 75% of max) and defaults for prop 18/19 were listed in the NewGRF specs. This seems quite acceptable to me.

Regarding prop 13/14 and articulation I was unable to find any relevant documentation. Could you point me to it?

Re: Improved road vehicle acceleration (unrealistic but fun)

Posted: 09 Jun 2009 20:31
by DaleStan
At least partly, this is not documented because GRF authors should never rely on the defaults; some earlier GRF might have changed them.

*rummage*rummage*
The documentation is located at patches/rvpower.asm:20-30, and all places that reference the two variables defined there.

... also, it's located here:
The seven buses are set individually, to weights of (decimal) 9,12,15,25, 9,15,25 and powers of 42,60,70,100, 42,60,90. The trucks are initialized by generation -- all trucks in each of the three generations are identical. Their weights are 12, 22, 45, and powers are 38, 48, 69.

Failure to set one of these properties means that you get whatever value the vehicle that you are replacing had. (Unless, of course, some earlier GRF changed it.)

In NFO, this comes to (assuming I got the hex conversions correct)

Code: Select all

// Buses:
-1 * 0 00 01 02 07 00 13 09 0C 0F 19 09 0F 19 14 2A 3C 46 64 3C 64 5A

// Trucks:
-1 * 0 0D 00 \D= FF 00 \d7
-1 * 0 10 FF
-1 * 0 06 00 04 01 FF
-1 * 0 00 01 02 03 07 13 0C 16 2D 14 26 30 45
-1 * 0 0D 00 \D+ FF 00 \d3
-1 * 0 07 00 01 \7< 57 FF

Re: Improved road vehicle acceleration (unrealistic but fun)

Posted: 15 Jun 2009 21:51
by andythenorth
For various good reasons I'm looking at road vehicle realistic acceleration properties 13, 14 and 15.

It's entirely possible I'm being dumb, but I can't see any explanation of what each of these properties is/does. I'd assume it's HP, weight, and something else, but who wants people going around just assuming things ;)

Anyone enlighten me?

cheers,

Andy

Re: Improved road vehicle acceleration (unrealistic but fun)

Posted: 15 Jun 2009 22:11
by Rubidium
The properties table at the top of that page (just below the table of content) tells you what 13, 14 and 15 mean.

Re: Improved road vehicle acceleration (unrealistic but fun)

Posted: 16 Jun 2009 07:18
by andythenorth
Rubidium wrote:The properties table at the top of that page (just below the table of content) tells you what 13, 14 and 15 mean.
:oops: Thanks.

Re: Improved road vehicle acceleration (unrealistic but fun)

Posted: 17 Jun 2009 06:52
by andythenorth
I have a road vehicle with a weight of 74t (a large off-highway truck).

Prop 14 (weight in 1/4 tons) is a byte, which gives me a maximum value of FF or \b255, for a maximum weight of 63.75t. http://wiki.ttdpatch.net/tiki-index.php ... adVehicles

In this case 63.75t is close enough that it doesn't much matter for gameplay, but if supporting larger weights is a trivial change, it would be useful to have.

cheers,

Andy