A pill that speaks

In world that I am creating every pill needs to fill its needs. As you may remeber from previous post, there are two basic needs implemented right now – food and water.

These needs will be possible to refill at „Need refill stations” as I call them now. I am not 100% sure how the refilling process will look at the end, but that is not today’s post subject. Today I will tell word or two about implementing communication between pills.

So firstly – why?

Well, communication is one of basic skills of intelligent lifeforms.

Secondly – how it works?

To be totally honest, o took the cheap and easy way of giving them telepathy. Every agent stores two lists of objects. First one is list of „Friends” – these are object that pill already met. Second one is list of known need fulfillers –  objects that pill will go towards when coresponding need fullfillment value is bellow the refill trigger value.

Now whenever two pills met, two big things are happening.

  1. Pills are chcecking their friends list, to check if the other pill is there. If not, pill is added to list and becomes friend.
  2. What follows friendship status check is information exchange. Both pills are exchanging informations about known need fullfillers, and update them if there is need to do so.

Information exhange occurs also when one of pills meets new need fulfiller.

That is basically it. It may not seem as much, but it looks like good starting point.

I have to admit, the project is a bit of clusterfuck right now. Coding without plan is can be at times a crazy fun, but this time I want my project to serve some purpose (even if that purpose is weird and uncommon). So I have a question to all reading – what kind of planning method do you use in your personnal projects? And how do you set goals in these projects? Are these goals clear or fuzzy?

Oh, all code is already on GitHub.

PS. The question stated at the end of post was also tweeted. If you are into tweeting, feel free to respond me there!


A pill that speaks


Wprowadź swoje dane lub kliknij jedną z tych ikon, aby się zalogować:

Logo WordPress.com

Komentujesz korzystając z konta WordPress.com. Wyloguj / Zmień )

Zdjęcie z Twittera

Komentujesz korzystając z konta Twitter. Wyloguj / Zmień )

Zdjęcie na Facebooku

Komentujesz korzystając z konta Facebook. Wyloguj / Zmień )

Zdjęcie na Google+

Komentujesz korzystając z konta Google+. Wyloguj / Zmień )

Connecting to %s