Graph is an data structure for a set of objects where some pairs of the objects are connected by links.
20
votes
5answers
4k views
Why is the origin in computer graphics coordinates at the top left?
From what I've seen almost all things use coordinates where (0, 0) is at the top left and the positive Y-axis goes in the downwards direction of your screen.
Why is it like this? Why not the ...
10
votes
1answer
2k views
To scene graph or not to scene graph?
I've been struggling with a decision regarding whether or not to implement a scene graph in my game. I have some use cases that call for such a tool, but I haven't been able to get through some of the ...
7
votes
2answers
190 views
How to create a map from graph
I want to draw a 2d polygon map based on data provided by another source to ease analysing actions on the map. The data has the following format:
1 ['2', '4', '5', '7', '17', '10']
2 ['1', '3', '4']
...
7
votes
3answers
833 views
Determine if a set of tiles on a grid forms an enclosed shape
Given a set of tiles on a grid, I want to determine:
If the tiles make an enclosed figure
If the tiles make an enclosed figure when you count the sides of the board as an edge of the figure
If ...
6
votes
3answers
1k views
How to find path in graph without crossing the walls?
I would like to know how to find path in a graph while having the edges "double-sided". Consider this scenario:
I have list of the line segments. These represents "walls" or rather impassable edges ...
6
votes
1answer
803 views
Delaunay triangulation. Where to start?
I'm trying to learn procedural generation technique's. Specifically for dungeons. I started off with a 2D array and I generate my rooms fine. Each room contains wall tiles as seen in the screenshot ...
6
votes
4answers
134 views
Evenly distributed checkpoints in a procedurally generated world?
Got a procedurally generated world. It's succinctly described as an undirected acyclic graph where vertices are junctions and edges weights/length note the amount of time/effort guesstimated to be ...
6
votes
1answer
4k views
C# graph library to be used from Unity3D [closed]
I'm looking for a C# graph library to be used inside Unity3D script.
I'm not looking for pathfinding libraries (I know there are good one available).
I could consider using a path finding library ...
5
votes
1answer
154 views
trapped inside a Graph : Find paths along edges that do not cross any edges
This is a graph based platformer level and the round shapes are creatures.
I am looking for a path traveling along edges that does not cross other edges(To simulate the creature crawling on the ...
5
votes
1answer
261 views
A* for non grid network
For my specific case, I am trying to find a path finding implementation similar to what described here.
I could see reference implementation for A* and HPA*, but I wonder how to extend A* to simple ...
5
votes
4answers
886 views
Dynamic Dijkstra
I need dynamic dijkstra algorithm that can update itself when edge's cost is changed without a full recalculation. Full recalculation is not an option.
I've tryed to "brew" my own implemantion with no ...
5
votes
1answer
335 views
Triangulating a partially triangulated mesh (2D)
Referring to the above exhibits, this is the scenario I am working with:
starting with a planar graph (in my case, a 2D mesh) with a given triangulation, based on a certain criterion, the graph ...
4
votes
1answer
1k views
Find sub-graphs in a graph
The initial problem I'm trying to solve is for pac-man, but of course there must be thousands of other situations with the same problem. I consider the pac-man grid to be a graph (two ways of doing ...
3
votes
1answer
636 views
Better data structure for a game like Bubble Witch
I'm implementing a bubble-witch-like game (http://www.king.com/games/puzzle-games/bubble-witch/), and I was thinking on what's the better way to store the "bubbles" and to work with. I thought of ...
3
votes
1answer
395 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 ...
2
votes
2answers
202 views
State propagation in modern OpenGL
When last I dabbled in game development, I managed my geometry in a tree. Every node would call the render method on it's children, prior to resetting it's transformations, thus allowing the ...
2
votes
2answers
1k views
Data structure for bubble shooter game
I'm starting to make a bubble shooter game for a mobile OS. Assume this is just the basic "three or more same-color bubbles that touch pop" and all bubbles that are separated from their group ...
2
votes
3answers
867 views
Integrating Scene Graphs and Physics Engines
For some specific reasons, i will have to use a graphic engine based on Scene Graphics with a Physic Engine without this concept.
I was thinking about a clear way to integrate both representation but ...
2
votes
2answers
113 views
How can I test if a point is behind a polygon in 2D?
In order to improve the performance of my visibility graph generator I am trying to figure out the following.
Given the image below; is there a way to find out if a point is 'behind' the polygon? For ...
2
votes
1answer
67 views
How can I cut a graph representing 2D positions into two sub-graphs?
I have a graph where each node is associated with a 2D position. I would like to use a finite line to "cut" this graph into two halves, as shown below:
Note that the cutting line does have a ...
2
votes
2answers
155 views
Splitting Graph into distinct polygons in O(E) complexity
If you have seen my last question:
trapped inside a Graph : Find paths along edges that do not cross any edges
How do you split an entire graph into distinct shapes 'trapped' inside the graph(like ...
2
votes
1answer
235 views
Is finding graph minors without single node pinch points possible?
Is it possible to robustly find all the graph minors within an arbitrary node graph where the pinch points are generally not single nodes? I have read some other posts on here about how to break up ...
2
votes
0answers
86 views
Graph Isomorphism > What kind of Graph is this? [closed]
Essentially, this is a variation of Comparing Two Tree Structures, however I do not have "trees", but rather another type of graph.
I need to know what kind of Graph I have in order to figure out if ...
1
vote
1answer
1k views
Moving sprites on a graph in libGDX
In my game I'd like to move sprites on a fixed path. Until this point I was trying to stick with the tools already provided by libGDX, like the Tiled map renderer classes so I'm looking for a solution ...
1
vote
1answer
88 views
Voronoi / Delaunay Graph - Triangle Circumcenter error
I have written a Delaunay Graph script that given a set of points (voronoi cell/region) will generate the Delaunay triangles with their edges. Considering that the Voronoi diagram is complimentary to ...
1
vote
1answer
142 views
Algorithms for positioning rectangles evenly spaced with unknown connecting lines
I'm new to game development, but I'm trying to figure out a good algorithm for positioning rectangles (of any width and height) in a given surface area, and connecting them with any variation of ...
1
vote
1answer
109 views
More Precise PathSmoothing
I'm reading a book about AI - Path planning and path smoothing. Yet this book is using c++ code. And i'm coding in c# with the XNA framework.
I have a path smoothing working, yet the book says it can ...
1
vote
2answers
143 views
Bubble shooter clone, structure for storing/adding of bubbles
Im having a few issues trying to figure out what the best data structure to use for storing bubbles on the grid, and how to connect new bubbles to the grid when a moving ball collides with a ball on ...
0
votes
1answer
122 views
Understanding Scene Graphs and Graph Edges
So I'm trying to getting to grips with using Scene graphs and nodes in my code (game coding in C++) and I think I understand the basics of them and how they are used (and I can definitely see the ...
0
votes
1answer
95 views
Path smoothing while path following
I can't find a nice way to do path smoothing while i'm following a path.
I have tried this piece of code but aparently it doesn't work as suspected.
The idea of how it should work is:
Edge 1 (the ...
0
votes
2answers
349 views
Partial recalculation of visibility on a 2D uniform grid
Problem
Imagine that we have a 2D uniform grid of dimensions N x N. For this grid we have also pre-computed a visibility look-up table, e.g. with DDA, which answers the boolean query is cell X visible ...
0
votes
1answer
45 views
Camera (pole cam) implementation problem
In my project I have simple scene graph to render whole scene and Bullet physics SDK to provide physics simulation.
Each rendered object is represented as scene node. Camera always has target and ...
0
votes
0answers
56 views
Fast algorithm for minimum spanning tree over euclidean distances?
My input is points in a 3d space. Now my goals is to build a minimum spanning tree where the edge cost is the euclidean distance between points (the points are vertices).
My thoughts are to clump ...
0
votes
0answers
61 views
How to combine embedded generated graphs in a finite 2D plane?
I'm pretty new to working with graphs but I'm looking at using them to create the world map for our game (a text mud with rooms/nodes and paths/edges between rooms). There are a number of interesting ...
0
votes
0answers
44 views
Checking if two lines are crossing [duplicate]
How can I check if two lines (created with function love.graphics.line) are crossing themselves? I may use this ability to create procedural maps via graphs.