Comment

Comment by otto2

You can still optimize this. If the scan has to establish line-of-sight between bots, your engine can establish that, and when firing raycasts, to skip those that are known to be misses. It doesn't change anything for the bot that fires raycasts. You could also calculate extremes (leftmost and rightmost) and return positives in between. This would decrease number of raycasts by two orders of magnitude. Also add a possibility to skip every 2nd, 3rd etc frame so that you can evaluate if it impacts game play.
parent otto2 3 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton