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

Thanks you for your Liquidfun rebase! #44

Open
DJuego opened this issue May 1, 2022 · 1 comment
Open

Thanks you for your Liquidfun rebase! #44

DJuego opened this issue May 1, 2022 · 1 comment

Comments

@DJuego
Copy link

DJuego commented May 1, 2022

My best regards!

I want to thank you for having shared your work on the rebasing of the LiquidFun library with the latest Box2D version. I program in C++ (I'm a novice), and I was really interested in an effort along these lines.

I was able to compile it successfully in Visual Studio 2019 except for Testbed, which gave me errors. Fortunately it can be disabled with -D BOX2D_BUILD_TESTBED:BOOL=OFF. Anyway I leave you here the errors for reference. :-)

P:\Compilados\x32-x64\TRABAJO_MSVC2019_x64\box2d-liquidfun-rebase\testbed\draw.h(98): error C2259: 'DebugDraw': cannot instantiate abstract class
P:\Compilados\x32-x64\TRABAJO_MSVC2019_x64\box2d-liquidfun-rebase\testbed\draw.h(61): note: see declaration of 'DebugDraw'
P:\Compilados\x32-x64\TRABAJO_MSVC2019_x64\box2d-liquidfun-rebase\testbed\draw.h(98): note: due to following members:
P:\Compilados\x32-x64\TRABAJO_MSVC2019_x64\box2d-liquidfun-rebase\testbed\draw.h(98): note: 'void b2Draw::DrawParticles(const b2Vec2 *,float,const b2ParticleColor *,int32)': is abstract
P:\Compilados\x32-x64\TRABAJO_MSVC2019_x64\box2d-liquidfun-rebase\include\box2d\b2_draw.h(91): note: see declaration of 'b2Draw::DrawParticles'
P:\Compilados\x32-x64\TRABAJO_MSVC2019_x64\box2d-liquidfun-rebase\testbed\draw.cpp(32): error C2259: 'DebugDraw': cannot instantiate abstract class
P:\Compilados\x32-x64\TRABAJO_MSVC2019_x64\box2d-liquidfun-rebase\testbed\draw.h(61): note: see declaration of 'DebugDraw'
P:\Compilados\x32-x64\TRABAJO_MSVC2019_x64\box2d-liquidfun-rebase\testbed\draw.cpp(32): note: due to following members:
P:\Compilados\x32-x64\TRABAJO_MSVC2019_x64\box2d-liquidfun-rebase\testbed\draw.cpp(32): note: 'void b2Draw::DrawParticles(const b2Vec2 *,float,const b2ParticleColor *,int32)': is abstract
P:\Compilados\x32-x64\TRABAJO_MSVC2019_x64\box2d-liquidfun-rebase\include\box2d\b2_draw.h(91): note: see declaration of 'b2Draw::DrawParticles'
NMAKE : fatal error U1077: 'P:\Desarrollo\cmake\bin\cmake.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Tools\MSVC\14.29.30133\bin\HostX64\x64\nmake.exe"' : return code '0x2'
Stop.

I would like to ask you about the experience with your rebase, does it work correctly, has it met your expectations, has it been stable?

I am surprised that this interesting contribution has not had more projection.

Thanks again!

DJuego

@Birch-san
Copy link
Owner

no problem; glad it's appreciated. here's some extra diffs that illustrate what's included in the rebase:
google/liquidfun#81 (comment)

except for Testbed

okay, yeah that makes sense… draw.cpp needs to implement the new b2Draw method, DrawParticles.
it gives you a pointer-to-circle (an array thereof); you just need to iterate over each circle and invoke your existing DrawCircle method on each of them.
I implemented it in JS here:
https://github.com/Birch-san/liquidfun-play-2/blob/master/src/debugDraw.ts#L148
and here (integration-test/src/debugDraw.ts):
master...liquidfun

experience with your rebase, does it work correctly, has it met your expectations, has it been stable?

yeah, I haven't found any problems at all. seems to work very well. the only thing I really tried was this:
https://birchlabs.co.uk/liquidfun-wasm/

mercifully, most of the liquidfun stuff is self-contained (new files like the Particle folder), so it rebased pretty well, and makes sense that it wasn't weaved too sensitively into the rest of the code. I'm optimistic that if you wanted to do something big with it, it'd probably go smoothly.

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

No branches or pull requests

2 participants