Current design decisions for my game engine:
-
The other major non-traditional UI type I need is a node/graph editor (like the one in Blender for materials / geometry nodes). I need it primarily for complex animation graphs, and I'd also like to use it for dialogue trees and maybe quest scripting.
Haven't tried it yet but QtNodes seems promising: https://github.com/paceholder/nodeeditor
It's also based on QtWidgets. Again, not a deal breaker, looks like I could embed it in QML if I wanted to.
I wish the situation was reversed - making my own node editor system seems doable and maybe even fun, while making a flexible docking solution for an existing UI framework just feels annoying...
I wonder if it would be easiest to fork "Advanced Docking System for Qt" and add Wayland support 🤔 Tbf it does seem to work under XWayland already, but I feel like if I write new software it should try to support Wayland natively, even though it's a pain...
-
I wish the situation was reversed - making my own node editor system seems doable and maybe even fun, while making a flexible docking solution for an existing UI framework just feels annoying...
I wonder if it would be easiest to fork "Advanced Docking System for Qt" and add Wayland support 🤔 Tbf it does seem to work under XWayland already, but I feel like if I write new software it should try to support Wayland natively, even though it's a pain...
Ok looks like the missing feature in Wayland which was blocking a fix for the advanced docking system has since been merged and this should be doable now. The maintainer isn't interested in Linux support but would be open to PRs.
-
Ok looks like the missing feature in Wayland which was blocking a fix for the advanced docking system has since been merged and this should be doable now. The maintainer isn't interested in Linux support but would be open to PRs.
Alright I checked out the demo of Advanced Docking System and it also does exactly what I need, under a BSD license, as long you force it to run via X11/XWayland. I think I'll just go with this for now and if I _really_ need proper Wayland support I'll look into upstreaming a fix. And maybe someone else will do it until then :D
-
Alright I checked out the demo of Advanced Docking System and it also does exactly what I need, under a BSD license, as long you force it to run via X11/XWayland. I think I'll just go with this for now and if I _really_ need proper Wayland support I'll look into upstreaming a fix. And maybe someone else will do it until then :D
I'm having Rust thoughts again. Somebody stop me please.
-
You know, if I really do end up using Qt for my game engine editor, maybe it'll land under the KDE umbrella one day 🤔 KameEngine
-
You know, if I really do end up using Qt for my game engine editor, maybe it'll land under the KDE umbrella one day 🤔 KameEngine
Quick progress update:
- Implemented prototype of an input system (more on that when the details are clearer)
- Made a simple freefly camera controller with it
- Implemented the Pool/Handle system from the HypeHype talk ( https://mastodon.gamedev.place/@tracefree/115162926709506134 ) for meshes, textures, etc
- Worked around an issue in Qt Advanced Docking System, it's now the most viable option so next step will be making a simple editor -
Quick progress update:
- Implemented prototype of an input system (more on that when the details are clearer)
- Made a simple freefly camera controller with it
- Implemented the Pool/Handle system from the HypeHype talk ( https://mastodon.gamedev.place/@tracefree/115162926709506134 ) for meshes, textures, etc
- Worked around an issue in Qt Advanced Docking System, it's now the most viable option so next step will be making a simple editorDecided not to natively support Wayland for the engine editor for the time being, just via XWayland. I made an honest effort but I already spent more time on this than I did on setting up Vulkan to draw triangles and there's just one hindrance after another. There's extensions for most of them but they're either still planned or not widely adopted yet. With X11 it's way simpler to e.g. embed a window into another window as a dockable widget.
The game itself does support Wayland though.
-
Decided not to natively support Wayland for the engine editor for the time being, just via XWayland. I made an honest effort but I already spent more time on this than I did on setting up Vulkan to draw triangles and there's just one hindrance after another. There's extensions for most of them but they're either still planned or not widely adopted yet. With X11 it's way simpler to e.g. embed a window into another window as a dockable widget.
The game itself does support Wayland though.
The good news is that I got Qt Advanced Docking System to work together with 3D viewports of my Vulkan engine just the way I had envisioned :D
So now I can finally focus more on editor features such as gizmos, scene tree editing, component inspectors, etc -
The good news is that I got Qt Advanced Docking System to work together with 3D viewports of my Vulkan engine just the way I had envisioned :D
So now I can finally focus more on editor features such as gizmos, scene tree editing, component inspectors, etcAlso I removed all QtQuick (Qt's more "browser-like" UI framework) dependencies for now. It seemed nice but two of the libraries I want to use are based on QtWidgets (a more traditional C++ framework) and I'd rather not mix and match unless I find a good reason for it.
This also simplifies viewports. I no longer export/import memory between two Vulkan instances and instead just embed my game's SDL window in a Qt dock widget.
-
Also I removed all QtQuick (Qt's more "browser-like" UI framework) dependencies for now. It seemed nice but two of the libraries I want to use are based on QtWidgets (a more traditional C++ framework) and I'd rather not mix and match unless I find a good reason for it.
This also simplifies viewports. I no longer export/import memory between two Vulkan instances and instead just embed my game's SDL window in a Qt dock widget.
What makes a 3D editor a 3D editor? That's right, an infinite grid!
Implemented the shader from this excellent article by @bgolus: https://bgolus.medium.com/the-best-darn-grid-shader-yet-727f9278b9d8
-
What makes a 3D editor a 3D editor? That's right, an infinite grid!
Implemented the shader from this excellent article by @bgolus: https://bgolus.medium.com/the-best-darn-grid-shader-yet-727f9278b9d8
Now with major and minor grid lines and colored x- and z- axes
-
There's this philosophy that you should be very conservative with the C++ features you use, only use those that are at least a decade old, and that ideally you'd just write C.
I'm of the philosophy that I wanna see for myself if a feature is problematic, even if I might have to suffer the consequences.
Anyway last week I learned about C++ "concepts" and over the weekend I already found a use case for them. Terrible name but cool concept!
-
There's this philosophy that you should be very conservative with the C++ features you use, only use those that are at least a decade old, and that ideally you'd just write C.
I'm of the philosophy that I wanna see for myself if a feature is problematic, even if I might have to suffer the consequences.
Anyway last week I learned about C++ "concepts" and over the weekend I already found a use case for them. Terrible name but cool concept!
In a similar vein, I tried out C++ modules in the previous iteration of the engine and learned first hand why people warn against them. No regrets though.
-
In a similar vein, I tried out C++ modules in the previous iteration of the engine and learned first hand why people warn against them. No regrets though.
Camera controls for the engine editor. I stole the exact keybindings from Godot >:)
-
Finally had some time again to work on the project. The scene tree is now shown in a QTreeView and you can toggle the visibility of individual nodes. Also re-implemented the resource manager and scene deserialization from the previous version.
Next up: Let the editor actually edit the scene and save it to disk!
-
Finally had some time again to work on the project. The scene tree is now shown in a QTreeView and you can toggle the visibility of individual nodes. Also re-implemented the resource manager and scene deserialization from the previous version.
Next up: Let the editor actually edit the scene and save it to disk!
Wait, this isn't progressing in the right direction - maybe I should take a break...
-
Today has been a very relaxing goblin mode coding Sunday :D Some more non-visual updates:
- StringIDs. Like Godot's StringNames, interned¹ strings are hashed and stored in an internal database. "bla"_id gets converted to a handle that is faster to compare for equality than std::strings.
- Loading scenes from the editor via a file dialog, including a "Recents" menu. The UI was surprisingly easy to implement with Qt!
-
Today has been a very relaxing goblin mode coding Sunday :D Some more non-visual updates:
- StringIDs. Like Godot's StringNames, interned¹ strings are hashed and stored in an internal database. "bla"_id gets converted to a handle that is faster to compare for equality than std::strings.
- Loading scenes from the editor via a file dialog, including a "Recents" menu. The UI was surprisingly easy to implement with Qt!
Thinking about the next steps for the editor. I want to add a transform gizmo, which means I need some way of recognizing when I click/drag things in the 3D viewport, so I'll try to find out how other editors do that. Naively I'd think I need a physics engine for that, but in Godot I can accurately select meshes without collision shapes 🤔
-
Thinking about the next steps for the editor. I want to add a transform gizmo, which means I need some way of recognizing when I click/drag things in the 3D viewport, so I'll try to find out how other editors do that. Naively I'd think I need a physics engine for that, but in Godot I can accurately select meshes without collision shapes 🤔
AABBs (partially) implemented
They don't support scaling and rotations yet, but for starters it's good enough for (1) visualizing selected nodes and (2) testing raycasts from the cursor position against.
-
AABBs (partially) implemented
They don't support scaling and rotations yet, but for starters it's good enough for (1) visualizing selected nodes and (2) testing raycasts from the cursor position against.
Got node selection working, without a physics engine or CPU-side triangle raycasting! Used this idea from a colleague:
- Put mouse position and node ID into push constants
- In the fragment shader, check if current pixel is under the mouse
- If so, write node ID and depth into a list in a storage buffer
- On CPU, read back the buffer and sort by depthUpside: No need for AABB testing, proxy meshes, or duplicating skinning code on the CPU
Downside: Has to be included in most shaders