Ok, I’m finally getting somewhere with the water branching system:
Writing this system was pretty painful due to the debugging process. The water system uses a recursive function, so that the water segment just keeps replicating itself. This is necessary as the water will need to respond dynamically to environmental changes, so each subsequent segment of the water is just a brand new water source, embedded within the previous water segment.
As anyone who was written a recursive function knows, if you mess up the code, you can get yourself caught up in an infinite loop. Every time this happened, Unity would freeze, and I’d have to ctrl + alt + delete out of it. This made the entire process extremely tedious.
I did eventually figure out what the main bug was. In Unity, it looks like if you have a prefab, and your instantiate itself and add a child to that object, then instantiate it again, the second instance will actually include a child as well. This was causing an additional water starter to get created, which then increased the number of gameobjects exponentially with each subsequent update.
Experimental Gameplay Workshop
Heard back from the organizers of the Experimental Gameplay Workshop at GDC. Sadly, Relativity didn’t make the cut this year. However, I’ll look at it as motivation to work harder, and will definitely try again next year.
