Morning report
Nothing like as much achieved yesterday as hoped. Adding the treasure ship has revealed some engine weaknesses which I'm plugging. The latest is in the AI and how it evades objects.
As people, we can look at a scene and know what's happening, but computers can't (although they're learning!). As a programmer, you have to use the mathematical abilities of the computer to form decisions, which typically involves thinking in straight lines - is there anything in front of me? What angle is it moving relative to my motion? How long until we collide? How long will it take to turn away?
This can get very intensive on the system if you're not careful so we have to use shortcuts when we can. For one, we don't test all the time but every little while. When it comes to evading rocks and scenery, I have used a shortcut that, when an obstacle is encountered, the AI ship will turn towards the opposite direction for a fraction of a second. It's worked fine but my ships have all had moderately speedy turning rate. The treasure ship is slow and ponderous, and this evasion solution has resulted in it turning in circles because that fraction of a second is too large.
That means I need a new solution, and so I'm thinking up lots of different solutions, things I want to do, and then rejecting them as too intensive, and trying to come up with some efficient algorithm that'll work but not slow the game down.