Post news RSS Solving checkpoints issues

In Formula Wincars, not only will there be a lot of hidden shortcuts in every circuit, but there will also be alternative paths in your way to reach the finish line. This provides much mode depth, diversity and fun to the game, but it brought a new problem....how can we know which player is in first position when they're not even following the same path? The solution is in this post!

Posted by on


Has someone told you that FW’s circuits are linear? Not at all! Each circuit has shortcuts and alternative paths for you to choose your favorite one!

You will have the power to decide which path is better for your driving style and skills and for your configuration in that race.

Some of them will be long for you, some of them might be harder to you, some of them have coins for you, all of them will be tons of fun!

There are some shortcuts that require the use of a specific special skill to be able to take them, so be sure you know the circuit to make your strategy counting on these requirements!

Some of these shortcuts and alternative paths share common checkpoints and if something hits you or you lose control, you will be respawned in the same spot independently of what path you took. This is usually the case for very close paths or small shortcuts.

This looks easy but there are other cases where it is not that simple. There are circuits with really long paths that take very different ways.

In order to support these extreme cases we had to upgrade our checkpoint system. Remember Eduardo told you about it? If you haven’t read it follow this link to the original post.

To make the checkpoint system completely fail-proof we create a box between one checkpoint and the next one and check if the player is inside that box. With this system we had to store a reference to the next checkpoint for every checkpoint in the circuit.

It was all right and the system was working like a charm, until the long alternative paths came along. How can you look for the player between the next checkpoint’s path when there are more than one path? Well, this one is not so difficult, gotta check’em all!

Actually, that is what we do, we check all the possibilities where the player can be, checking all the paths looking for the current position of the player.


Now we have located the player and we can compare their position with the rest of the racers. But... prepare for trouble! Make it double!

Different paths will have different lengths, how can we say you are in position 3 and your opponent is in position 4 if you are going through such differect paths? Here comes the trick (tananana ♪♫), we will take it as just one checkpoint from the split to the join of the paths.


This way both of you will virtually be in the same checkpoint and the algorithm will evaluate that you are at the same level. To improve it we have to see which one has gone across the most part of the path and to do so we divide the paths in several inner checkpoints.

If you are in the alternative paths that split from checkpoint 9 and have passed three of the four inner checkpoints of your path you will be in the checkpoint 9 and 3/4. Let’s say your opponent has passed two of the five inner checkpoints of their path, they will be in the checkpoint 9 and 2/5. You are winning!

That is how we have dealed with alternative paths and shortcuts in Formula Wincars. It is one of many alternative solutions, like our circuits!

Stay tuned for more news about Formula Wincars!

Post a comment
Sign in or join with:

Only registered members can share their thoughts. So come on! Join the community today (totally free - or sign in with your social account on the right) and join in the conversation.