|
Author |
Topic: Bug Talk (Read 595 times) |
|
Mike Davis
|
Bug Talk
« on: Nov 10th, 2003, 6:03am » |
|
Bug Talk http://www.lightcycle.org/workspace/bugtalk/index.html Bugs jet around blindly looking for food. Whenever a bug finds food, it transmits its location to a few other bugs who are then attracted to its position. Overall, this leads to swarming behavior. After I clean up the code, I'd like to make this a platform for sketches that investigate how agents can prosper by communication with others rather than sensing the environment.
|
|
|
|
benelek
|
Re: Bug Talk
« Reply #1 on: Nov 10th, 2003, 7:44am » |
|
is it just me, or do the bugs seem to be dying off after a while in this sketch...?
|
|
|
|
Mike Davis
|
Re: Bug Talk
« Reply #2 on: Nov 10th, 2003, 10:16pm » |
|
You're right, they are. I can't track it down. The population is implemented as an array of objects, and in loop() I run through the array to update and draw each object. I've checked that: I'm always running though the whole population; object references aren't getting copied, removed, or becoming invalid; and bugs aren't overlapping and following the same physics, appearing to be a single bug. Out of ideas and free time; I'm hoping that once I start trimming the code down I'll figure it out.
|
|
|
|
flight404
|
Re: Bug Talk
« Reply #3 on: Nov 11th, 2003, 12:06am » |
|
So, what you are telling us is that you have a bug, no?
|
|
|
|
Mike Davis
|
Re: Bug Talk
« Reply #4 on: Nov 13th, 2003, 2:45am » |
|
I've uodated with a fixed version. I was dividing by zero in some cases ... being primarily a C++ programmer, I had expected such an operation to halt the program rather than just make the containing object unusable.
|
|
|
|
vent
|
Re: Bug Talk
« Reply #5 on: Nov 13th, 2003, 3:28pm » |
|
I just stared at this for about 5 minutes straight. Its quite hypnotizing. Nice work.
|
http://www.shapevent.com/
|
|
|
|