top of page

Project Samples

Here is a collection of projects I have created for personal enjoyment as well as for others.

Starfield

Below are some excerpts of my C# code for Starlight. This first one is a section for the 3D shop, where UI and camera interpolation runs on one array for efficiency and cohesiveness. 

Cam Movement.PNG

This seemingly short script replaces the old script that was 3 times the size, relied on separate voids for each spaceship in the shop and required more code to be written every time I added a new spaceship. By changing into a system organised in an array and cycling through them, this 80 line piece of code can hold millions of spaceships, without a single extra line of code being needed. It's also efficient, only running when a button is pressed rather than in a void update where it would check every frame. 

As for the camera movement, this runs in Update for a good reason. Rather than teleporting between points in 3D space, I implemented a solution using linear interpolation to smoothly transform the cameras position, and I used spherical interpolation to transform the rotation of the camera, through an array of Quaternion values.

bottom of page