forums | blogs | polls | tutorials | downloads | rules | help

I made a little map generator

So I was playing around with Python, first writing a little .gas file parser to print me out some nice statistics (such as what enemy types are suitable for what level, based on the regions they appear in), and then I started writing .gas as well, eventually being able to generate a nice little patch of land (flat terrain) with some half-randomly placed plants.

Project on GitHub: https://github.com/foerstj/gaspy

Here are some screenshots:

Planted "fairy circles" mainly for testing positioning & orientation

The more serious plant generator uses Perlin noise to distribute the plants.

A little detail view

There's only one other map generator I found online: https://www.gamefront.com/games/dungeon-siege/file/ds-map-gen

A screenshot from that one clearly shows I got the best map gen in the field Cool I like to brag

As you see the terrain texture is very repetitive and the plants are distributed using plain randomness

foerstj wrote:
I like to brag

And why not, what you've already done with it is bloody excellent, does your generator make its own streamer_node_content_index as well?, and what about placement, does it do that too?.

}
[placement]
{
q orientation = 0,0.976296,0,-0.21644;
p position = 0.462983,-0.55,-8.38574,0x750a906e;
}
}

Of course it does these things, else you wouldn't see any plants in the screenshots Wink

The generated region can be opened in SE

I thought it would do, I just wanted you to verify it.

Another couple of questions, will it, or could you make it work with the original campaign map and would it be able to add some enemy characters as well, now that would make it even more excellent.

Making it work with original campaign: The generator can generate a new region into an existing map. Region ID should be made unique already. You'd need to stitch it tho. Mind that it's really just generating a rectangle of flat terrain, which doesn't actually fit in anywhere.

Placing enemies is technically as simple as placing plants; practically a lot of thought needs to be put into it to make enemy encounters interesting, so the current random algorithms probably won't produce a satisfying experience. Haven't tried.
Actually I think this applies to terrain as well - walking around on a big flat plain just isn't very interesting.

As said project is on Github. I'm not intending to develop it any more but you're welcome to fork the thing, I can add some more explanation into the readme

I was only wondering if something like this was possible that's all, thanks for the explanation.

foerstj: Very interesting to see... Smile

Have you ever spend a thought to (make the each region large enough to) put 6 of them together as some kind of a 'cube world' ? Wink


For the beginning stitching just a few border nodes should be sufficent, and perhaps it would be good idea to make each regions larger than visual+loading frustum range - not sure if DS2 does let you exist on a (tiny) box...

You can try what happens by simply stitching rectangular regions into a cube. It doesn't fit. All terrain in DS is laid out flat. At a corner, let's say if you're standing in region A that is stitched with B and C (and B also to C of course), it wouldn't know where to put the nodes, placing them in one of the two possible places, and the fourth quadrant will be a hole in the map.

What you could do tho is making a "tile world" - a giant rectangle that is stitched with itself in all four directions. Something like that has been done in the "Endless Dunes" in the Utraean Peninsula map, which endlessly loop on themselves horizontally.

And there are other ways to make a world loop endlessly - in my project Pentachoron Garden I had fun stitching the world together in an impossible geometry Smile