News:

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

Main Menu

OPP files (opponents)

Started by Daniel3D, July 09, 2020, 02:55:56 PM

Previous topic - Next topic

Daniel3D

There is a lot known about the oponents. Mainly because of Oponent blaster.
and some new insights with sterssed.

I read in the wiki page conserning the Pre/res file the folowing.
QuoteIn addition to sped, opp?.pre also contains path, a much larger (186 bytes) numerical data resource which function is not yet understood.
I have some ideas about that and i'm about to do some testing (mostly breaking stuff until it works again)

Usually you don't see your opponent because its so damn slow. But i have studied oponent behavior in the past so i could make personal tracks for them that were better than the base game tracks.

I notised that the have a prefered path on the track. On banked roads and in pipes i notised that especially.
Like the useage blocks in pipes because the Oponents always drive like the are there. They don't seem to see the difference.
Quotethe above statment is from a memory long ago, needs validation and could be based on Stunts 1.0

I also would like to try to add opponents if possible. (i don't want to alter the base opponents, nostalgia)
maybe portraid by people that have kept the game alive like Nailwood, Riebisch, Dstien, duplode and CAS to name a few  8)
in de same sense that the original opponents were portraid by employees of IDS.

Just keeping my mind busy...
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

Well, I have to say that, while I've been very active in recent years, especially building Bliss, for half the life of Stunts community, I have been pretty absent. What I mean is, surely other folks deserve the honour of appearing in Stunts better than I, ha, ha.

On the technical aspect, I think that the reason why opponents have not been put much attention on as have cars and tracks is that they're so easy to beat. Of course, we could tweak the files and create personalities, but I'm under the impression that Skid's profile is the base for the other opponents and that each of the other ones has one or more "shortcomings" activated that are all off for Skid. If this is so, what it means would be that Skid is the best possible opponent that can be created for Stunts engine. Disappointing, but I'd be surprised if it weren't so. I mean, if it is possible to make a better opponent, why wouldn't DSI include such opponent?

So, while new opponents likely won't be competitive, I still do find the idea of creating them very interesting and would like to see that happen :)  I can't blame DSI, really. If I were to create an AI for a game like Stunts, I really wouldn't know how to start facing the problem :P
Earth is my country. Science is my religion.

Overdrijf

Quote from: Cas on July 09, 2020, 08:25:54 PMOn the technical aspect, I think that the reason why opponents have not been put much attention on as have cars and tracks is that they're so easy to beat. Of course, we could tweak the files and create personalities, but I'm under the impression that Skid's profile is the base for the other opponents and that each of the other ones has one or more "shortcomings" activated that are all off for Skid. If this is so, what it means would be that Skid is the best possible opponent that can be created for Stunts engine. Disappointing, but I'd be surprised if it weren't so. I mean, if it is possible to make a better opponent, why wouldn't DSI include such opponent?

This is basically the story I heard, for instance from the big Kevin Pickell interview:
"We already know about who the opponents are in real life. Why are them so weak and dumb in the game?

They wanted them to be vastly different, originally they were only slightly dumber and slower but the company wanted to make them more different and the only way was to make them even slower and dumber."

In other words: they started with a single weak opponent, and the only way to add personality on the track was to make them worse.



I don't think technically Skid is the best possible opponent, at least not on all possible tracks. I think all the opponents operate on maximum speeds they will drive at for different types of element. Skid goes flat out on the straights and slow enough that he usually won't crash in the corners. But by allowing a bit more speed in corners you could make an opponent that sets faster times, if he makes it through in one piece at all, while a slower opponent would have a higher chance to finish (unless the problem is that they don't make a jump somewhere because they're moving too slow).

And no, I don't actually know if the car the opponent is driving has any influence on this, if for instance you could make a faster version of skid that just flies out of all corners unless you give him at least a Jaguar.

Daniel3D

#3
I've been thinking.
I think that the opponents driving is done in a similar way as how replays are stored and replayed.

Each track piece has a speed value and a pathway. That gives direction and magnitude.
I don't know how far the 'ai' can see ahead. But I think it is one tile. (Same distance as the placement of corner signs)

The path itself is (I think) based on coordinate like checkpoints.
Stressed can't view this data (I couldn't at least)
So tis is purely speculation on my part.

  8)
EDIT.
After some digging in the file data I have altered my view a little bit. The path is set per tile and stored per tile (combined with collision data?)

The opponent file only contains diffirations from the path. Sid has none, the others have some (based on their weaknesses) and or speed variations.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Daniel3D

#4
I've been looking at the hex path data in the opp#.res (or .pre) files and have been comparing the different opponents.
I noticed that none have the same component with a value. and that there are always groups of 2 or 4 with the same value. (although bernie claims to have problems with all elements, he does not have the ones claimed by the others)
I think therefore that each of the 186 component correspond with a track element and have separate for each orientation.
EDIT:
Quote from: Duplode on May 06, 2008, 04:08:13 AM
186 text IDs associated with individual track pieces.

this are deviations of the path with a max value of 0A (a.k.a. 10 dec.)

considering this, it is not possible to make a much better opponent than Sid (save a speed alteration)
but fun stuff is possible, like a opponent that is afraid of the finish line.

Also it seems that the number of opponents is set somewhere or not all values are known. Its easy to replace a opponent but it seems impossible to add a 7th one.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

Maybe the path to be followed per track element and the maximum/optimal speed at which it should be taken is something fixed that's compiled with the game and the opponents only have information on whether to slowdown on certain track elements. As you say, it'd be super funny to see an opponent slowing down just before the finish line :P  I think I can start exploring and testing to see what happens.

I think very long ago I made a test copying OPP6 files to OPP7 and nothing happened, meaning the game menu is hardwired to give you six different opponents, but... it has happened to me while researching on replay files that, changing the opponent ID number can lead to "file not found", meaning one could make a replay point to extra opponents somehow (perhaps exactly as I did that time, but I don't know because I haven't tested it). This is akin to what happens with the background landscape. Ingame, you can only pick one of the available ones, but in a track file, you can set it to a higher number, which goes chaotic and unstable, suggesting it's reading past some point in memory where landscapes are stored one after the other. Of course it could also be that opponents are identified in memory, but the "file not found" error message hints otherwise.
Earth is my country. Science is my religion.

Daniel3D

As far as I can determine I think that the speed data is only set in the opp#.res file since all speeds are given for all opponents.
The path data is verry limited (skid and helen have no data set in Path)

I've made a overview of the values per opp and the groups if data I see. the are groups of 2, 4 or 6 times the same value.
the groups of 2 are elements with 2 orientations like strait road, the tunnel or the slalom.
the groups of 4 are elements that can be rotated like corners.
There are 2 groups of 6. one on line 0040 and one on line 0060.
I think the first is the pipe (start - mid - end in 2 orientations)
and the second is the bridge. (up - mid - down in 2 orientations)
All the pink groups are probably corners.
Purple elevated roads.
green could be  normal road, dirt and ice.
this is speculation based on very little,

CAS, I hope you can dig a little deeper.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Daniel3D

O my..
Somebody did a AI Investigation on Stunts 2 months ago  ???

thats surprising, but also exactly what i didn't get around to do...
https://www.youtube.com/watch?v=kmP0uAxz8Dc
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

Ah!  I saw that video, I've already been watching it!  From what it says, it's Cherry who's always last because of how slow she's taking curves. The order is completely unlike what one would guess from opponents' order number.

Again, I didn't see your previous message when it came out. Is there a way I can choose which topics to follow or to clearly see when there's something new?  I think I need to flag everything as read so that I can begin to make real use of the "new" marks in this forum!  Any recommendations?  How do you guys do it?
Earth is my country. Science is my religion.

Daniel3D

Quote from: Cas on December 10, 2020, 10:48:58 PM
  I think I need to flag everything as read so that I can begin to make real use of the "new" marks in this forum!
I do just that occasionally for the sections of interest.  8)
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

KyLiE

Quote from: Cas on December 10, 2020, 10:48:58 PM
Is there a way I can choose which topics to follow or to clearly see when there's something new?

I make frequent use of the "Show unread posts since last visit" feature.

Daniel3D

Back on topic  :P
I still think that the 186 Hex values in the matrix are path deviations, Gemini said something like that in his video as well although it doesn't really impact the time .
I think that may also be because the values are very low and the deviation therefore small, except for one case with Bernie of a 0A (aka 10) and 05, only he and cherry have 04. All others have lower or nothing.
Finding out what value is for what track piece can be useful, maybe we can make Sid a bit more careful on some track pieces.

I have a feeling that Bernie has the 0A on the slalom.. But that's just a hunch.

We could tweak the opponents so that they actually drive as stated. (aka lose if their weakness is there and be good on tracks with their strength)
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Daniel3D

Quote from: Daniel3D on December 11, 2020, 02:16:28 PM
I have a feeling that Bernie has the 0A on the slalom.. But that's just a hunch.

Yes, I know. I'm quoting myself...
But I figured it out  ;D

The values correspond with track file data.
http://wiki.stunts.hu/index.php?title=Track_file

Most corners point to Cherri and the 0A of Bernie point to the LOOP.

:D
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

Oh!  That is a discovery!  But... you say 0Ah corresponds to the loop, yet in the Track file article, the loop is 40h or 41h. So what did you mean by that?   It'd be great to be able to produce other combinations for opponents. :)
Earth is my country. Science is my religion.

Daniel3D

#14
Quote from: Cas on December 11, 2020, 06:33:00 PM
Oh!  That is a discovery!  But... you say 0Ah corresponds to the loop, yet in the Track file article, the loop is 40h or 41h. So what did you mean by that?   It'd be great to be able to produce other combinations for opponents. :)

Indeed, row 40 : position 0 and 1 are 40 and 41
The variable for that path is 0A in Bernie's path data.
8)
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)