Coders Strike Back

Salut à chacun,

J’ai une question sur le règlement du concours,

Es ce qu’il faut que chaque pod passe par son prochain point en moins de 100 tours ou un seul pod suffit ?

Je vous remercie,

The rule states: If none of your pods make it to their next checkpoint in under 100 turns, you are eliminated and lose the game.

Es ce que c’est possible de savoir pour quelle raison nous sommes éliminé ? Par exemple dans la console ?

You should switch to debug mode.

oh, yes, Thank you.

In relation to what is given then angle value in input ? In other term, what is 0° ?
Also the angle value seems unvalid at first turn (-1 for all pods), is it normal ?

Thanks :slight_smile:

The 0° angle is horizontal to the right clockwise

1 Like

Thanks for your reply. I agree that the measure is clockwise.
Nevertheless from what I see, horizontal right is more like 20° or so…

It’s missing in the Rules that pod speed is multiplied by 0.85 after each turn (drag).

1 Like

Can you tell me whether angle value is rounded or truncated after all the math?

The animation sometimes stop working and I need to refresh the browser (I use a webkit-based browser).
There are some errors in the browser console:

TypeError: undefined is not an object (evaluating '$("#navigation").position().left') 4fbf7562.codingame.js:46
TypeError: null is not an object (evaluating 't.worldTransform.applyInverse') undefined:8
TypeError: undefined is not an object (evaluating 'frames[frameNumber].currentKeyFrame') undefined:1765
TypeError: undefined is not an object (evaluating 'frame.collisions') undefined:1909
TypeError: null is not an object (evaluating 't.worldTransform.applyInverse') undefined:8

It would be nice to fix these issues.

Thanks for the bug report @bouanto. Do you have a process that could help us to reproduce the problem? Is it with a particular code or against any particular opponent ?

I play against the default AI in the IDE.
I paste code in the editor and click on “Lancer mon code”.
After a couple of times, the animation stop working.

I’ll try to notice when I see these errors.

Tanks! We are going to start from these steps

I think I found what causes this issue.
I clicked on “Lancer mon code” as usual and the following error was shown:

main is not a function

So, perhaps when there is an error (from the compiler), the challenge stop working.

By the way, it happened using the Rust programming language and the code compiles. Clicking on play again shows the output (but not the animations).
I’ve often seen this error (main is not a function) when doing previous challenges.

So here are the steps to reproduce this issue:

  • Choose the C++ language.
  • Remove all the code in the editor (to cause an error).
  • Click on play.
  • Put the code back in the editor.
  • Click on play.

You will see that the animations are not working and the errors in the browser console (I was able to reproduce this issue in Firefox and a webkit-based browser).

Thanks to fix it.

The rule is not correct in all the situations :smiley:
Not a big deal tho

What’s the problem with this replay?

I think that it breaks the 100 turn no checkpoint rule
{I might be wrong though}
pls dont get angry on me
I am sorry if I am wrong :slightly_smiling:

No it’s not breaking the rule, as at least one pod is passing through checkpoints.

I have a question about the power, how is it related to the change of speed ?
I mean if I have a speed of 1,and a power of 100,how do I estimated my next turn speed ?

1 Like

Suppose the pod is at 1000,1000 (x, y), the speed is 1,0 (vx, vy) and you want to go to 2000,1000 with thrust 100.

At end of the turn you have:

Pod at 1101,1000 ( 1000 + 1 + 100) (only horizontal move, because angle is 0)
Speed = 85,0 ( 1+100 = 101 -> 101 * 0,85 = 85 (trunc) )

0,85 is the “drag coefficient” after each turn.