top of page
Writer's pictureCallum Pearce

Simulation Completion


Up to the start of this week the simulation scene that I have been working on was nearing finished but still had a few more things to be added. There was less things to do compared to last week but still a few before it got to the completed state.

The first thing was to get the new models for the Mackerel and Red Snapper implemented. So the red and grey placeholder models were replaced with the two models our artist had created. Then to get them to match the Clownfish and Surgeonfish models I had to take the animated models and create the animation clips in Unity. This again was done by changing swimming left and swimming right properties that each fish had.

At this point the scene was very close to being finished, but before it was some final tweaks needed to be made. After learning from a small error made last week, it was made so that the number of fish can be entered at the start of the scene then have a reset button. This allowed for a build to be made on mobile meaning every time a new number of fish was entered it didn't have to be rebuilt.

A screenshot of a basic input screen allowing for fish input

With this improved scene I was able to carry out tests on mobile. Working with this it was concluded that the highest amount of fish that was able to keep the framerate decent was 50 fish. These tests were also taken on a slightly higher end mobile device. Below is a screenshot from the final simulation screen (pc).

Fully simulated flocking scene

The final thing done this week was to add an object acting as the player fish and having all flocking fish swim away to avoid the fish. This implementation was simple by copying the code that made the separation rule work, except have it out of the ApplyRules() method that was made and have it in the main update loop.

This concludes the simulation scene. For the coming weeks I am going to be taking all the code from this scene, but applying it into a final game scene.

11 views0 comments

Recent Posts

See All
bottom of page