Computer Science Canada

collision detections

Author:  Notthebbq [ 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

Author:  apython1992 [ 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.


: