SolarLune / resolv

A Simple 2D Golang collision detection and resolution library for games
MIT License
451 stars 42 forks source link

Todo List #1

Closed SolarLune closed 3 years ago

SolarLune commented 6 years ago

softcollision

In the above example image, the yellow square is attempting to resolve a movement upwards into the white square; that would place it where the red square would be. Currently, this is just implemented as a simple collision, and so resolv returns a Collision that butts the yellow square against the white one.

However, it might be good to implement the capability to try alternative resolutions within a certain "wiggle-room range" first to attempt to move to the target location. If that was implemented, then resolv could allow the yellow square to move into an alternative location, where the blue square is in the second example. If that doesn't work, then it can proceed with the resolution process as it currently stands.

Ishisoft's Leilani's Island has an implementation of this, and it looks fantastic. I'd like to add something that would be able to reproduce this.

Leilani's Island soft collision

See this Leilani's Island post for a more in-depth explanation of this.

einthusan commented 3 years ago

Are you working full-time on this? Is there any way to incentive you though donations to complete these pending issues in your work?

SolarLune commented 3 years ago

Hello!

Nope, I'm not working on this full-time. This library was created for gamedev awhile ago, and I've been working on it until about a year and a half ago.

I do appreciate the idea of donations, but I'm uncertain if there's enough demand to warrant working on this full-time / for a bounty. As it currently stands, I have a technically improved version sitting on my hard drive that runs faster and is more efficient by using an overall grid for collision-checking, but that also only has basic rectangle intersection checking.

einthusan commented 3 years ago

I see, i managed to wire up box2d ... i did give your engine a try, but had a bit of trouble and not enough clear documentation. Anyhow, best of luck with this project!

sergey-koba-mobidev commented 3 years ago

Hey, nice lib, but really should migrate int32 to float64, wanted to use it, but this is a blocker for my game :(

SolarLune commented 3 years ago

Yo, thanks! And yeah, I agree; I've already made the adjustments on my local copy, but I'd like to fix up the examples and fix up the SAT intersection testing before releasing an official update to master, as I'm still kind of figuring out . If you want to use it in its pre-release stage, you can check out the Revamp3 branch. It's still subject to change, but the fundamentals are there.

sergey-koba-mobidev commented 3 years ago

Wow! I hoped you did not abandoned the project! Nice job developing it further! ps: thx for quick response I will definitely check out the Revamp3 branch cause it should save me a lot of time

sergey-koba-mobidev commented 3 years ago

Revamp3 looks promising :) A circle is critical for me, so will be waiting for it

sardap commented 3 years ago

The float64 update is very exciting! I'm switching to the Revamp3 branch as well!

SolarLune commented 3 years ago

Okay, so it's been a couple of weeks, but I've finally gotten this to a point where I feel relatively comfortable, I think, with putting it out there. master has been updated to bear the fruits of this labor, and resolv is now sitting at v0.5.0. This effort resolves a variety of issues that are brought up in this post, and so the todo list will be removed, as I've basically been able to implement a ton of the things from this list, including:

Thanks for holding out hope that I'd come back to this, haha. Your encouragement has been very helpful~