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
50 Posts 2 Posters 56.0k Views 3 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
    #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
                  • 8Observer88 Offline
                    8Observer88 Offline
                    8Observer8
                    wrote last edited by
                    #49

                    Qt 6 + cgltf + cglm + SDL3_image (WebP) + Modern OpenGL 3.3 Core: Rotating 3D Textured Model Y-Bot (Desktop)

                    A step-by-step guide to configuring and running a static desktop project integrating Qt 6, the cgltf library for parsing glTF binary (.glb) files, cglm math library for Perspective, View, and Model (MVP) transformations, depth testing, SDL3_image with WebP, and smooth 90°/s rotation around the Y-axis via QTimer on Windows and Ubuntu.

                    Note. The 3D model was downloaded from Mixamo, and an optimized low-poly version was created with Blender and exported to y-bot.glb and y-bot.webp.

                    Source Code

                    Executables (Windows and Linux)

                    Live Wasm Demo

                    322ac032-da90-492a-8e66-7867759db3fa-image.png

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

                      It is the same as above but it uses WebGPU-Native instead of OpenGL on Windows and Ubuntu.

                      Qt 6 + cgltf + cglm + SDL3_image (WebP) + WebGPU (wgpu-native): Rotating 3D Textured Model Y-Bot (Desktop)

                      A step-by-step guide to configuring and running a static desktop project integrating Qt 6, WebGPU (wgpu-native) with WGSL shaders, the cgltf library for parsing glTF binary (.glb) files, cglm math library for Perspective, View, and Model (MVP) transformations, depth testing, SDL3_image with WebP, and smooth 90°/s rotation around the Y-axis via QTimer on Windows and Ubuntu.

                      Note. The 3D model was downloaded from Mixamo, and an optimized low-poly version was created with Blender and exported to y-bot.glb and y-bot.webp.

                      Source Code

                      Executables (Windows and Linux)

                      Live Wasm Demo

                      textured-y-bot-cgltf-cglm-sdl3-image-webp-webgpu-qt6-desktop.gif

                      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