Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Game Development
  4. Small examples for game development in Qt, OpenGL, Box2D, Bullet Physics, OpenAL, and so on.
Qt 6.12 LTS is out! See what's new in the release blog

Small examples for game development in Qt, OpenGL, Box2D, Bullet Physics, OpenAL, and so on.

Scheduled Pinned Locked Moved Game Development
48 Posts 2 Posters 54.9k Views 2 Watching
  • 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
    #39
    This post is deleted!
    1 Reply Last reply
    0
    • 8Observer88 Offline
      8Observer88 Offline
      8Observer8
      wrote on last edited by 8Observer8
      #40

      I have found two solutions how I can make the first person movement in the browser. Qt doesn't allow it because it is impossible to call emscripten_request_pointerlock() from Qt application: https://bugreports.qt.io/browse/QTBUG-126513

      The solution is to use SDL3, Emscripten, and Bullet Physics: Click to run a demo in the browser

      The demo allows to move with first person and third person view:

      image.png

      Baked shadows and textures using SDL3, Emscripten, OpenGL ES 2.0, Bullet Physics, and C++

      Demo in the browser

      5f457ae3-d03b-492f-b513-f540abaec581-image.png

      1 Reply Last reply
      1
      • 8Observer88 8Observer8 referenced this topic on
      • 8Observer88 Offline
        8Observer88 Offline
        8Observer8
        wrote on last edited by 8Observer8
        #41

        Critical problems for WebAssembly

        • Background color of parent window is changed to black: https://bugreports.qt.io/browse/QTBUG-120651
        • emscripten_request_pointerlock() returns EMSCRIPTEN_RESULT_UNKNOWN_TARGET: https://bugreports.qt.io/browse/QTBUG-126513
        • Dealing with keyboard layout for input on Qt WebAssembly: https://forum.qt.io/post/790688
        1 Reply Last reply
        0
        • 8Observer88 Offline
          8Observer88 Offline
          8Observer8
          wrote on last edited by 8Observer8
          #42

          Transformed triangle in OpenGL 3.3 and Qt 6.9

          Video: https://www.youtube.com/watch?v=AGHZsOrazEU

          Source: https://github.com/8Observer8/basics-of-opengl33-and-qt6

          8526e0b2-cde0-4c79-96d4-220d88def3fe-image.png

          1 Reply Last reply
          0
          • 8Observer88 Offline
            8Observer88 Offline
            8Observer8
            wrote on last edited by
            #43

            Debug drawer for Box2D v3 using QPainter

            It uses b2World_Draw to draw Box2D objects for debugging. You can just download and run it without compiling libs because it include libs for Windows (MinGW) and Android.

            Source: https://github.com/8Observer8/debug-drawer-qpainter-box2dv3-qt6-cpp

            image.png

            1 Reply Last reply
            0
            • 8Observer88 8Observer8 referenced this topic on
            • Christian EhrlicherC Christian Ehrlicher locked this topic on
            • Christian EhrlicherC Christian Ehrlicher unlocked this topic
            • 8Observer88 Offline
              8Observer88 Offline
              8Observer8
              wrote last edited by
              #44

              Tank-transistor movement with Bullet Physics

              View Live Wasm-Demo - you can control the tank-transistor with WASD-keys in the browser

              Source code

              a0494311-9820-426b-83d4-5bc2876c2518-image.png

              1 Reply Last reply
              0
              • 8Observer88 Offline
                8Observer88 Offline
                8Observer8
                wrote last edited by 8Observer8
                #45

                Tutorials from Box2D/Box3D creator Erin Catto on the control character:

                Rigid body character mover

                Dynamic Character Mover : Box3D

                1 Reply Last reply
                0
                • 8Observer88 Offline
                  8Observer88 Offline
                  8Observer8
                  wrote last edited by 8Observer8
                  #46

                  Dear ImGui + Qt 6 + OpenGL 3.3 for Windows

                  Source code: https://github.com/ivan-enzhaev/imgui-opengl-test-qt6

                  9353bb7e-9766-4355-86ca-d0fc2a3ddad5-image.png

                  1 Reply Last reply
                  0
                  • 8Observer88 Offline
                    8Observer88 Offline
                    8Observer8
                    wrote last edited by 8Observer8
                    #47

                    Qt 6 + SDL3_image (WebP) + Modern OpenGL 3.3 Core (Desktop)

                    A step-by-step guide to configuring and running a static desktop project integrating Qt 6 and SDL3_image with WebP support and an OpenGL 3.3 context on Windows and Ubuntu.

                    The free texture clear_01.png used in this project was downloaded from OpenGameArt (Crate #5) and converted to WebP format (clear_01.webp).

                    Source Code

                    5ab4230e-2db4-4e70-b499-097fb80e9298-image.png

                    1 Reply Last reply
                    0
                    • 8Observer88 Offline
                      8Observer88 Offline
                      8Observer8
                      wrote last edited by
                      #48

                      Qt 6 + cglm + SDL3_image (WebP) + Modern OpenGL 3.3 Core: Rotating 3D Textured Cube (Desktop)

                      A step-by-step guide to configuring and running a static desktop project integrating Qt 6, cglm math library for Perspective, View, and Model (MVP) transformations, a dedicated UV buffer, depth testing, SDL3_image with WebP, and smooth 90°/s rotation via QTimer on Windows and Ubuntu.

                      Source Code

                      Executables (Windows and Linux)

                      Live Wasm Demo

                      3c2710ed-0718-452e-82e9-3b5b463e4e04-image.png

                      1 Reply Last reply
                      0

                      • Login

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