Original Post
I want to speed up collision detection between units so I've divided my map into squares and want each square to hold information about all of the units in the square, then each unit checks collision only with the units in his square. Also, the units should be able to put themselves into the square's memory and then remove itself. I though about having each square hold a stl vector of pointers to the units in it's square, but then how would a unit be able to remove himself from one square and put himself in another (if it's moveing for example) ? Thanks.