nimgame2
nimgame2 copied to clipboard
Plans to implement collision between entities?
Hi, I'm wondering if you were planning to implement a physics engine? If you were, do you think it would be best to use a pre-made one like chipmunk2d?
There's actually a primitive physics implemented already https://github.com/Vladar4/nimgame2/blob/master/nimgame2/entity.nim#L296 with the possibility of using something else.
Does it deal with collisions? The two objects in my game aren't colliding (ie when one hits the other it can't move any further). I made sure they had bounding boxes using the debug.
No, it does not work with the object interactions, just with a single objects. Anything else should be coded manually at this moment.
Ok, that's what I was wanting when I said Physics engine.
@hcorion I'd recommend taking a look at https://github.com/oprypin/nim-chipmunk
Chipmunk2D is a pretty excellent 2D physics engine, that shouldn't be too hard to slot into any game engine (depending). It's all proper rigid body, and has some amazing features. Take a look at this:
https://github.com/matkuki/chipmunk7_demos