Project Samples
Here is a collection of projects I have created for personal enjoyment as well as for others.
Cameras and User Interfaces
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](https://static.wixstatic.com/media/a253f4_d7ee29a5172f41899a760e4dbc938329~mv2.png/v1/fill/w_914,h_1368,al_c,q_90,usm_0.66_1.00_0.01,enc_avif,quality_auto/Cam%20Movement_PNG.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.
Memory Management and Currency Systems