Show HN: Detecting collision between 500k circles below 5ms Heya. I created a flexible collision engine for broad detection in C that's also pretty fast. Personally that's my best, so I wanted to show it here. Although... still not as fast as DragonEnergy's one that supposedly handled millions of agents bouncing off each other every frame on an old i3, haha. I hope I get better at this! He set the bar pretty high for me. I was considering including some small function that tries finding the nearest entity, although I think it might be better to simply use query for that matter. Perhaps in the future I will get a good idea of how to do that more efficiently. This is not a clickbait. Although generally you also call other functions in a tick, a collision check between 500,000 circles ("circles", not "squares", because distance is checked and forces are applied based on the angle between) is done below 5ms on not really that demanding hardware. I achieve lower times than that on my budget laptop, slightly more on my PC (yeah, weird). The total time spent in a tick is 3-4 times that. https://ift.tt/KwzLECf January 2, 2023 at 01:38AM
Show HN: Detecting collision between 500k circles below 5ms https://ift.tt/3E521xI
Related Articles
Show HN: Agent Protocol https://ift.tt/wxfgvcbShow HN: Agent Protocol https://ift.tt/lOLS3uD July 25, 2023 at 02:28A… Read More
Show HN: An Open-Source Platform for Raspberry Pi with Robust OTA Updates https://ift.tt/GJZrYLaShow HN: An Open-Source Platform for Raspberry Pi with Robust OTA Upda… Read More
Show HN: Rust library for set operations on CIDRs, you can try it in a terminal https://ift.tt/vS4B1bHShow HN: Rust library for set operations on CIDRs, you can try it in a… Read More
Show HN: I spent a weekend building a tool that lets you make LoRAs without code https://ift.tt/BR4HuNlShow HN: I spent a weekend building a tool that lets you make LoRAs wi… Read More
Show HN: AI to analyze SEC filings (10-Ks, 10-Qs, etc.) of public companies https://ift.tt/ejKqy9kShow HN: AI to analyze SEC filings (10-Ks, 10-Qs, etc.) of public comp… Read More
Show HN: EchoCLI – a tool for rooting the Amazon Echo Dot https://ift.tt/k9Dd7QVShow HN: EchoCLI – a tool for rooting the Amazon Echo Dot https://ift.… Read More
Show HN: Continue (YC S23) – Open-source coding autopilot https://ift.tt/EoqLxKuShow HN: Continue (YC S23) – Open-source coding autopilot Hi HN, we’re… Read More
Show HN: Shell AI – My Aggressively Minimal Open Source Assistant https://ift.tt/6KfG3StShow HN: Shell AI – My Aggressively Minimal Open Source Assistant http… Read More
0 Comments: