0

I was thinking about making a game but i would have to detect the collisions of the materials with the machines but there will be many material flying aroung on conveyors. ive previously detected for many collisions with a list and looping through it. however there will be a lot of items in the list and may lead to very inefficient code so is there another way to go about this. ive also been wandering if there is a way to just duplicate that one rect for the materials and just check for that one rect.

My typing is probably very messy and might not make sense please let me know if i need to make clarifications.

  • 1
    Some very interesting answers at this similar question: [Collision detection of huge number of circles](https://stackoverflow.com/questions/2544431/collision-detection-of-huge-number-of-circles) I don't think they specify language in that Q&A but that top answer feels very language agnostic in ways to pull this off and the issues you are likely to run into. – JNevill Mar 22 '22 at 19:50
  • @JNevill i dont think i understand it. for the spatial division are they splitting the screen in to grids and checking if the circles are in the same grid rather than checking if the curves of the circles collide which would be more complex to code. –  Mar 22 '22 at 20:00

0 Answers0