The start of the application began during an independent study I was offered by my professor. My university does not have formal visual effects courses, which is the topic I wanted to specialize in as a game developer. My professor offered me an independent study to so that I could have dedicated time to study visual effects, but I would have to produce a game or an application by the end of the semester. At first, I began trying to build a game. But I found out pretty quickly that it wouldn’t pan out and it would ultimately take time away from learning visual effects. With GDC coming up, I thought about how I could present my work. That was when I came up with the idea of making a mobile portfolio application to show off my work on the go.
The scene setup was pretty simple. I wanted to make it minimal, as to not take away from what the main focus of the application would be. I used a backboard 3D mesh and threw a black material on it. I then used a spotlight to highlight the area where the user should expect for something to spawn. I set the main camera to be on a customized layer so that it could pick up any post processing effects that some of the gameobjects could possibly have.
The spawn points of the scene are stored as children within a Spawner parent object. The Hovering_Spawner is for effects that are meant to be in the air, whereas the Grounded_Spawner is for effects that are meant to be interacting with the ground. Attached to the parent Spawner object is an ObjectSpawn.cs script, which handles instantiation of effects and cleanup. A DisplayFPS.cs script is attached and used for debugging purposes to see which effects may need to be further worked on to reduce a substantial frame rate loss.
ObjectSpawn.cs has a public VFX array that I can modify to add more effects to the list as needed. Inside the script, two main functions handle the processes going on - InstanceCreation() and GarbageCollector().
InstanceCreation() takes two GameObject parameters. A GameObject to spawn and a GameObject that will be the parent (in this case, the spawn point). In the early stages of development, I had issues with respawning VFX objects after they were deleted by GarbageCollector(). So to solve the issue, I would instantiate VFX gameobjects as children of the given spawn point.
GarbageCollector() was created as a solution to the problem of spawning multiples of the same effect. Before an effect can be instantiated, the GarbageCollector() function is run to clean up any other effects that may still be in scene. In my case, I use the spawn points as the input parameters and let it check each one for any children that exist within the spawn point. Then for each instance of a child gameobject, they are destroyed from the scene. This way, there will not be any incidents of multiple effects going on at a given time.
The project was placed on the backburner in light of current circumstances. I will be planning to go back to working on it after I upgrade my personal PC.