Jump to content

  • Log In with Google      Sign In   
  • Create Account

Graph theory much use in game programming?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 Zukias   Members   -  Reputation: 109

Like
0Likes
Like

Posted 23 April 2013 - 01:56 PM

There's an option on my university course to study Graph theory next year, I am wondering how widely it is used in game programming and is it useful?

 

 

Thanks in advance for any replies! smile.png



Sponsor:

#2 HappyCoder   Members   -  Reputation: 2880

Like
0Likes
Like

Posted 23 April 2013 - 02:30 PM

I would say yes, definitely useful.

There would be applications for AI such as path finding.

In graphics there could be certain algorithms you could use that apply operations to mesh data. The vertices of the mesh would be a node in the graph as the edges between them would be the edges of the graph.

Edited by HappyCoder, 23 April 2013 - 02:32 PM.


#3 Paradigm Shifter   Crossbones+   -  Reputation: 5436

Like
1Likes
Like

Posted 23 April 2013 - 02:31 PM

It's a long time since I studied some graph theory in a combinatorics course, it wasn't useful for games, more about properties of certain graphs (how many trees with N vertices are there? Is this graph planar? Graph colouring stuff (vertices and edge colouring only), Hamiltonian graphs (graphs where you can visit every vertex without traversing the same edge more than once), etc.

 

It wasn't too hard though so if you want a break from complex analysis I'd recommend it ;) EDIT: And topology. That was really hard as well ;)

 

EDIT: CS graph theory is probably useful though, I'm talking about combinatoric graph theory.


Edited by Paradigm Shifter, 23 April 2013 - 02:36 PM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#4 Zukias   Members   -  Reputation: 109

Like
0Likes
Like

Posted 23 April 2013 - 03:02 PM

It's a long time since I studied some graph theory in a combinatorics course, it wasn't useful for games, more about properties of certain graphs (how many trees with N vertices are there? Is this graph planar? Graph colouring stuff (vertices and edge colouring only), Hamiltonian graphs (graphs where you can visit every vertex without traversing the same edge more than once), etc.

 

It wasn't too hard though so if you want a break from complex analysis I'd recommend it ;) EDIT: And topology. That was really hard as well ;)

 

EDIT: CS graph theory is probably useful though, I'm talking about combinatoric graph theory.

Ah, I'm doing topology next year too :D I like it when it's difficult. Generally, difficult courses are a case of, understand it - then it'll be a breeze. Don't understand it, then you'll have many lumps on your forehead by the end of the module.



#5 Paradigm Shifter   Crossbones+   -  Reputation: 5436

Like
0Likes
Like

Posted 23 April 2013 - 03:24 PM

Ok, do topology, complex analysis, number theory and Galois theory then if you like hard courses ;)

 

The stuff you do in Mathematical Graph Theory is basically proofs of properties of certain types of graphs (so you get a proof of which graphs you can draw without taking your pen off the paper [0 or 2 vertices with odd degree], a proof of Nodes + Regions = Edges + 2 and its extension to graphs on non-planar surfaces, stuff about one-coloured subgraphs of a graph with different coloured vertices, stuff like that).

 

EDIT: Hey, I've thought of a use, you can use it to check whether a network can be drawn on a plane without any crossings, which can be useful for user interface stuff, and there was a game involving untangling crossed wires ;) see:

 

http://en.wikipedia.org/wiki/Planar_graph


Edited by Paradigm Shifter, 23 April 2013 - 03:40 PM.

"Most people think, great God will come from the sky, take away everything, and make everybody feel high" - Bob Marley

#6 Zukias   Members   -  Reputation: 109

Like
0Likes
Like

Posted 23 April 2013 - 06:33 PM

Ok, do topology, complex analysis, number theory and Galois theory then if you like hard courses ;)

 

The stuff you do in Mathematical Graph Theory is basically proofs of properties of certain types of graphs (so you get a proof of which graphs you can draw without taking your pen off the paper [0 or 2 vertices with odd degree], a proof of Nodes + Regions = Edges + 2 and its extension to graphs on non-planar surfaces, stuff about one-coloured subgraphs of a graph with different coloured vertices, stuff like that).

 

EDIT: Hey, I've thought of a use, you can use it to check whether a network can be drawn on a plane without any crossings, which can be useful for user interface stuff, and there was a game involving untangling crossed wires ;) see:

 

http://en.wikipedia.org/wiki/Planar_graph

It's unlikely any modules involving complex analysis and number theory will go ahead due to lack of people signing up for them. They haven't ran for the last 3 years in a row. :/ People would rather go down the easy route with statistics. 



#7 Cornstalks   Crossbones+   -  Reputation: 6991

Like
0Likes
Like

Posted 23 April 2013 - 07:54 PM

Graph theory is actually really useful. After learning more and more graph theory, I keep seeing new ways to decompose old problems (that I struggled with) into graph problems, and there's a plethora of solutions to graph problems to aid you in optimally solving your problem or designing your algorithm. I'd certainly suggest spending some quality time studying graph theory.

 

I've found the things I've learned while studying graph theory useful for a wide variety of programs I've worked on, from video games to compilers.


[ I was ninja'd 71 times before I stopped counting a long time ago ] [ f.k.a. MikeTacular ] [ My Blog ] [ SWFer: Gaplessly looped MP3s in your Flash games ]

#8 Zukias   Members   -  Reputation: 109

Like
0Likes
Like

Posted 24 April 2013 - 08:09 AM

Graph theory is actually really useful. After learning more and more graph theory, I keep seeing new ways to decompose old problems (that I struggled with) into graph problems, and there's a plethora of solutions to graph problems to aid you in optimally solving your problem or designing your algorithm. I'd certainly suggest spending some quality time studying graph theory.

 

I've found the things I've learned while studying graph theory useful for a wide variety of programs I've worked on, from video games to compilers.

Thanks for reply, it's looking quite an attractive option now. :)



#9 Álvaro   Crossbones+   -  Reputation: 13912

Like
0Likes
Like

Posted 24 April 2013 - 08:24 AM

I think it is important for any programmer to be comfortable with several graph algorithms (topological sorting, depth-first search, breath-first search, Dijkstra's algorithm, A*, maximum flow...), but the typical things you study in a Graph Theory class are not that useful.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS