collision detections
Author |
Message |
Notthebbq
![](http://compsci.ca/v3/uploads/user_avatars/11181326514ee8f2aca9c82.jpg)
|
Posted: Tue Apr 19, 2011 1:01 pm Post subject: collision detections |
|
|
my group member is working on collision detection and wass wonderign if you could put out any sample collision detection code he could use
please and thanks |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
apython1992
![](http://compsci.ca/v3/uploads/user_avatars/17001640684d87a16bb8fbb.jpg)
|
Posted: Tue Apr 19, 2011 1:38 pm Post subject: RE:collision detections |
|
|
Have you decided on using a 2d array technique? If that's the case, you can just mark walls/boundaries with 1s:
1111111111111
1000000000001
1000111111101
1110111111101
1110111111101
1110000000001
1111111111100
You can have your code set up such that enemies/players can only occupy a position that is a zero. |
|
|
|
|
![](images/spacer.gif) |
|
|