News:

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

Main Menu

Cars and tile sizes in Stunts? What do I do?

Started by Cas, July 30, 2020, 08:01:44 AM

Previous topic - Next topic

Cas

Hey, guys. I'm trying to figure out how I should define the sizes of tiles for the new version of my 3D engine and I wanted to make it so that the differences with Stunts were not too big, so that one could, say, race a Stunts track eventually. But when I come to researching what sizes are, I find great inconsistences. Can somebody point me in the right direction?

Basically, there are two approaches as to how to determine tile size. One is what I see has been done in the past and appears in the wiki: you measure the time it takes for a car to race on a road, then measure the length of the road and read the car speed from what Stunts tells you. Take all precautions to maximise precision and calculate the propotion. Doing this, in the wiki, it is estimated that tile length is about 62.5 meters.

On the other hand, a calculation I was making before falling asleep last night, without the computer was this. Second approach. Use common sense and size proportions we know from experience. For instance, I know a car usually fits inside a rectangle of width 2m and length 6m. Typically (and I've just verified this online looking up real cars), an average car can be a little less than 2m wide and between 4 and 5 meters long, but some are less than 4m or slightly more than 6m. Now, we all know that, on a Stunts track, only two cars can fit side by side on a road, so the road must be about 4m wide. The countless times I've been shot up into the air playing Stunts, I've estimated the road width is between a third and a fourth of the tile length. In my renderer, I used a third and it looks pretty much like Stunts. This gives a tile length of 12 to 16 meters.

Of course, I realise that my calculations are not precise and that also, Stunts lies a lot, but I didn't expect the differences would be so huge!  What should I do?  I'm starting from scratch and I want to choose a good tile width that I will have to preserve for the rest of the project. I would also like it to be as metric as possible. What would you guys recommend?

EDIT: OK, now I've just done what I was supposed to do before posting: I went to Stunts and took an F3 view from high above with two parallel roads, my car and the opponent. It seems the road is wider than I thought. Three cars could fit comfortably, four very tightly. So let's say that's 6 to 8 meters wide. With a ruler, that's almost 3 cm wide on the screen, but from a road to the parallel one (both taking from the same point on the road) there are 14 cm. That gives me somewhat less or somewhat more than 30 meters. Still too small!
Earth is my country. Science is my religion.

Daniel3D

If car width = 2
then road width = 10
and tile width = 40

pixel counting (rounded)  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)

Cas

He, he... that's much more precise than mine! Did you count to the exact width of the car?  When I say that a car is 2m wide, I mean it fits in a 2m wide parking place, but is usually somewhat more narrow. Still, even this 40 doesn't get close to the 62.5 of the estimations made with speed calculations.

I've been thinking about this before I slept and I reckon I should take space proportions like these instead of speeds for determining the sizes. Otherwise, it won't look good. It's true, maybe car speeds will not be similar to real car speeds, but proportions are more important when developing.
Earth is my country. Science is my religion.

Daniel3D

I made a selection box around the car. (Sort of parking space, mainly because all car's are different) my selection tool in Photoshop gave it a 1cm with. So I doubled that for convenience. The other two happen to match this so I went with it.

I think that speed was adjusted to 'feel' right.

I've been thinking about this and about the physics of Stunts (the strange and buggy) Vs a real physics engine for your project.

Is it a idea to make both and make it a feature. (Simulation mode or legacy mode) like you could choose between simulation and arcade mode in old race game's.
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

This is something I am going to work on at a later stage, as the project is not even in its "infancy", but to give you an answer, I'd like to implement a feel similar to that of Stunts, although for sure, effects will not be exactly the same, but things like powergear are easy to make on purpose. I think I could make it something that some cars can have or not be design or maybe something that you can toggle in the game menus.

I am not very knowledged as regards cars (both real and from Stunts) so I would probably leave the job of creating most cars or suggesting car features and properties to any of you guys who would like to contribute. From what I read in the wiki and here in the forum, I see that some of the guys are really good at analysing car features... maybe Duplode and Overdrijf are the best at that, but I'm sure all can provide great help :)
Earth is my country. Science is my religion.

Duplode

My two cents on this: I'm not inclined to take the real world counterparts of Stunts cars as references for size, as the correlation is too loose. For instance, contrast...

  • Real Lancia dimensions (mm): 3895 x 1620 x 1355
  • Real Corvette ZR-1 dimensions (mm): 4480 x 1800 x 1190
  • Real LM002 dimensions (mm): 4790 x 2000 x 1850
... with:

  • Game Lancia dimensions (Stressed units): 79 x 34 x 22
  • Game Corvette ZR-1 dimensions (Stressed units): 103 x 42 x 20
  • Game LM002 dimensions (Stressed units): 91 x 34 x 25

Between such inconsistencies and the inescapability of game physics, I prefer taking car speeds as the single point of truth, and working the rest from there. To put it in another way: it doesn't matter much if the cars in your Stunts-compatible game are, say, somewhat smaller relative to the track next to Stunts cars (for instance, cf. Overdrijf's DTM cars); however, shorter straights and sharper corners might be more of a big deal.

(By the way, it is worth noting that, some time after those length experiments described in the Wiki were done, restunts analysis revealed that the mph speeds in Stunts aren't just for display; the engine actually uses them more or less directly. For instance, the limit speed of Stunts cars is defined in the engine code as F500h, which is 245*256. Though I don't remember those later investigations as well as I'd like, for our current purposes it wouldn't be difficult to redo the length experiments with perfect accuracy now that we can feed the resulting replay to repldump and then analyse the data at leisure.)




If we still want to compare Stunts sizes to real world ones, there is a different vantage point we might take. Just the other day, I coincidentally was skimming through FIA's regulations for race track homologation. Quoting item 7.3 of that document:

Quote from: Appendix O to the International Sporting Code
When  planning  new  permanent  circuits,  the  track width foreseen should be at least 12 m. Where the track width changes, the transition should be made as gradually as possible, at a rate not greater than 1 m in 20 m total width.

The  width  of  the  starting  grid  should  be  at  least  15 m;  this  width  must  be  maintained through  to  the  exit  of  the  first  corner  (as indicated by the racing line).

Using the 62.5 m/tile approximation mentioned in the Wiki, the width of a Stunts road is 62.5*240/1024 ~ 14.6 m, which looks quite reasonable next to the FIA guidelines. For another data point, the USA standards for highways dictates 3.7 m wide lanes; 3.7 * 4 = 14.8 m, which again looks pretty reasonable, considering that having four traffic lanes on a Stunts road would fit visually.

Overdrijf

I agree that the roads in Stunts seem to be pretty reasonably designed as race track elements on the scale listed in the wiki. If anything realism might be served by making them a tad larger, not smaller.

However, I also feel like some combination of the car sizes, the view heights, the way the track looks like a two lane road, the general lack of details and some other stuff make the elements seem smaller and slower. The mph figures often feel more like kph figures, and as such the small corners often feel a bit like something you could encounter in your own neighborhood. If you're trying to fix the scale issues in Stunts, I feel like that's the angle I'd come in from, trying to make the game feel more like it models super fast cars on race tracks, like it actually has the scale it has.

Cas

Thanks for your comments, guys!  Let me say that I agree with you profoundly. It always seemed to me that the road in Stunts was narrow in "feel", although looking it from outside, it seems OK, and I also get the feeling Overdrijf describes, that (closed) corners are like a normal street corner rather than a racing track corner. Probably, I'm thinking now, this comes as a consequence of two things:

1 - For simplicity, Stunts has kept road with constant at all times, so, because the road never gets more narrow, it looks like it always is and closed corners appear even more closed.
2 - Stunts 3D engine seems to take the screen dimensions to be larger than they really are. Inside the car, the cockpit view makes it seem like the screen covers maybe half the windshield, but a monitor is a lot smaller than that. We can, of course, take it as downscaling, but then, the focal distance should be proportionally scaled down, which doesn't seem to have been done. Please correct me if I'm very wrong at this.

I agree that car sizes can be disregarded first and adapted later to the model instead of the other way around. What does concern me is the proportion of road width to the tile size. If change that too much from that of Stunts, it will become impossible to reproduce a Stunts track. Something similar happens with ramp angles and heights to tile size. So again, say the road is 15m wide, to give it an exact number of meters. Tile size has to be 3 to 4 times that much, which is 45m to 60m, then. In order to adjust for speeds, we could set it at 60m and road width at 15m, making it 1/4.

Well... this helps a lot, guys. Still, I think we'll have to do some experiments to see how it works :)
Earth is my country. Science is my religion.

Ryoma

Very interesting so a tile is a square of 60 meters.

I will draw a track with 2 skidpad (4 little corner and 4 big corner) in order to estimate the relation between grip and lateral G .

Centripetal accélération is g=v²/r

By default, this value is 211 for all GT in the game.

I increased it at 224 but I don't know if it corresponds. A 90s GT is able to do 0,9G and supercars are able to do 1G. Actual is between 1,1G to 1,2G.

Ryoma

#9
Here my datas :
Little radius about 38mph
Big radius about 78mph
I transform all in m/s

And the result is between 10 to 14G!!!!!!!!!

Edit : oups forgot to divide by G...

Duplode

I think you still have to divide the acceleration by g ~ 9.81 m/s². That would give values in the 1.0 - 1.5G range, which are a lot less scary.

Ryoma

#11
I founded it at the same time when you post...are you in my mind ?lol

So the value of 224 make the car a little more gripable than the reality. I will not change this value.