Hacker News new | ask | show | jobs
by TylerGlaiel 1004 days ago
There's nothing wrong with spamming 1000s of raycasts per frame in a 2D game. They should be very cheap, so the performance impact of that should not be something you have to think about, and if some interaction or mechanic is easy to express with a boatload of raycasts, you should be able to just do that
1 comments

It depends on the type of game, but 360 raycasts per bot is definitely a code smell that warrants a closer look at how the game is being architected.