Barnes-Hut and options are a common way to do this, but I would not have implemented a complete algorithm for your use case, because it seems redundant. I would probably just divide the plane into a square grid of, say, 20 x 20, and save the set for each cell with all the creatures that are currently inside the cell. Then, for each creature, just look into your cell and 8 (or 5 on the sides or 3 at the corners) of neighboring cells and use a force that drops to zero within the same cell.
- , , . , , , , 8 , , .