G++ Update and Games

I updated Box2D to support G++ and Linux. Please get it here and let me know if it compiles on Linux. This version is based on the GDC ‘07 version.

The fine folks over at Kloonigames have found Box2D useful and made a couple games with it. To mark the occasion, I have created a games page. Please let me know about any other games using Box2D.

Also, I have updated the theme once again to improve readability. Hopefully there will be no injuries this time.

6 Responses to “G++ Update and Games”

  1. Gianni Says:

    There’s still some errors when compiling with g++

    But that’s no big deal.

    Replacing the #include “glut.h” by #include in both main.cpp and Arbiter.cpp does the trick.

    Otherwise the code is clean and works well. Nice job!

  2. Gianni Says:

    Replacing #include “glut.h” by
    #include < GL/glut.h >

    The previous post takes what’s in between lesser than and greater than signs to be HTML code. In case it does it again, that’s GL/glut.h

  3. Ben O Says:

    Just so you know what the errors are after making the #include changes to main.cpp and Arbiter.cpp as noted previously:

    Box2D_Lite$ g++ -lglut *.cpp -o Box2D
    Collide.cpp:332:2: warning: no newline at end of file
    In file included from Joint.cpp:12:
    Joint.h:43:7: warning: no newline at end of file
    In file included from main.cpp:17:
    Joint.h:43:7: warning: no newline at end of file
    In file included from World.cpp:14:
    Joint.h:43:7: warning: no newline at end of file
    Box2D_Lite$

    “g++ -lglut *.cpp -o Box2D” simply compiles the program, linking in the Glut library, and names the output program ‘Box2D’. Make sure that you have the necessary requirements installed before this point (’sudo apt-get install build-essentials g++ freeglut3-dev’ on Ubuntu/Debian should do the trick)

    Not really showstopper errors ;) as you can see! Congratulations on a lightweight, yet remarkably powerful and stable 2D engine! Inspires me to start making physics based games/demos again!

    Oh, and big thanks for making the source available. Thank you hugely!

  4. Olivier Says:

    Hi,

    Just tried to compile your code under Linux (Ubuntu Feisty), and excepted some corrections on included files, it worked fine. Thank you for giving source code, I hope this one will help me to understand how it works.

    Thank you very much for your help !
    Olivier

  5. Clay Smith Says:

    Hey Erin,

    From now on, any game that uses my library will technically be using ‘box2d’, through my library.

    The first game: Dazel - A Zelda Clone http://www.dsource.org/projects/dazel

    More to come :)

  6. Alfonso E.M. Says:

    I need python bindings !!! (for pygame if possible)

    What an awesome work !

Leave a Reply