Author Topic: Some questions.  (Read 8363 times)

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: Some questions.
« Reply #15 on: February 15, 2010, 07:47:17 am »
In the game I'm currently working on, for collision between enemy ships for example, what I did was to iterate through the list of ships setting check_others and check_self to test them one at a time.  The time required is similar to sorting a list I think, so I don't know how well this would work for a huge list of objects.  It works well in my case, anyway.  I'd be interested to see if there is another way to do this, too.
hey I just noticed in the api doc it says:

Sets if and how the object will respond to collisions. Setting mode to COLLISION_CHECK_NONE (which is default) means, that the object can't be partner in a collision with other objects. Setting it to COLLISION_CHECK_OTHERS means that other objects may collide with this object and setting it to COLLISION_CHECK_SELF means, that the object itself may collide with other objects. The modes may be combined by using the or-operator | .

It looks like you can combine them by using the or-operator.  I didn't know that.