Mad Pod Racing. Wood 2 league - Obsolete data
Hi!
Mad Pod Racing. Wood 2 league - Obsolete data
map=4000 3000 12000 3000 8000 6000
Opponent Boss 2
I really enjoy Mad Pod Racing.
Here is something i don’t understand.
I’m using Java.
Turn 54/168
It Says Lap 1/3 in top left corner.
Checkpoint 0 is lit. On screen the pod body is outside checkpoint 0 area.
Turn 54 debug output:
Position 3993, 3743 ← Y 3743 says pod is outside checkpoint 0 area.
Speed -295, -325 ← Difference in x and y positions from last turn?
Target 4000, 3000 ← This is the x, y position of checkpoint 0.
Turn 54 standard error stream:
pod position 4341 4126 ← This is different from debug output. Old data?
target 4000 3000 ← Target checkpoint 0. Same as debug output.
nextCheckpointDist 1177 ← Correct. But calculated from old data?
nextCheckpointAngle 9 ← Visually this isn’t right. Should probably be 17?
gameLoop 54
Turn 55
Lap 2 starts. Lap 2/3 in top left corner.
Checkpoint 0 light is off and checkpoint 1 light is on.
On screen the pod body is inside checkpoint 0 area.
Target is still checkpoint 0. Both in debug output and in standard output stream.
This move will be towards the wrong target.
Turn 55 debug output:
Position 3699, 3333 ← X, Y says the pod is inside checkpoint 0 area.
Speed -250, -348 ← Should be x -294, y -410?
Target 4000, 3000 ← Obsolete data from turn 54.
Turn 55 Standard error stream:
pod position 3993 3743 ← Obsolete data from turn 54 debug output.
target 4000 3000 ← Obsolete data from turn 54.
nextCheckpointDist 743 ← Obsolete data from turn 54 debug output.
nextCheckpointAngle 17 ← Obsolete data. Should be 87.
gameLoop 55
Turn 56
Both debug output and standard error stream gets new target. 1 turn too late.
Turn 56 Debug output:
Position 3476, 2904 ← debug ouput posisions always seems right
Speed -189, -364 ← I don’t know whats wrong here.
Target 12000, 3000 ← Right values but 1 turn too late.
Turn 56 Standard error stream:
pod position 3699 3333 ← Obsolete. Always 1 turn late.
target 12000 3000 ← Right values but 1 turn late.
nextCheckpointDist 8308 ← Calculated from old data.
nextCheckpointAngle 87 ← Obsolete. Always 1 turn late.
gameLoop 56
Sorry about the indenting. Its this editor or the browser.
Best regards!
Game code:
import java.util.*;
class Player {
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
int gameLoop = 1;
// game loop
while (true) {
int x = in.nextInt();
int y = in.nextInt();
int nextCheckpointX = in.nextInt();
int nextCheckpointY = in.nextInt();
int nextCheckpointDist = in.nextInt();
int nextCheckpointAngle = in.nextInt();
int opponentX = in.nextInt();
int opponentY = in.nextInt();
System.err.println("pod position " + x + " " + y);
System.err.println("target " + nextCheckpointX + " " + nextCheckpointY);
System.err.println("nextCheckpointDist " + nextCheckpointDist);
System.err.println("nextCheckpointAngle " + nextCheckpointAngle);
System.err.println("gameLoop " + gameLoop);
gameLoop ++;
System.out.println(nextCheckpointX + " " + nextCheckpointY + " 85");
}
}
}