The Time
They say god created the world in 7 days. Well, I created the universe in one.
We used code from Shadow. A guy that was developing a 4X Space Game, he called it. I honestly don't know what 4X stands for, but damn it sounded cool. In a few lines of code we had the galaxy generator. With a few dozen lines of code we implemented an Array Prefab Instantiator.
It basically takes an GameObject[ ] array and you fill it with whatever types of objects you want in the editor. Be it asteroids, suns, nebulas, debree, enemies, anything your little twisted mind can imagine. We then generate the scene with those objects spreading them randomly using Random.Range positioning and a few "magic tricks" to prevent collisions.
We weren't out to create a single Galaxy but an entire Universe.
Copy link