Computer-Technology-DOTS

Create a small space shooter game with the following features:

Simple movement:

I use WASD to move the ship and it rotates in the direction you're moving.

Shooting:

I use the Space bar to shoot projectiles.

Waves of enemies:

Asteroids spawn at the start and, when destroyed, they get pooled and teleported outside of the game bounds, moving towards the center and being able to be destroyed again.

My loops are short and don't have a negative impact when employed at scale. All my systems use the Burst Compiler for performance. The game has 1000 asteroids at all times, staying above 200 FPS on an RTX 3060 Mobile + Ryzen 7 5800X configuration.

At first, I was using the Unity Physics package for DOTS. This package made my performance drop considerably, so I opted to check positions instead in the end.

These are screenshots of the profiler when using the Physics package: 13a466c3c7491b1ad92b1d8d93e618e7d4cae540

image

image

image

And this is after switching away from the Physics package: 07abbe577acc3bc381f21163e3dd02e60f7ed0da

image