Page 1 of 1

Map Generator

Posted: Tue Mar 28, 2017 9:11 pm
by LunaRebirth
Hello,
I was given an assignment to make a site map generator that basically shows correlation between pages using code.
Is Irrlicht a good engine for me to be able to do this?

Basically they want to see something like this with graphics (text in boxes linking to other boxes):

Page A -> Page B

Page B -> Page C
Page B -> Page D

Page D -> Page C

Here in an example picture of what I am trying to accomplish via a map generator of the pages in a main menu:
Image

Re: Map Generator

Posted: Tue Mar 28, 2017 9:13 pm
by LunaRebirth
I created a program that outputs "This page has these pages: ..., ..., ... -> The first of those pages has these pages: ..., ..., .., -> etc.." and it works fine,
but now they want an actual generator that creates the image files in folders so we don't have to manually use Paint.Net to create the map

Re: Map Generator

Posted: Tue Mar 28, 2017 10:23 pm
by sudi
First of all I dont see any relation between the text you wrote and the picture you attached...
Second a 3D engine is definete overkill to generate those images. Try the browser its way simpler.

PS: Also I do not think they threw you into the deep end without suggesting some tool to do the task, maybe try those first.

Re: Map Generator

Posted: Wed Mar 29, 2017 9:25 am
by hendu
There's an existing program to do those, graphviz. It can also be used as a library to render images like that.

Re: Map Generator

Posted: Wed Mar 29, 2017 12:45 pm
by LunaRebirth
Sudi wrote:First of all I dont see any relation between the text you wrote and the picture you attached...
Second a 3D engine is definete overkill to generate those images. Try the browser its way simpler.

PS: Also I do not think they threw you into the deep end without suggesting some tool to do the task, maybe try those first.
The relation is that in the menu, the "Main Page" has links. Those links point to other links (I.E # 1 is a new page image with a similar structure, different links).
How is using a browser simpler?

PS: there were no suggestions. I was "thrown into the deep end".

Re: Map Generator

Posted: Wed Mar 29, 2017 12:47 pm
by LunaRebirth
hendu wrote:There's an existing program to do those, graphviz. It can also be used as a library to render images like that.
Awesome, I'll check it out. Thanks!

Re: Map Generator

Posted: Wed Mar 29, 2017 12:49 pm
by MartinVee
What hendu said. GraphViz is the front-end, and it calls command-line tools that output a set of DOT command to an image.

In fact, the syntax ressemble what you first posted. Here's a sample of what you can achieve.

Don't bother writing your own engine for that. I tried it before I discovered DOT and GraphViz, and it's far more complicated than what you can possibly anticipate.

Re: Map Generator

Posted: Wed Mar 29, 2017 3:13 pm
by LunaRebirth
Great, thanks.

I was giving it a try when I ran into a bunch of missing file issues. Now I'm trying graphviz through Boost, and I'm getting standard c++ file issues like:

Code: Select all

fatal error: map: No such file or directory
fatal error: cstddef: No such file or directory
I've been searching for a good amount of time how to solve this and can't find anything remotely useful.
Thanks

Re: Map Generator

Posted: Wed Mar 29, 2017 3:46 pm
by MartinVee

Code: Select all

 
#include <map>
#include <stddef.h>
 
... no?

Re: Map Generator

Posted: Wed Mar 29, 2017 3:55 pm
by LunaRebirth
MartinVee wrote:

Code: Select all

 
#include <map>
#include <stddef.h>
 
... no?
No, map not found. Using codeblocks with mingw

Re: Map Generator

Posted: Wed Mar 29, 2017 4:05 pm
by CuteAlien
It doesn't find the standard libraries? This kinda looks like you messed up your mingw environment. Maybe easiest to just re-install it. Otherwise... maybe this page helps: http://www.mingw.org/wiki/includepathhowto
(search path for standard libraries on MinGW is slightly complicated, but usually you never have to care about that).

Re: Map Generator

Posted: Wed Mar 29, 2017 4:13 pm
by MartinVee
If you include <map> and you get an error, there's definitely something wrong with the include paths in Code::Blocks. Can't help you there as I'm using VS.

Did you setup MinGW correctly? Did you try all the steps in this article?

Re: Map Generator

Posted: Wed Mar 29, 2017 10:34 pm
by LunaRebirth
Noob mistake, wish I had a better excuse than C Programming class got me used to making .c files instead of .cpp

Thanks guys, GraphViz is exactly something I was looking for