Cohesion

Blitz3D Forums/Blitz3D Beginners Area/Cohesion

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Wow! great graphics Todd, I think I might use them in my game ;). I've attached a screenshot from the game that might help.

In this shot, all the units (members of 'red' team) are within 2 cells of each other and there are no gaps of more than 2 cells between 'clusters', i.e. 14,1,7,4 are not more than two cells away from 10,12,8. So this is perfectly OK, but.....



In the shot below, 14,2,4 meet the criteria, but they are more than two cells away from the rest, which is not allowed, but the algorithm can't catch this because when 14 is tested, it finds that it's next to 2, so it thinks it's OK.