Map Generator

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Map Generator

Post 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
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Map Generator

Post 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
sudi
Posts: 1686
Joined: Fri Aug 26, 2005 8:38 pm

Re: Map Generator

Post 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.
We're programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. We're not excited by renovation:tinkering,improving,planting flower beds.
hendu
Posts: 2600
Joined: Sat Dec 18, 2010 12:53 pm

Re: Map Generator

Post by hendu »

There's an existing program to do those, graphviz. It can also be used as a library to render images like that.
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Map Generator

Post 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".
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Map Generator

Post 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!
MartinVee
Posts: 139
Joined: Tue Aug 02, 2016 3:38 pm
Location: Québec, Canada

Re: Map Generator

Post 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.
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Map Generator

Post 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
MartinVee
Posts: 139
Joined: Tue Aug 02, 2016 3:38 pm
Location: Québec, Canada

Re: Map Generator

Post by MartinVee »

Code: Select all

 
#include <map>
#include <stddef.h>
 
... no?
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Map Generator

Post by LunaRebirth »

MartinVee wrote:

Code: Select all

 
#include <map>
#include <stddef.h>
 
... no?
No, map not found. Using codeblocks with mingw
CuteAlien
Admin
Posts: 9628
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Map Generator

Post 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).
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
MartinVee
Posts: 139
Joined: Tue Aug 02, 2016 3:38 pm
Location: Québec, Canada

Re: Map Generator

Post 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?
LunaRebirth
Posts: 386
Joined: Sun May 11, 2014 12:13 am

Re: Map Generator

Post 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
Post Reply