A tree is a hierarchical data structure that simulates a tree structure with a set of linked nodes.
0
votes
0answers
14 views
Ask about AVL Tree [on hold]
bool FindTree(AVLNODE *T, int x)
{
if (T->Key == x)
return true;
return false;
if (T->Key < x)
FindTree(T->pRight, x);
FindTree(T->pLeft, x);
}
I ...
0
votes
0answers
8 views
How to store set of behavioral rules?
I have this idea in my head to create a game where the player creates a bot and defines its behavior. The bot is then sent to an open world (a very simplistic one) and has to survive as long as ...
3
votes
0answers
62 views
Simulating wind (vertex bending)
Right now I'm using the Crytek vegetation bending technique, vertex colors control how much force is applied to the branches, leafs and trunks. I have it working and it looks nice but I'm just using ...
1
vote
1answer
50 views
How to ensure a condition in a behaviour tree when processing followin nodes?
Exmaple Tree (Source):
As far as I understood, a sequencer iterates over the children until one failed or all are successful. If one children returns "running", the sequencer will start to process ...
0
votes
1answer
111 views
Why do KD trees put the median split exactly on a point?
I've understood that KD tree split points using the median while cycling on each axis. I've also understood that at each node traversal, a nearest search must use a sphere to store to nearest neighbor ...
2
votes
1answer
104 views
How to set indent spacing of a tree in libGDX scene2d?
I've been trying to create a customized UI using scene2d library in libGDX. However I am having troubles as I'm trying to set a custom indent spacing on my Tree object.
I have tried to search for the ...
2
votes
1answer
134 views
How to prune an AI game tree for a game like Magic?
I've got a game tree structure for my AI that I need to trim in order to gain some depth.
It is a single-player game of perfect information. A good analogy would be a single-player game of Magic the ...
1
vote
1answer
39 views
Texturing in blender
I am texturing a tree in bender using the sappling add-on, when i put the tree bark texture (which is saved as .jpg) the texture looks stretched and wierd, ive used "Use UV for mapping" on the curve ...
4
votes
1answer
68 views
What is a viable way of finding the minimum swaps to sort numbers in pyramid?
I have made a game that consists of a pyramid of hexagons with numbers from 00 to 99 randomly positioned in groups of 6, 10 or 15 elements. Now, I'm working to create an auto-solver but for the last 2 ...
1
vote
1answer
91 views
QuadTree Checking Collision With Different Levels of Nodes
I am making a QuadTree for a 2D Platformer. Researched on it and I managed to make a pretty good one where each node stores its 4 SubNode and there's a MAX_OBJECTS for each Node and MAX_LEVELS which ...
2
votes
2answers
241 views
AI for Shogi, dealing with high branching factor due to drop rule [closed]
I'm writing a Shogi program with a computer player in Java from scratch as my undergradute
dissertation project. Due to the drop rule, when the computer player captures a few pieces, the branching ...
3
votes
2answers
344 views
Implementing A* with Heap tree
I'm trying to implement Heap into my A* algorithm, However I'm having trouble with implementing one method. The Contains method. Which checks if the heap array has a specific node in it or not. I don'...
-1
votes
1answer
353 views
Should I use octree or quadtree for my spacial data structures? [closed]
I would like to know the advantages and disadvantages of using octree or quadtree for spacial data structures? In a 3d gaming setting would you ever need more than 4 children nodes? Does it take ...
2
votes
0answers
540 views
Binary Space Partitioning of 3d Triangle Mesh (for finding nearest points)
I'm writing a Binary Space Partitioning (BSP) tree for the purpose of optimizing finding the nearest point on the surface of a 3d triangle mesh with respect to another point. I'm currently following a ...
6
votes
2answers
2k views
Game AI. Behavior Trees struggles
I'm writing a bot for a MOBA game as final project.
Game status is read directly from the screen (that's the requirement).
Now I have come to the AI part. On the first steps it started as some ...
6
votes
2answers
366 views
Handle movement with QuadTree
I currently have a QuadTree that contains all my Entities. It works well and I've optimized it pretty decently, but the one thing that hurts is that I am removing from and inserting to it almost ...
3
votes
1answer
324 views
Behavior trees - Can sequences and selectors contain conditions?
I can't wrap my head around this. Is it legal for parent nodes to contain additional logic ?
5
votes
3answers
425 views
Algorithm for creating tree-like network structures
I'm trying to procedurally model tree-like network structures with the following properties:
A root with variable number of nodes
A variable depth of nodes
When graphically laid out, edges or nodes ...
3
votes
1answer
616 views
Placing nodes in a graph in a random but readable way
I'd like to create a simple map from vertices and lines - you know, like a usual graph. A tree, to be precise.
To select the location of the next point that comes from one, I use a simple circle-...
0
votes
1answer
230 views
Enumerating full game tree for small board game
I am trying to list all the possible positions in a small board game (nannon) (using C++)
So far I have decided to split it into two parts, the pieces that are in home positions and end positions (...
4
votes
2answers
747 views
Behavior tree implementation details
I have been looking around for implementation details of behavior trees, the best descriptions I found were by Alex Champarand and some of Damian Isla's talk about AI in Halo 2 (the video of which is ...
49
votes
1answer
15k views
Decision Tree vs Behavior Tree
What are some differences between Decision Trees and Behavior Trees for AI Game Development? When would you use one over the other?
2
votes
1answer
607 views
Behavior Trees and Animations
I have started working on the AI for a game, but am confused how I should handle animations. I will be using a Behavior Tree for AI behavior and Cocos2D for my game engine.
Should my "...
14
votes
5answers
6k views
Generated 3d tree meshes
I did not find a question on these lines yet, correct me if I'm wrong.
Trees (and fauna in general) are common in games. Due to their nature, they are a good candidate for procedural generation.
...
12
votes
2answers
3k views
Why are trees shining in background?
Currently I am creating a forest scene in the dark, and the trees are shining far away, but when I get close they are fine. I have the shaders set to "Nature/Tree Soft Occlusion [bark/leaves]", but ...
3
votes
1answer
769 views
Tic-Tac-Toe game AI
I'm looking into creating a simple tic tac toe/noughts and crosses game in Actionscript3 and am trying to understand the ideas behind the AI used in a game like this.
I've seen some simplistic ...
1
vote
1answer
190 views
Dynamic quadrees
Recently I started writing a Quadtree for creature culling in Opendungeons game.
Thing is these are moving points and the bounding hierarchy will quickly get lost if the quadtree is not rebuild very ...
6
votes
2answers
7k views
How do I optimize searching for the nearest point?
For a little project of mine I'm trying to implement a space colonization algorithm in order to grow trees.
The current implementation of this algorithm works fine. But I have to optimize the whole ...
3
votes
2answers
455 views
Balancing a binary tree continuously
In my game I have a tree of objects in 3D space, to which new objects are frequently added.
Over time, the binary tree becomes unbalanced which is a big problem for efficiency as the tree can become ...
2
votes
2answers
1k views
Algorithm to generate small tree-like branches?
I'd like to seed a void map with "branches" of sine waves or any other waveform. Something like:
Know of any algorithm? Has to be one to generate trees or something like that.
10
votes
4answers
7k views
2D Spatial partitioning alternatives to spatial hashes and quadtrees
I've been trying to implement a spatial partitioning algorithm in my game, but both spatial hashes and quadtrees aren't what I'm looking for.
My level size is not supposed to have a limit (only Int32 ...
2
votes
2answers
210 views
Help computing visibility in old 3d game format
I am trying to compute visibility in an old 3d file format. I am using a BSP tree have finally gotten everything built and traversable.
Now I don't have any sort of PVS, potentially visible set to ...
19
votes
1answer
14k views
Behaviour tree code example?
http://altdevblogaday.org/2011/02/24/introduction-to-behavior-trees/
Obviously the most interesting article I found on this website. What do you think about it ?
It lacks some code example, don't ...
3
votes
2answers
772 views
Efficiently representing a dynamic transform hierarchy
I'm looking for a way to represent a dynamic transform hierarchy (i.e. one where nodes can be inserted and removed arbitrarily) that's a bit more efficient than using a standard tree of pointers . I ...
18
votes
3answers
7k views
How to procedurally (create) grow an artistic (2D) tree in real-time (L-System?)
Recently I programmed an L-system module, It got me interested further. I am a Plants vs Zombies junkie as well, really liked the concept of Tree of Wisdom. Would love to create similar procedural art ...
9
votes
2answers
891 views
Efficient structure for representing a transform hierarchy
Can anyone suggest a memory efficient way to represent a tree of matrices, for example in a hierarchy model?
I'm particularly keen to preserve data locality, and I suspect a structure-of-arrays (...