Set proper exploration limit for path finding

The exploration limit for path finding was lowered to some guess
depending on the screen size.

Also the hardcoded 1000 in Avatar was removed.

This fixes #658.