News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

New mod: extended line of sight

Started by HerrNove, January 27, 2025, 01:47:06 AM

Previous topic - Next topic

HerrNove

#45
On second thought, this replay issue seems pretty important. First because I want that SuperSight is able to be used with 35 years worth of past replays, second (and more important!) because if replays desync it means that the repldump version in master is broken.

I was able to determine that the fault happens somewhere in update_car_speed. I cannot find where the conversion from assembly to C introduced a discrepancy wrt the original Stunts, but simply replacing the function with its original asm version solves the issue. I'll publish a fixed Restunts and a fixed SuperSight soon.

HerrNove

#46
OK, I published the fixed version in the other thread! Now the vanilla replays play correctly – and, as expected, your files recorded with the Restunts builds with ported code desync. But I fixed Restunts master too, so from now on, if we take my fixed version as base, we should not have this problem anymore: the replays of BB Stunts and future Restunts versions will be compatible; the replays made with older Restunts will stay broken but I think this is not particularly worrying.

Cas

It's great that you managed to stabilise it!  Can you compile the colour needle mod into this modded binary? Here are the details on how it works:

https://wiki.stunts.hu/wiki/Needle_colour_mod

I think we should sync to discuss how we could implement plugins for mods. We could join forces there.
Earth is my country. Science is my religion.

Duplode

Quote from: HerrNove on February 07, 2025, 08:42:32 AMI was able to determine that the fault happens somewhere in update_car_speed. I cannot find where the conversion from assembly to C introduced a discrepancy wrt the original Stunts, but simply replacing the function with its original asm version solves the issue.

Good move! My guess is that the porting bug in update_car_speed is something like a subtle truncation discrepancy. I'll investigate that at some point in the coming week.

Quote from: Cas on February 07, 2025, 06:19:18 PMCan you compile the colour needle mod into this modded binary? Here are the details on how it works:

I believe the mods are currently separate because the needle mod was done on asmorig, while SuperSight was done on the ported code. That said, as long as the code touched by the two mods doesn't overlap (and I think it doesn't) it should be straightforward for us to compile a bespoke binary combining the two -- that's the same kind of thing HerrNove has done to avoid runniing into the de-syncing bug.

HerrNove

#49
Needle color added as the Oxia cockpit shows. I could not find a nice car with different colors, but tried the GTON used in the needle thread and the needles appeared one gray and one white, so I think the patching was successful.

One thing I found out is that Restunts crashes (out of memory) if I select the Diablo. None of the other cars has the problem, but it's annoying.

I do not release yet this version in the modification thread because I want to keep that thread relatively clean and not spam everyone. I'll test this version for some time, then I'll publish it. But you can already test it.

You cannot view this attachment.

Zapper

#50
I think that you could use the Ferrari F40 (ZF40) since it has use of almost the limit of vertices/faces allowed by game's engine. I also suggest to check stability of this developments with a race with opponent using an high detailed car.

I congratulate you for your job on getting such improvements! Very nice  ;)

Cas

I'm getting a crash with the Hexa too!  I also notice I have to use more cycles in DOSBox for this binary than from the original, but that's fine.

Great that you were able to compile it with the needle colour mod!  Thanks!

@Duplode - Yes, this is a different part of the code and it's just a very small change.
Earth is my country. Science is my religion.

KyLiE

I've just tested this and it looks great!  Improving the draw distance of Stunts is something that I've always wanted, but didn't think was possible. :D

During my test, I made the following interesting observations:

  • As mentioned, selecting the Baronetti HEXA or Lamborghini Diablo VT crashes the game with a "reservememory" error.
  • However, giving an opponent either of the above cars works fine.
  • As per @Zapper's suggestion, selecting the Ferrari F40 and also giving it to an opponent works fine.
  • Selecting the Caterham Super Seven JPE works fine, but giving it to an opponent crashes the game with an "unhandled primitive type 5" error.

HerrNove

Thanks for the research!

Quote from: KyLiE on February 08, 2025, 04:08:29 AM
  • As mentioned, selecting the Baronetti HEXA or Lamborghini Diablo VT crashes the game with a "reservememory" error.
  • However, giving an opponent either of the above cars works fine.

This makes sense. The allocation fails because the game does not find space for the .VSH file, which I think is the graphics of the cockpit.

Quote from: KyLiE on February 08, 2025, 04:08:29 AM
  • Selecting the Caterham Super Seven JPE works fine, but giving it to an opponent crashes the game with an "unhandled primitive type 5" error.

This is a problem in Restunts that has only reimplemented 99% of the Stunts code.

So in general, I think most of these problems can be fixed by porting my mod to work with the original assembly and not with the Restunts-rewritten versions. And so...

HerrNove

#54
...I have done just that! This version seems to work well, runs all cars, debugs do not desync. But I made it in haste, so please test it!

EDIT: removed, see below.

You cannot view this attachment.

HerrNove

I had forgotten to reapply the needle color fix, so here a small update, which could also be the final one for this project if no errors arise. Enjoy Herr Otto and Herr Nove racing on their Caterhams, with black speed needles and no crashes!

You cannot view this attachment.

alanrotoi

Quote from: HerrNove on February 08, 2025, 02:20:12 PM...I have done just that! This version seems to work well, runs all cars, debugs do not desync. But I made it in haste, so please test it!

EDIT: removed, see below.

You cannot view this attachment.
[/quote
Quote from: HerrNove on February 08, 2025, 02:20:12 PM...I have done just that! This version seems to work well, runs all cars, debugs do not desync. But I made it in haste, so please test it!

EDIT: removed, see below.

You cannot view this attachment.

Is this an edited image or
Quote from: HerrNove on February 08, 2025, 02:20:12 PM...I have done just that! This version seems to work well, runs all cars, debugs do not desync. But I made it in haste, so please test it!

EDIT: removed, see below.

You cannot view this attachment.

Quote from: HerrNove on February 08, 2025, 02:20:12 PM...I have done just that! This version seems to work well, runs all cars, debugs do not desync. But I made it in haste, so please test it!

EDIT: removed, see below.

You cannot view this attachment.

Is this an edited image or the farsight effect makes the clock move from its place or it is a replay?

HerrNove

It's a replay. In live racing the clock is where it should be.

You cannot view this attachment.

Argammon

I don't have much to add but that this is an excellent mod @HerrNove! 8)

One thing I am wondering about is if there is a way to make the game render illusion elements earlier. If so, that would greatly increase the track-building possibilities without the (for some pipsqueaks) annoying side effect. Perhaps your next project?  ???

Cas

Excellent!  I'm testing it now. It works great. It is, of course, a little more demanding as it draws more polygons, but it's just a few Ctrl+F12 clicks and it's perfect.
Earth is my country. Science is my religion.