Box2D for ZGE

Use of external libraries (DLLs) from ZGE.

Moderator: Moderators

User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

Thanks airpas for exploration. Definitely, I'm going to try C::B. As a test I already tried to successfully compile Box2D lib with C::B. There was no problem there. Can I use ZGEBox2D sources without change? Are there some traps in building dll? ... just to know in advance.

BTW I tried to compile Android version of ZGEBox2D for ARM older than v7a (without HW FP support) and with small amount of bodies (<100 + some static ones) it worked fine also on really weak and old Android device.
airpas
Posts: 48
Joined: Wed Apr 18, 2012 11:50 am

Post by airpas »

ok this is the project file with box2D include directory , i am using box2d 2.3.0
the c::b project should compile out of the box .

btw : recently i discovered some gcc flags which dramatically reduce the final binary size .
compiler flags : -ffunction-sections -fdata-sections -Os
linker flags : -Wl -gc-sections

i already rebuild irrlich with those flags and i got after upx it ~700kb
Attachments
ZGEBox2D.7z
(157.62 KiB) Downloaded 591 times
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

Thanks airpas for the compiling/linking options! I uploaded my version of c::b project (and updated HOWTO.txt) to the Google code repository. With the current version of sources (you used the previous version with fewer functions) the fully functional dll optimized for size has 184KB. Not bad. Should not it rather be optimized for speed?
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

FYI I've just updated ZgeBox2D library to version 0.92 with the following changes:

- Updated to Box2D v2.3.1.
- Windows library distribution optimized for speed => improved performance.

You can download it from here. The testbed project can be taken from v0.91; there are no changes in API.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Post by Rado1 »

ZgeBox2D source code repository has been moved to GitHub.
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Box2D for ZGE

Post by Rado1 »

I just updated ZgeBox2D to the Box2D GitHub master and released version 1.0. See https://github.com/Rado-1/ZgeBox2D/releases/tag/v1.0 for release details and download compiled library for Windows and Android. Demo project and ZGE external library definition take from the git repo.
Post Reply