Agent-Based Automatic Dungeon Generation

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
focanafacos
Posts: 8
Joined: Wed Dec 20, 2006 4:20 pm

Agent-Based Automatic Dungeon Generation

Post by focanafacos »

Hi folks,

I´m developing a new algorithm for automatic dungeon generation based on multi-agent systems. It´s for a school project.
The generated dungeons shall be like a mix of what you get in zelda 3 ( yeah, the SNES one ) and diablo, torchlight, etc.
For this I need a tiled world. One will provide a "theme" with a set of tiles and some semantic stuff, and the algorithm will output the final dungeon with itens, puzzles, foes, keys, etc.

In terms of efficiency, it would be probably way too expensive to add a irr::scene::IMeshSceneNode for each single tile of the world.
I think the easiest way to go here would be to merge all geometry and build a single octree. Is it possible with irrlicht?
It would also be cool if I could manipulate vertex data by hand, in order to exclude duplicated vertices from the tiles.

I tried using the IMeshBuffer::append() method before, to no avail.
Or perhaps a custom scene node would be the answer? How would I go about that?

Anyhow, looking forward to hearing from you.
focanafacos
Posts: 8
Joined: Wed Dec 20, 2006 4:20 pm

Post by focanafacos »

Oh and I forgot to mention!
The "tiles" in question would be small meshes made in an external modelling tool, like Blender for instance.

Just making sure you understand me: I want to merge many of these smaller meshes into a huge scenario mesh, so that I can use the octree scenenode.
Mag-got
Posts: 42
Joined: Tue Dec 04, 2007 5:53 pm

Post by Mag-got »

smgr->getMeshManipulator() has some fun stuff, like createMeshWelded.
Why can't you get appending to work?
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

The problem: You have block meshes which each may have many materials, you need to batch them into as few buffers as possible (ideally one buffer per material), but you don't want to have too much in view.

Here's how I would do it:

Image

Each world tile is a model made of many blocks, combined using CBatchingMesh, possibly optimized further and saved to disk. The fog stops users from seeing the edges of the world. In the example image there are only 4 tiles loaded/created at any one time.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
focanafacos
Posts: 8
Joined: Wed Dec 20, 2006 4:20 pm

Post by focanafacos »

Thanx for the help guys ! I´ll try it out and let you know :D
Post Reply