Monday, February 17, 2014

Universe Creator - close to pre-alpha status

The Universe creator is coming along nicely. Just resolved the faction sub-division problem by using what I called a "FactionMatrix" prefab. This guy has "sub cubes" layer out in random patterns that use OnTriggerEnter to report a newly created "sphere" (system) so that I can set the systems ("sphere's") faction properly.

This gets into the fundamentals of the design; as to how many factions and their layout based on the universe "seed" number. Given that every galaxy will have two additional factions:

  1. None
  2. Unknown
If the GC (Galaxy Creator) aka player chooses to use three factions, the galaxy will actually contain five total.

Creating and debugging the faction alignment process was fun and had me stumped for a bit but the solution is rather light-weight and fast. Especially since it only has to be run on the creation of each new universe.

Oh and StartCoroutine() and yield are my new best friends... :-)

No comments:

Post a Comment