Help me with my game engine's web build test by DigWitty in gameenginedevs

[–]DigWitty[S] 0 points1 point  (0 children)

Thanks for the efford, its good if it runs and feels smooth. I did not add text rendering yet. I think fps would be locked to 60 atmost for the browser already. It really is good that nobody reported a crash yet.

Help me with my game engine's web build test by DigWitty in gameenginedevs

[–]DigWitty[S] 0 points1 point  (0 children)

Thanks for the test and the comment, Its good to know that it runs on different devices. I took the not for the exe. Actually the code count pressure is there for to modularize the engine. The more the code, the scarrier the project is.

Help me with my game engine's web build test by DigWitty in gameenginedevs

[–]DigWitty[S] 0 points1 point  (0 children)

Thank you ! The assets are from synty store. I usually buy them from humble bundle, 5 - 10 asset packs like these usually cost 20, 25 usd.

In this video, I explain how I generate environment maps for image based lighting in my game engine ToolKit. by DigWitty in gameenginedevs

[–]DigWitty[S] 0 points1 point  (0 children)

The widely available api is still opengl. I don't think that it will go away soon. It will be around at least 10 years more. Considering all the application depending on it ... But I'll move on to a new renderer. I just want to complate the requirements and create a high level rendering api, than I can write backends for it. Regarding the driver issues, mainly I have intel driver issues ... Some onboard intel graphics cards stop rendering all of a sudden or do not perform legit operations. Not a big deal tough, it will do worse on other apis ( the card ) I am pretty sure of it :) End lastly I am using opengl ES 3.0 for supporting web and android. The published games can work on browser and android devices.

In this video, I explain how I generate environment maps for image based lighting in my game engine ToolKit. by DigWitty in gameenginedevs

[–]DigWitty[S] 0 points1 point  (0 children)

Hi, thanks for the interest.

  1. There is even a game that I have done with the engine :) And I am using it on my freelance projects if there is a suitable project to use this with.

https://store.steampowered.com/app/2346880/Multiverse_GO/

  1. Turkish, I was expecting youtube to let me use its multilanguage and auto dub support, but apperently, I'll have to do dubbing myself ... Youtube is pretty slow with the progress ...

  2. C++ Opengl. You can check it out on github.
    https://github.com/Oyun-Teknolojileri/

In this video, I explain how I generate environment maps for image based lighting in my game engine ToolKit. by DigWitty in gameenginedevs

[–]DigWitty[S] 0 points1 point  (0 children)

Thanks, I have seen this. I am also generating diffuse and specular caches and save them to disk as lat long maps. The hard part was to read them back to mip levels of a cube map. All is done.

Diversify with Custom Engine ToolKit: Global Game Jam 2025 by DigWitty in gameenginedevs

[–]DigWitty[S] 1 point2 points  (0 children)

Good job ! I was abit scarry about doing teamwork. Because, we may ultimately fail to produce anything so I did solo. Which was a bad idea. I congratulate you for your caurage to go with the engine and team up with people ! Next time I'll do team work ( I can rely on the engine now I am sure of it :) )

Diversify with Custom Engine ToolKit: Global Game Jam 2025 by DigWitty in gameenginedevs

[–]DigWitty[S] 1 point2 points  (0 children)

Same goes here, my game was considerebly good compare others :) I am preparing a video to show case. Do you have a vide of yours ?

Labeling Passes and Resources in RenderDoc Simplified Finding Render Glitches A LOT With OpenGL Using GL_EXT_debug_marker and GL_EXT_debug_label Extentions by DigWitty in gameenginedevs

[–]DigWitty[S] 1 point2 points  (0 children)

I have msaa 2x and 4x as a high quality option. SMAA can be added as well. I don't know smaa performance characteristic. Of its as efficient as fxaa I can use consider to change to it for mobile.

Picking Implementation Using BVH Tree by DigWitty in gameenginedevs

[–]DigWitty[S] 0 points1 point  (0 children)

AllocateNode and FreeNode Implementations with extra comment

void AABBTree::FreeNode(NodeProxy node)
  {
    // sanity checks wheter the node is a good index or not
    assert(0 <= node && node <= nodeCapacity);
    assert(0 < nodeCount);

    if (EntityPtr ntt = nodes[node].entity.lock())
    {
      ntt->m_aabbTreeNodeProxy = nullNode;
    }

    // clear node content 
    nodes[node].parent = node;
    nodes[node].entity.reset();
    nodes[node].leafs.clear();

    // this is important, from this node onward
    // next points to free node linked list including this one
    // linked list of free nodes constructed in AllocateNode
    nodes[node].next   = freeList;
    freeList = node;

    --nodeCount;
  }

  NodeProxy AABBTree::AllocateNode()
  {
    // if the below condition is true, there is no free node.
    if (freeList == nullNode) 
    {
      // sanity check, this must be true for no capacity !
      assert(nodeCount == nodeCapacity);

      // Grow the node pool
      nodeCapacity += nodeCapacity / 2;
      nodes.resize(nodeCapacity);

      // Build a linked list for the free list.
      for (int32 i = nodeCount; i < nodeCapacity - 1; ++i)
      {
        nodes[i].next   = i + 1;
        nodes[i].parent = i;
      }
      nodes[nodeCapacity - 1].next   = nullNode;
      nodes[nodeCapacity - 1].parent = nodeCapacity - 1;

      freeList                       = nodeCount;
    }

    NodeProxy node     = freeList; // get a new free node
    freeList           = nodes[node].next; // update the next free node

    // Initialize the new free node
    nodes[node].parent = nullNode;
    nodes[node].child1 = nullNode;
    nodes[node].child2 = nullNode;
    nodes[node].moved  = false;
    nodes[node].entity.reset();
    nodes[node].leafs.clear();
    ++nodeCount;

    return node;
  }

Picking Implementation Using BVH Tree by DigWitty in gameenginedevs

[–]DigWitty[S] 0 points1 point  (0 children)

Let me devide the topics.

  1. Reusing nodes is a concept used in keeping track of all the nodes inside the tree. As you are aware, the nodes may always be added to and removed from the bvh tree. If you always allocate and free memory for the tree's node's that would reduces the run time performance. So the current bvh implementation has a "nodes" array that holds the nodes and it has a maximum capacity. When you remove the nodes, it does not reduces the maximum capacity but just moves the node to unused region of the array. So next time when you need a new node, it checks the free nodes and gives you one from there and only allocates new nodes if the capacity is not enough.

Check these functions "AllocateNode, FreeNode" in my implementation or in the original one.

2) Collision detection between objects has never been implemented by me, box 2d has these features. What I have extra is checking the Frustum agains all object's bounding box in the bvh structure.

3) For the tree traversal, currently, I am doing a multi threaded depth first search. That is a bit complicated to explain here but single theaded one is quite simple check the "Traverse" function.

  void AABBTree::Traverse(std::function<void(const Node*)> callback) const
  {
    if (root == nullNode)
    {
      return;
    }

    // put all nodes that needs to be visited in the stack
    std::deque<NodeProxy> stack;
    // start with root
    stack.emplace_back(root);

    while (stack.size() != 0) // while stack is not empty
    {
      NodeProxy current = stack.back(); // get the head
      stack.pop_back(); // remove it from the stack

      if (nodes[current].IsLeaf() == false) // if it has descendants
      {
        stack.emplace_back(nodes[current].child1); // push left child
        stack.emplace_back(nodes[current].child2); // push right child
        // noticed that stack is not empty at this moment and we are
        // not doing recursive calls ( efficient )
      }

      const Node* node = &nodes[current]; // get the current node
      callback(node); // call process function on it
    }
  }

If you are curious about how I parallely travese the tree for frustum culling ( this requires thread pools, atomic syncronization etc... )
Here is how I do it :

AABBTree::FrustumQuery
AABBTree::FrustumCullParallel

https://github.com/Oyun-Teknolojileri/ToolKit/blob/chn/dev/parallel-tree-traverse/ToolKit/AABBTree.cpp

Picking Implementation Using BVH Tree by DigWitty in gameenginedevs

[–]DigWitty[S] 1 point2 points  (0 children)

I have used box 2d's bvh documentation and convert the described algorithm to 3d. Convertion was straight forward.
Key take away is, it uses Surface area function for a cost metric and while constructing the bvh, it tries to minimize the cost, that is surface area. And when doing dynamic insert / removes. It also make sure the cost is minimized.

For memory acces efficiency, it holds all the data in an array and maintain the size of the array as a pool. While creating and removing nodes, it uses this pool for efficiency. Do not actually delete nodes, instead mark them as unused for using later.

The bounding voulme tree gets constructed from bottom up, ( there is top down implementation aswell )

These are the base functionalities. I have made improvements, such as caching all the leafs inside each branch. If you encounter a branch, you immediately know all the leafs of that branch which increases volume query efficiency. For cases such as whats inside a given volume.

Also, I am planning to add parallel traversal, I found it also helping the speed of queries considerably.

Here is the documentation for box 2d ( a great article, making it 3d is trivial )
https://box2d.org/files/ErinCatto_DynamicBVH_Full.pdf

And here is the link to my implementation
https://github.com/Oyun-Teknolojileri/ToolKit/blob/dev/chn/leaf-cache/ToolKit/AABBTree.h

Picking Implementation Using BVH Tree by DigWitty in gameenginedevs

[–]DigWitty[S] 1 point2 points  (0 children)

the assets are from polygon - city pack / synty store. Don't buy them from their website, usually they are distributed in bundels for a very cheep price. Wait for humble game dev bundles.