Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Hurray the old forum is live, check out my cellular automata!

Discussion in 'General Discussion' started by MD_Reptile, Jul 12, 2016.

  1. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,663
    Note: I know this is general section - Just wanna share this here and celebrate the good ol' forum being up at the same time :)

    I figure you guys are all feeling pretty good about being back here at our beloved functional forum, and that means it is the perfect time for me to share a little side project I been working on, a cellular automata similar in nature to say, langston's ant, or conway's game of life, or perhaps even a little simlife snuck in there. Here is a WebGL player if you feel so inclined:

    (for me, this only works with Firefox, not chrome, not IE...)
    https://dl.dropboxusercontent.com/u/76853021/WebGLBuild/index.html

    And a few GIFs:





    Long live the old forum! Enjoy my silly little automata!

    EDIT: Rules of the automata "ants" (updated for teams version)

    In this little game, there are small circles and triangles representing "ants", and small green squares representing the world. The world is randomly generated based on the dimensions of the sliders at the top when you hit the reset button. The ants can move freely each "frame" or "tick" of the simulation. Ants can be either male or female (50 percent chance), and when two males from different teams come close, the more aggressive male will possibly attack and kill the less aggressive male. If a male ant comes close to a female from any team, they will potentially mate, and if successful, the female will potentially produce a new ant, which will be a hybrid color (secondary color) of its parent ants if they are primary colors, or be a hybrid if it has hybrid parents. An ant has a set lifetime, which varies (between TotalLifeTime + (-halfOfTotalLifeTime) and TotalLifeTime + halfOfTotalLifeTime) from ant to ant. Ants can't pass through ground tiles (green), only through clear background tiles (white in this case). You can adjust the world width and height then reset to regenerate the world. You can also add ground tiles, or background tiles, and new ants of the primary colors. When ants are first born they are solid colored, and when they are old enough to mate they have a black border. When they are old and close to the end of their lifetime, they have a darker shade of their team color for a border. It is experimental, there are probably bugs, and it can be laggy a bit. Have fun!
     
    Last edited: Jul 14, 2016
    mgear and Gekigengar like this.
  2. CaoMengde777

    CaoMengde777

    Joined:
    Nov 5, 2013
    Posts:
    813
    um... arent there ALOT more females than males in an ant colony?
    lol
     
  3. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,663
    Indeed there are. The males fight for dominance sorta, so you gotta turn down the attack chance to prevent that happening too much. It's not meant to simulate actual ants, I just call these agents "ants" like as a nod to langstons ants, the cellular automata.
     
  4. Gekigengar

    Gekigengar

    Joined:
    Jan 20, 2013
    Posts:
    702
    Whoa, reminds me of the days when I were to spend my days as a child watching ants, and understanding how they work. Sometimes I add obstacles and stuff, to obstruct their work, or gave them food and see them gathering.

    Also really enjoyed playing Game of life as a kid.

    Looks like it could be a potentially fun sandbox game, keep improving it, maybe this can get somewhere huge! :D
     
  5. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,663
    Here is how I want to get it works now. Males are triangles, females circles, solid color for "young", black outline for "adult", and dark color outline (matching team) for "old".

    Now using primary colors for "teams" and secondary colors for hybrids of the teams:

     
    Last edited: Jul 14, 2016
  6. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,663
    Bump - fancy new look and fixed little problems here and there:



    Challenge mode doesn't work yet :X
     
  7. I_Am_DreReid

    I_Am_DreReid

    Joined:
    Dec 13, 2015
    Posts:
    361
    Thank gawd they went back to using the old fourm style. The new look was an eyesore.
     
    MD_Reptile likes this.
  8. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,663
    I hear ya, my eyes didn't much like it. I saw there was a way to hack it up into a dark theme, but I didn't feel like going to the trouble.
     
  9. I_Am_DreReid

    I_Am_DreReid

    Joined:
    Dec 13, 2015
    Posts:
    361
    I had to be wearing reading glasses just to use the site. Then on top of that i couldn't post or start any threads although i recently got over that issue today.
     
  10. MD_Reptile

    MD_Reptile

    Joined:
    Jan 19, 2012
    Posts:
    2,663
    Hrmm I didn't have trouble posting at all, but god forbid I quote someone else, or insert a youtube video... that was hilarious how broken that was!