Select your language

New Ricardo Tormo circuit

I've spent all my free time this week making a circuit as realistic as possible with the resources of the Spirit or Eternal Racer game engine. Actually, I've also invested some time in expanding those capabilities to be able to achieve a greater likeness.

I'm telling this whole story because, in the end, a doubt arises for me: to what extent is it worth it? This isn't a simulator, it's not a 3D game, there's no physics engine as such. But, on the other hand, I've always wanted it to be an arcade game including some simulator similarities. So, having tracks where a car with certain characteristics corners and reaches speeds similar to its real-world counterpart is something I wanted to have, no matter what.

I have to say that after these days' work, I'm happy with the result. Now I can paint more things on the sides of the road, better imitating the appearance of a circuit's runoff areas, its curbs, etc. To show you, before getting into details, I invite you to press the button that starts the two videos ("Reproducir ambos") below.

And now for the details

I think I've already mentioned that I want the game to be modifiable (via mods) by anyone, and the representation of the tracks is an essential part of that.

In the game, the tracks are created using a JSON file that is interpreted to paint the road segments, whether they are curves of any degree or straights. Once I have the sequence of sections, I have a tool that visualizes the track in 2D, like a blueprint, and gives me a reference of the similarity to the actual layout. It's made a bit empirically when it comes to representing curves, but I usually modify the track until I can see a good likeness, even if the layout doesn't close, or the length it indicates isn't exact.

With the track done, the game paints the curb and then the grass with predefined, constant colors for the entire track. This didn't offer many options, but to simulate a game of this type, it seemed sufficient. Until now, the similarity to reality was achieved through the objects (sprites) you load on the sides of the road, and a fundamental part of those are the trees.

Knowing this, and already with the intuition that it wouldn't be enough, I started to model the Ricardo Tormo circuit (you can tell I'm from the "Terreta" [my homeland]). But this track isn't one that goes through a forest; it has about three areas where you can see trees, and the result looks quite poor. Seeing this, I focused on adding the grandstands and the barriers that are all along the track in the form of fences and tire stacks, but I still didn't like how it all looked. In fact, it was a bit worse than I had imagined. Not even the main straight, which had more details, ended up fitting what I wanted.

Fortunately, I was clear on what I could do. First, I needed all the elements I can paint (curbs and the outer area, i.e., grass) to be able to be different on the left and right. Additionally, I was going to divide the outer area in two, to be able to have combinations of grass plus asphalt (for example). With all that, it seemed I had enough to imitate this track. On it, the curbs sometimes disappear and become simple white lines, flanked on occasion by red or green asphalt and at other times by grass.

There are many combinations, and the system isn't perfect. In the videos, you can see both cars going through certain corners in a very similar way, and other corners where the lines could be more alike. I also have to say that I could add more detail with this system I've developed by dedicating more time to it, but I return to the initial question: to what extent is it worth it?

Possible improvements

Apart from the above, more things always come to mind when you embark on a process like this. There are some things I want to improve, but others would require more time and code changes that, for now, I'm going to save for the future. For example, among those I could improve are the colors of some of the "shoulders" (runoff areas) that don't match what is seen in the onboard videos. I could also try to improve the grandstand sprites, doing some tests by tweaking their size to see if they create a better effect.

Among the things I don't think I'll implement are adding more logic to the code, such as, if there's asphalt after the curb, the car shouldn't lose speed. Another thing I have in mind is for the road to have braking marks or to mimic some texture. Lastly, a more complex sprite system that could imitate the rotation of buildings and grandstands. There are some other ideas floating around that don't come to mind right now but, in the end, the fact that any addition adds complexity and CPU time also weighs heavily, and I want to keep the result playable on an Amiga with Pistorm.