Bugs
Jeffrey LeBlanc

Description:
I'm interested in making a simuilation of "bugs" that hunt and eat and change.

So Far:
I have the above code where the bugs:
  • hunt food at random seeking speeds
  • grow once they have eaten something
  • lose a segment after a certain period of time if they haven't eaten
  • split past a certain size and pass on their color


  • To Do
  • Right now everything is set as static sized arrays which is a little awkward
  • This causes the eventual saturation of the screen and makes it hard to create swings in population
  • So I want to use ArrayLists to make the program more flexible
  • Also the bugs should interact with eachother. Right now they can pile on top of eachother
  • And currently there is nothing really genetic about any of this
  • My initial idea to spice this up is to have the legs with different periods determined by "genes"
  • This will make some hunt faster than others but there will be tradeoffs, and somehow they will be able to mate
  • Thinking now of how to do this
  • ALSO: needs user interaction, otherwise boring. Some ideas are people can control food, and corral the bugs.
  • In this way people can create breeds of creatures, I don't know, we'll see...


  • Challenges:
  • All the above
  • First implement ArrayLists
  • Then make the bugs interact, probably some collision detection, but based on the legs.
  • I think I'll code a area defined by the legs that other bugs cannot cross.
  • This will also let the leg size change for some bugs which could be an advantage for them yet slow them down...


  • To view this content, you need to install Java from java.com

    Source code: bugsystem a_controls b_system c_food d_organism e_segment f_legs

    Built with Processing