Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Look into supporting pymunk.Space for collision #1297

Open
einarf opened this issue Aug 8, 2022 · 2 comments
Open

Look into supporting pymunk.Space for collision #1297

einarf opened this issue Aug 8, 2022 · 2 comments
Milestone

Comments

@einarf
Copy link
Member

einarf commented Aug 8, 2022

Pymunk has a pretty neat collision system using spaces and groups. It supports handlers/callbacks to notify about collision. I strongly suspect this can scale much better the generic sprite collision we're currently using in many cases. Especially of you're doing N x M collision checks and can't use spatial hashing due to both spritelists being highly dynamic.

@eschan145
Copy link
Contributor

Yeah, it's much faster than the arcade one. It;s object-oriented, so you can get additional properties and features. Using this with my medieval wargame, I got much better performance than using the arcade collision checks. We could also make object-oriented collision checks for arcade too.

@einarf einarf added this to the Future milestone Apr 9, 2023
@DragonMoffon
Copy link
Collaborator

I'd just like to add to this that the performance improvement we get from pymunk also games down to the fact that it isn't pure python. Def think we should expose it, but I'm also for making pymunk an optional import.

When I do my by physics engine overhaul post 3.0 this will be part of my todo.

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

No branches or pull requests

4 participants