Little question

  • nikigameplay
    29th Sep 2017 Member 0 Permalink

    I have been looking at source code and there is one element that can not be spawned in the game. I'm talking about element 146. Do someone know what is it?

     

    \The-Powder-Toy-master\The-Powder-Toy\src\simulation\elements\146.cpp

     

    EDIT: Seems like I put this post to another topic.

    Edited once by nikigameplay. Last: 29th Sep 2017
  • jacob2
    29th Sep 2017 Member 0 Permalink
    146 used to be BRAN. This is the last GoL element in the menu.

    A long time ago, each GoL element got it's own element ID. This was a massive waste of space, there are a ton of them and each one didn't need its own ID. We combined them all into one, 78. The old IDs slowly started being replaced with new elements as they came out.

    At the same time, people were also starting to create lua elements. Back then, the elements API didn't exist. The only way to create new elements was to replace an existing one. GoL elements were great candidates because they didn't actually exist. Many scripts from back then modify tpt.el.bran and others to replace it with their element.

    We left bran in so these scripts and future scripts could still work. They needed a free ID to use for custom elements, and most people used BRAN or EQVE

    I don't know if bran scripts still work after the c++ rewrite, but they worked back then.
  • TPT_PL
    29th Sep 2017 Member 0 Permalink
    It is an empty element, left (mostly for Lua users I think) empty forever.
    Basically, in the past, all GoL wasn't under a single element of LIFE and every GoL variant had its element.