Let’s say you have an array of blocks (AABB), where each block is touching or intersecting any number of other blocks. Together they make up a larger object, and because they’re all touching, you can consider them to all be on the same “grid”. Each block can have any size or position, but is always axis-aligned. Now let’s say you delete one of the blocks, somewhere in the middle, such that there is now a gap where blocks are no longer touching. How would you go about detecting that you now have two clusters of blocks, two “grids”, instead of one? My first thought is to loop through all blocks, perform AABB collision checks against all other blocks, mark the ones that touch, then recursively cycle through the touched blocks looking for others that touch, until you reach the end and can look for blocks that were not marked. But that sounds extremely inefficient. This is in plain C, so I’m trying to keep memory use limited to the existing array of block structs.
- WhatsApp update lets you stop people adding you to annoying groups – and forces them to invite you instead
- How your BRAIN is to blame for ‘broken heart syndrome’
- Husband tied concrete block round wife's neck and threw her off a bridge
- Co Antrim woman Nicola whose multiple sclerosis symptoms remarkably improved during pregnancy
- Australian DJ Adam Sky dies after broken window incident on Bali
- Derelict Belfast bank set to become £5m apartment block
- Man's finger broken after being bitten during Ballymurphy assault
- Letters to the Editor: 'Politics is broken in USA if they are relying on the integrity of narcissist who clearly has none'
- Man's jaw and cheekbone broken in 'vicious' Belfast robbery
- 'Love rival' trial: remains of Bobby Ryan showed evidence of multiple injuries, court hears
Detecting when a single group of blocks is broken into multiple groups have 309 words, post on gamedev.stackexchange.com at February 11, 2019. This is cached page on Game Breaking News. If you want remove this page, please contact us.