james7132/DanmakU

Multithreaded Danmaku Processing

Closed this issue · 2 comments

Currently all of the danmaku object updates are entirely single threaded. A great performance boost should be attainable by multithreading each update.

Several parts are required:

  • Minimize the number of Unity API calls needed to be made in each update
  • Create an effective alternative threadpool, since Unity Mono doesn't have one that actually works effectively.

It seems that switching to Particle Systems has already multithreaded the rendering of the bullets, and almost everything outside of collision checks are thread-safe now. A bit of reordering of events and it shouldn't be too hard to use a thread pool to calculate danmaku movement.

Handled by the new C# job system.