Initial Collision with Planet - Python


#1

Sometimes my first 2 ships collide with the planet instead of closest_point_to() as instructed. Other times they do not. Any suggestions?


#2

You can change the ignore_ships parameter in your navigate function (if you are using Python
) to get around this. Note that the default nav function will perform significantly slower with this value turned on as the number of ships go up.


#3

Note though that the navigate function assumes all the entities it's trying to avoid aren't moving. To really avoid collisions you need to code something a bit more in depth.


#4

Thanks. I had already set the parameter to not ignore ships. I am temporarily moving the ships away from each other before heading to their destinations.
I plan to revise that with a more sofisticated procedure that wastes less time.

But this problem is different. They are independently crashing into the planet that there supposed to go to the nearest point closest to. They don’t stop and just crash. The planets are not moving.
And this only rarely happens. So I can’t reproduce the problem.
This has happened at the start to lose the game, but I have also seen both mine and enemy ships crash into unoccupied planets with no other ships around.

Is there something in the navigate call like max adjustments? Or does it forget to adjust the speed if within 7 units? I might think that it was a function of getting close to timeout with a couple of hundred ships on the map, but that still does not answer the question of why the crash at the start.