I’ll keep this simple.
I have a scene in which a robot runs around an “arena”. It has two bump sensors. When a bump sensor comes into contact with the arena, it registers a collision with that sensor, and backs up and moves accordingly.
I already have code for precisely locating the position of the sensor when it hits something.
What I want to do is:
Have the robot run through the arena for a while, and everytime it bumps into an object (there are “rocks” in the arena), to write that exact location (x,y) to a list of some sort, or perhaps an array. Idealy I would like to write each value to an external text file.
This is where the cool stuff comes in. I am going to use the newly created “bump map” to tell the next robot where not to go.
I just can’t think of a good way to make a giant list of variables like I would need here. If only I could save the traces for these variables…
Any ideas for getting this huge variable list?
Just for fun here is an early version of what I am talking about (just the robots bouncing around). Code is not perfect so sometimes they escape. They also have an affinity for that light, so you can play around with that.
Thanks in advance.