Stunts Forum

Stunts - the Game => Stunts Reverse Engineering => Topic started by: Daniel3D on May 05, 2022, 02:57:59 PM

Title: Geometry height anomaly.
Post by: Daniel3D on May 05, 2022, 02:57:59 PM
The new version has a bug.. (Admin edit: this refers to an already replaced version of Zapper's KITT (http://forum.stunts.hu/index.php?topic=3636.0).)

In the new version it crashed. In a cracked stunts.com it crashed to but different.
In stunts_k (neverlock) it loads but missing track elements.. (no start, no hills. I see the windmill floating ahead.)

Very interesting. But I can't research it without my computer. 

Edit: I drove around a bit. (See screenshots)  and it's weird. Track pieces sometimes appeared late, hung elevated, then dropped down again.
Title: Re: Geometry height anomaly.
Post by: Cas on May 06, 2022, 01:04:33 AM
This is very interesting. It looks like a memory corruption problem that's non-fatal if Neverlock is loaded, probably because being it in memory causes Stunts to be loaded somewhere else or to split its memory usage into two regions or to put together two regions that would be split otherwise. It appears that the memory region where tracks are resolved (that is, converted to 3D track elements) gets overwritten by something from the car. We could separately try replacing each of the new files with its corresponding old one to see where the problem lays, although, Zapper, you know what changes you have made and will surely have a better idea of what could be causing this. I don't think this can be exploited in any way, sadly, precisely because it doesn't impact the game the same way depending on what's loaded before it. But the effects are really very curious!
Title: Re: Geometry height anomaly.
Post by: alanrotoi on May 06, 2022, 01:11:24 AM
Stunts multiverse :)
Title: Re: Geometry height anomaly.
Post by: Zapper on May 06, 2022, 02:15:01 AM
Hello you all,

Something went wrong saving the RES file using the latest version of Stressed. The placement of resources in the file was changed so I remade the mod with the HEX editor.

Thanks for your prompt feedback.

I've replaced the bad released zip with a new one in the recent post link (http://forum.stunts.hu/index.php?topic=3636.msg85284#msg85284).

Sorry for the inconvenience.
Title: Re: Geometry height anomaly.
Post by: Daniel3D on May 06, 2022, 07:36:45 AM
Quote from: Zapper on May 06, 2022, 02:15:01 AM
Sorry for the inconvenience.
inconvenience?? No. It was amazing.
The most beautiful bug ever.
It was just visual weirdness.
The track was drivable like normal.
Title: Re: Geometry height anomaly.
Post by: Daniel3D on May 06, 2022, 09:07:57 AM
Looking at it again with a lot of switching between camera angles I believe only one value is affected. The height value of the drawn geometry. That is either 0 or 1. That seems to be changing when loading between far and nearby geometry.
Title: Re: Geometry height anomaly.
Post by: Cas on May 06, 2022, 08:45:29 PM
It's true!  Only the height. So those parts where the track is missing and there's only grass, actually the road is there, only it's higher. I hadn't noticed it! XD
Title: Re: Geometry height anomaly.
Post by: alanrotoi on May 06, 2022, 09:08:25 PM
Now the question is how high? Is it possible to build a super elevated road?
Title: Re: Geometry height anomaly.
Post by: Daniel3D on May 06, 2022, 09:35:40 PM
I thought something like that when I was reading the code.
I found a height modifier. But it only accepts 0 and 1 as far as I can tell. Any higher and it crashed. But I never tested with the stunts_k. So maybe it just alternates (odd or even).
I'll make a new topic for it and stop polluting this one.
Title: Re: Geometry height anomaly.
Post by: Daniel3D on May 06, 2022, 09:47:47 PM
@Zapper.
Are you ok with me attaching the corrupted version of your car for those who want to research this?
Title: Re: Geometry height anomaly.
Post by: Zapper on May 06, 2022, 11:36:41 PM
Quote from: Daniel3D on May 06, 2022, 09:47:47 PM
@Zapper.
Are you ok with me attaching the corrupted version of your car for those who want to research this?

Hi @Daniel3D, unfortunately I replace locally the bug version with a corrected one...
I also tried to reproduce the bug, without success.

The file attached, when I post the initial mod version, had the following url:
http://forum.stunts.hu/index.php?action=dlattach;topic=3636.0;attach=9777 (http://forum.stunts.hu/index.php?action=dlattach;topic=3636.0;attach=9777)
...but it's now unavailable.

Do you have the zip file somewhere in browser's transfers folder?
Title: Re: Geometry height anomaly.
Post by: Daniel3D on May 07, 2022, 08:16:17 AM
I have a backup of the car.
I renamed the zip file so it is recognisable.
Title: Re: Geometry height anomaly.
Post by: Daniel3D on May 07, 2022, 12:30:43 PM
Quote from: Zapper on May 06, 2022, 11:36:41 PM
I also tried to reproduce the bug, without success.
Neither can I. It is a curious and interesting case.

It gives insight into the split between graphics engine and collision engine.  At least that is my current view.

Notable observations.
Title: Re: Geometry height anomaly.
Post by: Cas on May 08, 2022, 12:32:23 AM
Could it be that wall is shifted up for the tiles in which plan is not and vice-versa?  Haven't yet tested that crazy assumption :D