Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. How to set up Box2D for Android

How to set up Box2D for Android

Scheduled Pinned Locked Moved Solved Game Development
5 Posts 3 Posters 944 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • 8Observer88 Offline
    8Observer88 Offline
    8Observer8
    wrote on last edited by 8Observer8
    #1

    Hello. Have you tried running Box2D on Android? If so, did you build Box2D for Android or did you add the Box2D source to your project? Or did you include the jar assembly, as is available here: https://doc.qt.io/qt-6/android-3rdparty-libs.html What is the best and the simplest way?

    All I found are these two sources. But they are complex. Is there a simple step by step guide?

    • https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application
    • https://www.packtpub.com/product/android-ndk-game-development-cookbook/9781782167785

    I ran the first triangle on OpenGL ES 2.0 on emulator and smartphone. I want to make a demo on Box2D.

    7b7a2f4a-bb1a-4e74-8835-2c148cc89506-image.png

    JoeCFDJ 8Observer88 3 Replies Last reply
    1
    • 8Observer88 8Observer8

      Hello. Have you tried running Box2D on Android? If so, did you build Box2D for Android or did you add the Box2D source to your project? Or did you include the jar assembly, as is available here: https://doc.qt.io/qt-6/android-3rdparty-libs.html What is the best and the simplest way?

      All I found are these two sources. But they are complex. Is there a simple step by step guide?

      • https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application
      • https://www.packtpub.com/product/android-ndk-game-development-cookbook/9781782167785

      I ran the first triangle on OpenGL ES 2.0 on emulator and smartphone. I want to make a demo on Box2D.

      7b7a2f4a-bb1a-4e74-8835-2c148cc89506-image.png

      8Observer88 Offline
      8Observer88 Offline
      8Observer8
      wrote on last edited by 8Observer8
      #5

      I found the simplest way. I just include the source code of Box2D to my project:

      42bb99dc-714b-445e-a43f-2418e196cb20-image.png

      It allows me to have the same code base for Desktop and Android:

      6bd14b30-9d4e-4da8-a0af-e2b51a0eee98-image.png

      cb391ca2-e7b6-4259-9210-b51f897fbcbf-image.png

      bd97385f-b07a-4bf9-90c7-825055146aed-image.png

      1 Reply Last reply
      0
      • 8Observer88 8Observer8

        Hello. Have you tried running Box2D on Android? If so, did you build Box2D for Android or did you add the Box2D source to your project? Or did you include the jar assembly, as is available here: https://doc.qt.io/qt-6/android-3rdparty-libs.html What is the best and the simplest way?

        All I found are these two sources. But they are complex. Is there a simple step by step guide?

        • https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application
        • https://www.packtpub.com/product/android-ndk-game-development-cookbook/9781782167785

        I ran the first triangle on OpenGL ES 2.0 on emulator and smartphone. I want to make a demo on Box2D.

        7b7a2f4a-bb1a-4e74-8835-2c148cc89506-image.png

        JoeCFDJ Offline
        JoeCFDJ Offline
        JoeCFD
        wrote on last edited by JoeCFD
        #2

        @8Observer8 said in How to set up Box2D for Android:

        Box2D

        I guess you can build it as a dynamic or static lib and simply add the lib to your project. Both ways will work.

        1 Reply Last reply
        1
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #3

          Hi,

          You might want to check the qml-box2d project.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • 8Observer88 8Observer8

            Hello. Have you tried running Box2D on Android? If so, did you build Box2D for Android or did you add the Box2D source to your project? Or did you include the jar assembly, as is available here: https://doc.qt.io/qt-6/android-3rdparty-libs.html What is the best and the simplest way?

            All I found are these two sources. But they are complex. Is there a simple step by step guide?

            • https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application
            • https://www.packtpub.com/product/android-ndk-game-development-cookbook/9781782167785

            I ran the first triangle on OpenGL ES 2.0 on emulator and smartphone. I want to make a demo on Box2D.

            7b7a2f4a-bb1a-4e74-8835-2c148cc89506-image.png

            8Observer88 Offline
            8Observer88 Offline
            8Observer8
            wrote on last edited by 8Observer8
            #4

            I see that I can build a shared/static library from Qt Creator for Android:
            fed51811-7ff7-46ea-bc82-c63c2d0e100e-image.png

            I think I can add the Box2D source code and build the library. I'll try later. I don't know how to use this vehicle yet. I haven't found a step by step guide yet. First I want to try adding the Box2D source code to a project without libraries.

            1 Reply Last reply
            0
            • 8Observer88 8Observer8

              Hello. Have you tried running Box2D on Android? If so, did you build Box2D for Android or did you add the Box2D source to your project? Or did you include the jar assembly, as is available here: https://doc.qt.io/qt-6/android-3rdparty-libs.html What is the best and the simplest way?

              All I found are these two sources. But they are complex. Is there a simple step by step guide?

              • https://wiki.qt.io/How_to_create_a_library_with_Qt_and_use_it_in_an_application
              • https://www.packtpub.com/product/android-ndk-game-development-cookbook/9781782167785

              I ran the first triangle on OpenGL ES 2.0 on emulator and smartphone. I want to make a demo on Box2D.

              7b7a2f4a-bb1a-4e74-8835-2c148cc89506-image.png

              8Observer88 Offline
              8Observer88 Offline
              8Observer8
              wrote on last edited by 8Observer8
              #5

              I found the simplest way. I just include the source code of Box2D to my project:

              42bb99dc-714b-445e-a43f-2418e196cb20-image.png

              It allows me to have the same code base for Desktop and Android:

              6bd14b30-9d4e-4da8-a0af-e2b51a0eee98-image.png

              cb391ca2-e7b6-4259-9210-b51f897fbcbf-image.png

              bd97385f-b07a-4bf9-90c7-825055146aed-image.png

              1 Reply Last reply
              0
              • 8Observer88 8Observer8 has marked this topic as solved on

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved