#### Archived

This topic is now archived and is closed to further replies.

# Square bounding box or circle?

This topic is 5550 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I''m currently working on a 2D RTS game, and I was wondering what the difference is in using a square bouding box, compared to a circle bounding ''box'' for unit selection. My original thought was to go with a square, but the games I''ve seen use circles.

##### Share on other sites
I am not a programmer but after years in the industry I can come up with a couple of suggestions that should keep you going until someone more qualified comes along.

1. (Possible but not likely) - Circles are for some reason quicker to calculate (the edge always being the same distance from the "centre").
2 (More likely) - A circular bounding box fits all sprite rotations of a unit batter than a square.

Dan Marchant
Obscure Productions
Game Development & Design consultant

##### Share on other sites
Also, spheres (or more often cylinders) have nice properties from a physics point of view: they slide elegantly against each other and the environment, where boxes slide jaggedly, and is easily blocked.

Allan

##### Share on other sites
Circle/sphere collision is the simplest, and fastest type of collision to do. It also makes colliding with something feel smooth as you move around it.
EDIT: I've been beaten! bleh

[edited by - LockePick on August 10, 2003 10:36:24 PM]

##### Share on other sites
If you''re just drawing a primitive around a unit and it has nothing to do with collision detection, then it''s really arbitrary what shape you use to indicate a highlighted unit.

For fun, you could try drawing an Octagon around the units.

   __ /    \|  D:  | \ __ /

1. 1
Rutin
37
2. 2
3. 3
4. 4
5. 5

• 11
• 10
• 13
• 103
• 11
• ### Forum Statistics

• Total Topics
632976
• Total Posts
3009672
• ### Who's Online (See full list)

There are no registered users currently online

×