google / liquidfun

2D physics engine for games
http://google.github.io/liquidfun
4.73k stars 638 forks source link

New release? #81

Open sab39 opened 6 years ago

sab39 commented 6 years ago

It looks like the last liquidfun release was in 2014 even though there have been a bunch of commits since then. Are there any plans to make a new release?

stewartmiles commented 6 years ago

@sab39 if only we had the time to cut one. We haven't rebased to the latest box2d for a long time either. If folks were interested in helping out we would be happy to guide them through the process. Though I'm sure there is a huge amount of work in cutting a new release now considering how things tend to rot when they're not touched for a while.

sab39 commented 6 years ago

I'm hypothetically interested in helping out, but I've learned the hard way that despite my best intentions I'm pretty bad at following through on things like this, so I don't want to waste your time or commit to something knowing there's a good chance I'll flake on it. What specifically would need to happen to make a release? Is there any low-hanging fruit that I could try my hand at for starters?

stewartmiles commented 6 years ago

@johnb003 was the last person to hack on LiquidFun, any suggestions John?

@sab39 it really depends upon how far you want to go down the rabbit hole. If you want to just cut a release from head then there are a few things to do here:

If you want to go all out you could also:

johnb003 commented 6 years ago

My git fu wasn't quite up to par when I tried to take this on last time.

Here's what I remember...

There was quite a bit of divergence between our branch and head, and some things that really made it challenging like some git settings that affect the recognition of newline differences, \r\n, vs \n which made the entire branch line we are based on and head completely "different". And there's some weird git properties there I'd never messed with that would invalidate the cache when syncing over it, and made a gigantic mess.

It all got really complicated because the code moved from google-code svn to github or something along those lines, and so effectively the entire history was re-written and none of our commits are based on current branch line.

I attempted to write some scripts to rebase things as they were technically the same changes on both branch lines, which sort of worked, but it was a bit manual. This also got tricky with merges, so I had to apply feature branches as squashed commits.

Stewart always suggested we just attempt the massive merge from the new baseline and just merge the entire tree we have. However due to the newline thing and other weird stuff like moved content, it really is a pain to do that merge.

I did all that work, but I think we basically shelved it for other priorities.

I'll spend some time today to dig up whatever I still have, and share it.

sab39 commented 6 years ago

Would it be an option to just give up on merging entirely, call the old release branch obsolete, and make a brand new release branch based on the development head?

stewartmiles commented 6 years ago

Possible though it would still need a merge of the patches we applied on top of box2d to produce LiquidFun. There is a load of work in porting TestBed, getting tests working again, JS bindings etc.

Razzlegames commented 6 years ago

I would be cool if this could be merged with Box2D proper at some point. It would be quite a bit less maintenance. Has anyone reached out to Erin Catto?

On Tue, Jan 23, 2018 at 11:37 AM, Stewart Miles notifications@github.com wrote:

Possible though it would still need a merge of the patches we applied on top of box2d to produce LiquidFun. There is a load of work in porting TestBed, getting tests working again, JS bindings etc.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/google/liquidfun/issues/81#issuecomment-359887235, or mute the thread https://github.com/notifications/unsubscribe-auth/AIWVfz9QBlUZjH3SVb25zyd8CthmmzGhks5tNibZgaJpZM4RQNN- .

louis-langholtz commented 6 years ago

JFYI, I have a derivative of Box2D that's called PlayRho which I intend to merge LiquidFun in with. PlayRho is also open to contributions while Box2D isn't.

Razzlegames commented 6 years ago

It looks like he merges in PRs from contributors... https://github.com/erincatto/Box2D/commits/master . Perhaps you mean it's more restrictive?

On Thu, Feb 22, 2018 at 3:58 PM, Louis Langholtz notifications@github.com wrote:

JFYI, I have a derivative of Box2D that's called PlayRho https://github.com/louis-langholtz/PlayRho which I intend to merge LiquidFun in with. PlayRho is also open to contributions while Box2D isn't.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/google/liquidfun/issues/81#issuecomment-367851729, or mute the thread https://github.com/notifications/unsubscribe-auth/AIWVf_mbiAdhOrFjhWQiIBjkh4vmvUxQks5tXfEMgaJpZM4RQNN- .

louis-langholtz commented 6 years ago

From https://github.com/erincatto/Box2D:

Please do not submit pull requests with new features.

Also from erincatto's Apr 29, 2016 comment in "Box2D is dead":

I do not accept pull requests because Box2D is not open contribution.

I've seen him taking doc changes or CMake changes; I've also seen him reject PRs for changes to the library code however. He explains his reasoning in the above linked thread. I can see his point and understand why he's chosen this. OTOH, later he states:

I'm totally fine with forking. I'm fine with giving other people control of their version of Box2D. I just don't want people to be able to take control of my version of Box2D.

johnb003 commented 6 years ago

I reached out to Erin 2 years ago, and another from my team a year before that. He definitely was not considering contributions at that time. It was important to know because if we do ever intend to merge, it would be way better to keep the history in tact -- re-written to match the converted history from the svn -> git conversion.

I think the only PRs he'd consider are small bug fixes.

On Thu, Feb 22, 2018 at 3:24 PM, Louis Langholtz notifications@github.com wrote:

From https://github.com/erincatto/Box2D:

Please do not submit pull requests with new features.

Also from erincatto's Apr 29, 2016 comment in "Box2D is dead" https://github.com/erincatto/Box2D/issues/395#issuecomment-215931139:

I do not accept pull requests because Box2D is not open contribution.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/google/liquidfun/issues/81#issuecomment-367857484, or mute the thread https://github.com/notifications/unsubscribe-auth/AGfLrV05m4rci9qTXZdOOAkB5nPj7kcrks5tXfckgaJpZM4RQNN- .

nicobrinkkemper commented 5 years ago

wouldn't it be interesting to simplify the problem liquid simulation in browser? Web assembly comes to mind but I am by no means expert on low level code. If some here can help with the C/web assembly part, I could help with the javascript/interface part. Squoosh is a example of such a project where C and javascript do image codecs. The C code is minimal and you can control it with javascript. See https://github.com/GoogleChromeLabs/squoosh it's open source

danbri commented 4 years ago

@stewartmiles @johnb003 et al - any interest in giving this another push?

Box2D (and various clones, forks, rewrites etc) has taken on a new role in an ML/AI context - e.g. in Gym environments (https://gym.openai.com/envs/#box2d https://github.com/hardmaru/estool https://cloud.google.com/blog/products/ai-machine-learning/how-to-run-evolution-strategies-on-google-kubernetes-engine ...) or JS things like https://github.com/mishig25/neuroevolution-robots and https://github.com/adityathebe/evolutionSimulator ... Having a particle system in the mix might make for some more interesting ML environments?

stewartmiles commented 4 years ago

@danbri TBH I really don't have time to rebase this project on the latest Box2D. Happy to take a community contribution to rebase the project, it's quite a bit of work to do that though.

Birch-san commented 3 years ago

Here's all the "non-whitespace changes to C++ source", that liquidfun has made since Box2D v2.3.0:
https://github.com/erincatto/box2d/compare/v2.3.0...Birch-san:liquidfun?expand=1

Here's what it looks like rebased (manually) over Box2D v2.4.1:
https://github.com/erincatto/box2d/compare/v2.4.1...Birch-san:liquidfun-rebase?expand=1

It compiles successfully to WebAssembly:
https://github.com/Birch-san/box2d-wasm/releases/tag/v4.0.0-liquidfun.0

danbri commented 3 years ago

@Birch-san - I've said this elsewhere, but that is awesome - thanks again!

It isn't clear to me where liquidfun could, should, or might go with things in 2021 - and to be clear I have no role in the project beyond wellwisher and dabbler - but we're all in a much more informed position thanks to your efforts exploring all this :)

@stewartmiles it feels like the burden of targeting so many platforms, and of keeping the version history, makes liquidfun potentially rather more static than the name suggests. Any thoughts on the options here?

stewartmiles commented 3 years ago

@danbri if ditching the version history is a blocker for merging an update then archiving the existing history in another branch seems reasonable to me.

However, since this is a library targeting game developers, supporting platforms that game developers value (i.e where they make their living), which consists of major desktop (console because you know they're not that different anymore) and mobile platforms is really a requirement to keep this interesting to the game dev community.

ryanpeach commented 1 year ago

Did those rebases ever get merged back in? @Birch-san is your repo capable of becoming a new master for the project?

Birch-san commented 1 year ago

Did those rebases ever get merged back in?

nope, it's probably something a maintainer of this repository would have to do. e.g.:

git clone git@github.com:google/liquidfun.git
cd liquidfun
git remote add birch https://github.com/Birch-san/box2d.git
git fetch birch liquidfun-rebase

# make a backup of master before we do anything drastic
git checkout -b master-backup
# push the backup to GitHub
git push -u origin master-backup
git checkout master

# makes your local master point at my liquidfun-rebase commit
git reset --hard birch/liquidfun-rebase
# changes master for everybody on GitHub
git push --force

this way would make you into a true fork of Box2D (as in, erincatto's box2d would literally be in your commit history, and you could rebase if ever a new release comes out).
however I think my repository doesn't contain any of your testbeds or Android stuff, so you would need to think about how to not obliterate that.

is your repo capable of becoming a new master for the project?

I'm not maintaining it.

ryanpeach commented 1 year ago

@Birch-san thanks for that, I'll do that in my fork