top of page

Week of Collisions, Controls, & Custom Meshes

Writer: Liam HealeyLiam Healey

Updated: May 22, 2024

Voidsinger

This week was spent entirely on Collisions, Controls, & Custom Meshes.


Collisions

I needed to calculate what forces would be applied to each ship that collided. To do this I had to do some research and I came across this very helpful website. My research also lead me to refactor some of my old physics code to be a bit more streamlined and accurate.


Controls

Our game couldn't use a standard WASD-based control system since the player needs to be able to use their left hand for playing Voidsongs. This led me to create a movement system in which the player's ship points towards the mouse cursor and the following binding for moving in the specified direction relative to the orientation of the ship:

Left Mouse - Forward

Right Mouse - Back

Shift + Left Mouse - Left

Shift + Right Mouse - Left

I also had to add some predictive algorithms for ships rotation so that it is able to decelerate appropriately; however, they still require tuning.


Custom Meshes

We found that our game ran into some rather major performance issues when there were even medium-sized ships, and this lag was traced back to a large number of static meshes being moved simultaneously and continually. This was because for every grid tile there would be a new static mesh.

Because of this, I decided to make a Procedural Mesh that would change shape whenever a grid tile was added. The one problem was UV-ing and applying materials to the mesh. I believe that I have found a solution to this problem however it is still a work in progress.

Comments


bottom of page