Skip to content

Torque/power conversion #22

Closed
Closed

Description

@AlbertoMarnetto

One tiny mistake in CyclesMod is that it interprets the raw bytes in the EXE as vehicle power, and then it creates a torque curve by dividing by the rpm.

But actually is the contrary: the bytes are the torque and one can derive the power data by multiplying them by the rpm.

See the comparison in https://marnetto.net/2026/07/18/dml-making-of-1#how-to-build-a-car : my torque and power graphs for the Ferrari are very similar to those shown in the in-game car selection screen. My empirical formula for the power curve is hp = torque * rpm / 8.72 / 128 * 0.73; (the 0.73 constant is chosen to match the in-game graphs).

Activity

  1. albertus82 commented on Aug 18, 2026

    @albertus82
    Owner

    Ciao Alberto,

    so you think that the graphs should be something like:

    Image Image Image
  2. AlbertoMarnetto commented on Aug 18, 2026

    @AlbertoMarnetto
    Author

    Yes, something like that. You can determine the unit for the power graph (in gray) by looking at those in the game. Obviously the power spike of the McLaren at 9500 rpm is a hack of the developers and is not shown, but the rest matches the game's graphs quite well.

  3. albertus82 commented on Aug 19, 2026

    @albertus82
    Owner

    Beyond the aesthetic questions concerning the correspondence between the graphs shown in the game and their "real" counterparts, I am doubtful that the values represent torque rather than power. Initially, I called it torque in CyclesMod as well; however, after running some tests, it seemed to me that the values actually represented power, because when I set a constant torque in the game, I could not see the slightest increase in power as the RPM increased. Even taking friction into account, it didn’t make sense to me.

    I have attached an illustrative video. Here, I set a constant torque value of 20, and the in-game result appears to be linear up to 60 mph, with a slight reduction afterwards, which is probably attributable to the proper simulation of friction. I deliberately kept the values low so that the effect of friction would be relatively insignificant.

    This linear behavior makes me lean toward interpreting those values as power rather than torque, because if they actually represented torque, I would expect power to increase to some extent as the bike’s RPM increased, which does not seem to happen at all.

    out.mp4
    Time Speed
    0.0 0
    1.0 8
    2.0 17
    3.0 25
    4.0 33
    5.0 41
    6.0 49
    7.0 57
    8.0 64
    9.0 70
    10.0 76
  4. AlbertoMarnetto commented on Aug 19, 2026

    @AlbertoMarnetto
    Author

    Well, this proves that your power is increasing. You need a lot more power to go from 70 to 76 mph in one second, than from 0 to 8 in the same second.

    Consider that the power needed just to keep the current speed (i.e. to overcome drag force) is roughly cubic with respect to speed.
    The excess power after that gets converted into kinetic energy, which is quadratic in speed. I have not reverse-engineered the formulas that DSI's games use, but they seem to match the real-world physics pretty well. Compare the torque/power curves of real engines: they are all shaped like in the graphs you posted yesterday.

  5. self-assigned this
    on Aug 20, 2026
  6. albertus82 commented on Aug 21, 2026

    @albertus82
    Owner

    Fixed in the v3.3.0 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions