Mad Pod Racing - Puzzle Discussion

I have been upgraded to Bronze league and now there is collision as well.
How do I utilize this collision thing to move to next league?
If I just try to collide with other ships, that’ll affect my speed as well, right?

You can utilize by disturbing enemy pod’s movement and its trajectory path .

1 Like

Like MrAnderson said in a previous post:

You can begin to think about collisions in silver. It’s not very important for bronze.

2 Likes

Won’t that affect my speed as well?

Drag your pod check if you made your pod thrust 0 then can it make to checkpoint if yes then make thrust 0 and aim towards next checkpoint .

I’m in the wood 2 league in javascript and I seriously don’t get how i’m supposed to beat Boss 2. Sorry but I suck

If you lose too often to the other players and no longer have any idea how to improve your bot, you can watch replays and see what makes it fail when your bot loses.
For example, if you just keep flying to the next checkpoint at 100, you lose because you are flying past nearby checkpoints that are at a very large angle to the pod.
Therefore, you should consider reducing your speed when there is a large angle difference and a small distance.

1 Like

Wow it worked! Thanks so much!

how you jump to Silver?

There are plenty tips in this thread, which could help you, like:

2 Likes

how can I do that -> * Turn towards the next checkpoint before you reach the current one (skid through the checkpoints)

1 Like

Track which checkpoint(CP) you have to target after reaching the current one.
For example if you have to reach CP 1 your next CP is 2 (be careful with the last CP for the lap). At some predefined distance, before reaching CP 1, output the coordinates of CP 2. This way your pod will use the inertia to drift through CP 1 and turn to CP 2 simultaneously.
Experiment with different values for the predefined distance, it shouldn’t be very big, because otherwise the pod will skip CP 1.

1 Like

I seem to have been involuntarily promoted to Gold, negating all my progress on programming for the simpler case. Is there a way to go back to Silver till I am ready to move up?

Sadly no, there’s no way to go back nor even to reinitialize the game…

Hello,
I’m in Wood and I have to use "the Boost ".
I don’t understand why in my code, the game use severy time Boost and don’t read.
Can you help me please?

Explain your problem clearly can’t get what are you saying.

Program doesn’t read my condition BOOST if I write two “if”. I have tried severy time but nothing doing it.
Can you tell me where I missed?

Here my code :slight_smile:

int main()
{
    // game loop
    while (1) {
        int x;
        int y;
        int  thurst = 0;
        bool hasBoost = true;
        char tab[6] = "BOOST";
        // x position of the next check point
        int next_checkpoint_x;
        // y position of the next check point
        int next_checkpoint_y;
        // distance to the next checkpoint
        int next_checkpoint_dist;
        // angle between your pod orientation and the direction of the next checkpoint
        int next_checkpoint_angle;
        int opponent_x;
        int opponent_y;
        scanf("%d%d%d%d%d%d", &x, &y, &next_checkpoint_x, &next_checkpoint_y, &next_checkpoint_dist, &next_checkpoint_angle);
        scanf("%d%d", &opponent_x, &opponent_y);

        // Write an action using printf(). DON'T FORGET THE TRAILING \n
        // To debug: fprintf(stderr, "Debug messages...\n");


        // You have to output the target position
        // followed by the power (0 <= thrust <= 100)
        // i.e.: "x y thrust"
        
         
         if( hasBoost && opponent_x > 100)
         {
                 hasBoost = false;
                 printf("%d %d %s\n",next_checkpoint_x,next_checkpoint_y,tab);
         }
        
         if((next_checkpoint_angle > 90) || (next_checkpoint_angle < -90))
         {
            thurst = 0;
            printf("%d %d %d\n", next_checkpoint_x, next_checkpoint_y, thurst);
         }
         

         else  {
            thurst = 100;
             printf("%d %d %d\n", next_checkpoint_x, next_checkpoint_y, thurst);

        }
    }

    return 0;
}

The problem is that you print twice in the same turn, your program must print only one command per game loop turn.

2 Likes

I had ever tried but hasBoost stay in “true” and only Boost is activated…
Here code :slight_smile:
It’s a test , BOOST has been replaced by 60.

if( hasBoost && opponent_x > 200)

     {

             hasBoost = false;

             thurst = 60;

            

     }

    

     else if((next_checkpoint_angle > 90) || (next_checkpoint_angle < -90))

     {

        thurst =0;

       

     }

     

     else  {

        thurst =100;

    

    }

          printf("%d %d %d\n", next_checkpoint_x, next_checkpoint_y,thurst);

     

}

Your ‘hasBoost’ variable is declared and set to ‘true’ in the while loop, so it doesn’t matter that it is set to ‘false’ in your condition, you set it back to ‘true’ next turn…

1 Like