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

Duplode

Quote from: HerrNove on February 02, 2025, 09:54:40 PM* provide me a link to the source code of your branch (if public), and maybe your replay so that we have a common reference;

I said earlier that my fork on Bitbucket was private. Embarrassingly, it turns out I was wrong about that  :o I must have mixed it up in my head with some of the other private Stunts-related repos I have there. Anyway, this is the fork: https://bitbucket.org/duplode/restunts . I think the only branch not available from elsewhere is the "siluro" one, which has the tweaks for the DAF Museum edition. (Also, I still plan to move this away from Bitbucket...)

HerrNove

#61
You know, this mod project is like a 4X game. You would like to save and exit, but you keep thinking "just one more thing...". So, here the newly-baked SuperSight. The final-final-for-real-this-time (lol) version.

I have spent a lot of time and attempts to try to raise the limit of 400 primitives, and I've finally made it! The gain is not immense, but it had become a matter of principle for me. Now the game can display about 480-500 primitives, which means that complex scenes will be rendered more fully. You can check how many polygons are being rendered, as well as other infos, by pressing F5.

For future researchers only: the new limit is given by the memory buffer allocated to the primitives: it is 10400 bytes big and the primitives are up to 26 bytes big, with an observed average of 21.5. I tried increasing the buffer but the game tends to crash at about 11000-11200 bytes, leading me to think that other unknown buffers in the game are being overrun. I think we are hitting the point of diminishing returns, so I stopped here.

Quote from: Argammon on February 09, 2025, 08:13:49 PMOne 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?

Oh, I thought illusion tiles were a deliberate effect of the track designers :D Restunts made them visible (the "hiding code" was defective) and I made them hidden again as part of my fixes. So removing the invisibility effect is as simple as removing the fix. But you know what, to accommodate each taste I have made the option configurable: the engine by default will behave as the original Stunts, but pressing F6 will toggle the visibility of illusion elements.

And if pressing F6 every time is too annoying, open the file with a binary editor, search for the string "ZakS" and change the second 00 byte following it into a 01.

Quote from: Cas on February 09, 2025, 10:05:43 PMExcellent!  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.

When playing this mod I highly recommend tuning DOSBox's CPU as follows:

[cpu]
core=dynamic
cputype=auto
cycles=max

I'm playing with these settings and the mod is running very fluid. Granted, I have a good PC but nothing extraordinary (AMD Ryzen 7 5700U).



KyLiE

You've done some excellent work on this!  I've been testing it again and I noticed a small issue.  When you enable the debug information, the text on the opponent evaluation screen changes to light blue.  It's still readable, but I wanted to know if it's possible to change the colour and position of the debug information so that it doesn't blend in with the sky and interfere with the clock.

Duplode

#63
Quote from: HerrNove on February 10, 2025, 12:20:25 AMI have spent a lot of time and attempts to try to raise the limit of 400 primitives, and I've finally made it! The gain is not immense, but it had become a matter of principle for me. Now the game can display about 480-500 primitives, which means that complex scenes will be rendered more fully. You can check how many polygons are being rendered, as well as other infos, by pressing F5.

Very good! The degradation mechanism is an interesting way to try and find a balance between the competing needs of the mod. I have done a few quick tests with detail-heavy cars like Zapper's F40 and Ryoma's Jaguar XJ220, and so far I haven't gotten a crash with this latest build.

(And speaking of tests, I drove a few laps on In Your Eyes, and it looks gorgeous with the mod  :) )

Quote from: HerrNove on February 10, 2025, 12:20:25 AMOh, I thought illusion tiles were a deliberate effect of the track designers :D

That's an interesting point  :D While sometimes illusion elements are added for the visual effects (Krys TOFF, for instance, would often use them in the way), in other cases they are mainly used to manipulate track continuity and physics. A memorable example that comes to mind is the half-loop in ZCT274 -- @Argammon might tell us how much of each of those two alternatives applied there  ;)

Then of course there are the quirks of the original rendering, with some illusion elements only appearing as you land on them, missing parts of multi-tile elements being drawn anyway, and so forth. While in the base Restunts port we'd ideally have an exact, "bug-for-bug" reproduction of the original, a mod can of course adopt whatever makes more sense for its purposes.

Quote from: HerrNove on February 10, 2025, 12:20:25 AMI'm playing with these settings and the mod is running very fluid. Granted, I have a good PC but nothing extraordinary (AMD Ryzen 7 5700U).

On my old laptop (i5-7200U), I'm trying the mod with fixed 60000 cycles on DOSBox Staging (a configuration I've been testing lately for separate reasons), and it runs well enough.

Matei

Very impressive, it plays well at 22000 cycles, but the game always freezes on track ZCT037 after a few turns...

Duplode

#65
Well spotted. The crash seems to happen when exiting ZCT037's first banked corner -- maybe because of all the 46-primitive boats that come in sight rather suddenly?

HerrNove

#66
Guys, first of all I want to thank all of you for your help in testing this mod and for the useful infos!

Now, I have no idea about what was causing the freeze. All I can say is this: I have made some changes that, in my opinion, should have no impact on the bug, but after making them I cannot make the program freeze on ZCT037 any more, nor on other tracks. I am not claiming that the problem is fixed, but after trying for 20 minutes with different cars/opponents, on 037 and other tracks, and rotating the camera in all possible manners, Stunts continued to run happily.

I tried a thing that led almost always to crashes before (increasing the memory buffer for primitives to 13K and running up to the first bridge on 4:00am), and this time everything went well, no freezes in 5 attempts.

So here's to you a new build, which seems to be more stable for mysterious reasons and can draw a little more primitives as added perk (560 possible in richly decorated points like the town center of 4:00am). Increasing the memory for 3D objects reduces the resources for other things like car models and cockpits, so it's stil to be tested whether 13K is a good compromise. But I tried it by giving myself and my opponent the demanding Hexa, and it ran fine. Looking forward to your reports.

Quote from: KyLiE on February 10, 2025, 12:48:31 PMI've been testing it again and I noticed a small issue.  When you enable the debug information, the text on the opponent evaluation screen changes to light blue.

Skid speaking with pastel colors is not a small issue! This is now fixed, and the debug infos are now white (turning to yellow/red when the 3D engine is under load).

HerrNove

For my personal reference, the proof that something has changed: yesterday's and today's version showing exactly the same frame from the replay in attachment. The old version froze at this point, the other works fine.

HerrNove

After 48 hours without bug reports, I'm going to nominate my last version as the official release! I'll produce some documentation about it too. Enjoy!

Cas

Earth is my country. Science is my religion.

KyLiE

Quote from: HerrNove on February 13, 2025, 11:43:54 AMAfter 48 hours without bug reports, I'm going to nominate my last version as the official release!

Thanks for the last update!  I'm continuing to test this for potential inclusion in my Stunts Windows installer.  I will let you know if I come across any significant issues.

HerrNove

A teaser about my upcoming writeup about the making of SuperSight. I will produce a long essay for my blog and publish the useful information here in the wiki too.

Thanks to KyLiE for the ongoing testing, I am always available to fix issues as they appear.

You cannot view this attachment.

Cas

Earth is my country. Science is my religion.

Matei

Fix issues? Increase the resolution and the speed; I'm currently using one if these:

https://www.linux-netbook.com/asus-eee-pc-r011px/

"Processor: 1.66 GHz Intel Atom N455"

It's very good, I bought it in 2011 (practically new), but I can't increase the cycles in DosBOX to more than 10000.

HerrNove