Skip to content

Conversation

Cleptomania
Copy link
Member

The check_for_collision_with_lists function had different behavior than check_for_collision_with_list.

By default in the non nested version of the function we use method=0 which performs an auto-select that say:

  1. If spatial hashing is available, use it
  2. If no spatial hashing, and the spritelist size is <1500 then use full CPU check for every sprite
  3. If no spatial hashing, and the spritelist size is >1500 then use GPU collision

This auto-selection didn't exist in check_for_collision_with_lists and so would only ever use the selected mode, which by default was spatial hashing. However if the spatial hash wasn't available it would fallback to GPU collision, and only ever use the full CPU check if it was explicitly requested with method=3. GPU collision is very costly for small spritelists and only makes sense with large spritelists.

This adds the same auto-selection to each function.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant