Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 collision detections
Index -> Programming, Python -> Python Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Notthebbq




PostPosted: 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
Sponsor
Sponsor
Sponsor
sponsor
apython1992




PostPosted: 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.
Display posts from previous:   
   Index -> Programming, Python -> Python Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: