Using the previous rewritten creatures code, I am trying to extend the creatures to use eyesight to make decisions by adding perception rods into the logic.  Each creature will have around nine rods in the direction of the front of its body, and each rod will tell it what the rod is seeing, if the rod hits an object.

creatures_eyes

This is still work in progress, as in the future I want to incorporate a neural-network like brain into each creature and train it to avoid poisonous preys, attack other creatures and fight for resources.