The robot pathfinding algorithm isn't that good, but the code has several improvements:
- Collision detection is now done by querying a bitmap, and that means you can draw your map instead of writing a linked list!
- Any pixel with alpha value
>0is considered "solid"
- Any pixel with alpha value
- Added a separate mode which mathematically reproduces a differential driving system (turn on with
C, off withV)- While in this mode use
QandAto control the left wheel andEDto control the others - Otherwise use
UPDOWNLEFTRIGHT
- While in this mode use
- Added (semi transparent) breadcrumbs to where the robot has been
- Added a primitive tangent calculation and thus the angle of incidence of sensors hitting the wall, then visualising it (green + red lines above)
- Added a speed and direction bar
