top of page

About:

Info

This section is a showcase of all the different systems and tools I made in Unity that I am most proud of.  

Some of these showcases are from different projects.

C#, Shader graph & Unity

Language & API's:

UnityTools

For one of the projects the designers wanted to do a endless runner based on the sport base jumping in which a participant leaps high point and glides between mountains or canyons using a wingsuit. I pitched for a randomly generated noise terrain that mimics mountains & canyons and they were immediately sold on the idea.

My plan for this vertex plane generation was to have everything in the world centralized and only the noise texture moving in a direction. This gives us benefits such as collision handling only in a small specified "playable area" and not needing to check every vertex on the plane, optimization options that I will showcase later in this section, the values we use are very centralized meaning we never worked with big numbers(except the noise map) and among other benefits.   

Info:

Optimization:

Since this project was meant to be built for phones the vertex plane really needed to be optimized as much as possible since it was the only thing slowing our game down to a crawl. 

For the first big step in optimization I decided to implement a view frustum culling at the start of the application giving us a general area that the player can see and only updating the vertices that are inside the camera view.

The second step was the optimization of the noise texture generation as it was by far the biggest bottle neck in the whole application. This was solved by instead of updating every single pixel on the noise texture I only updated the pixels that where UV connected on the vertex plane. This was a massive reduction in the amount of pixels that needed updating and was a 10x fps increase in some situations. 

Examples of impact of the optimizations below.

No culling vs view frustum culling:

No Culling

Noise Optimization Off vs On:

Optimization off using 512x512 texture averaging around 14 fps

Customization:

I wanted our designers and artist to have a lot of customization options when building the different environments so I implement a system called "World Templates" which is a scriptable object that holds all the data for what textures the vertex plane will use, specified noise generation, the speed & speed increase over time, the maximum height, what objects to spawn and what different ranges they will spawn at(ranges are also connected to the textures and where they are rendered on the plane).

All the different objects that spawns also has many different options for where on the range they could spawn, if they would spawn with a random offset or rotation and how often it can spawn. 

Example of the different noise options:

Additionally I wanted to make the whole game in one scene for the option to make really cool menu to game and vice versa transitions so I made it possible to switch world templates on the fly without needing to reload the scene.

Vertex plane generation

bottom of page