First the player (big white circle) looks to see if it has direct line of sight on the coin (big yellow circle). If it doesn't it sees if any of points (small white circles) it can see can also see the coin. If not, each point sees if it can see a point that can see a coin. It's trying to complete the path.
It then chooses the shortest path. There are lots of things I plan to add to make it better, but it's surprising good with only 3 length paths.
The white dots are always perpendicular/parallel to the line formed by a red circle and the player. Green paths show possible paths, and yellow is the path the player is using.
It has a 55% success rate.
Charmful™️ Games
Copyright Charmful Pty Ltd 2023-2024
Subscribe to @Stuart-V and @CharmfulGames !
Those other stuff:
Instagram / charmfulgames
Twitter / charmfulgames
Facebook / charmfulgames
LinkedIn / charmful