The main difference is now that the check for walls is only done closer to the fish and, to compensate lacking foresight, walls trigger stronger intention to turn.
Additionally, wall vision works slightly differently now, because it's not one vision set (angle) but two distance sets (left: close/far, right: close/far). This
should enable a wall being both left and right (e.g. when swimming in a tunnel) and hopefully lead to a bit straighter trajectory in such cases.
Also, fishes now don't swim 100% straight when they have no sensory input. That looked rather strange in a huge ocean.
PPS: also reduced slimness of fish. Very slim fish looked stupid.
libpng >1.6 keeps nagging because of that.
Quick bash script to do so:
find . -name *.png \
| while read f; do
n=$(pngcrush -ow -rem allb-reduce "$f" 2>&1 | grep -c 'incorrect sRGB');
if [[ $n -gt 0 ]]; then
git add "$f"
else
git checkout "$f"
fi
done
The old implementation was buggy as it would disallow the location if it had too much space (and PathFree2 returns nil). It also doesn't make sense to ask for a location that has space in either direction of a dimension because the location is not automatically adjusted to lie at the center of that space. For example, it would effectively cause fish to spawn directly at walls sometimes.
Renamed CreateObject() to CreateObjectAbove() and replaced all occurrences in script files.
Added CreateObject(), the function may need a rewrite though, see comment in code.
Updated documentation