Page 2 of 2

Re: Using array of strings to access variables

Posted: Fri Nov 07, 2014 5:24 pm
by MrChoke
Scotty, I am curious about your plans for an auto-generated dungeon. That was what I wanted to do as well and I don't think you can do what you are planning. What are you going to do with these tables? Are you going to use them in scripts that run at game start?

Re: Using array of strings to access variables

Posted: Fri Nov 07, 2014 5:28 pm
by NutJob
The way the OP is describing is how I do a couple rooms on a level and I got it working. I send a similar template in and it generates the walls and pillars, and lights. The "layout" itself is generated new each time and I made a sequencer to generate a viable path to make sure there's a way out.

Re: Using array of strings to access variables

Posted: Fri Nov 07, 2014 5:35 pm
by MrChoke
NutJob wrote:The way the OP is describing is how I do a couple rooms on a level and I got it working. I send a similar template in and it generates the walls and pillars, and lights. The "layout" itself is generated new each time and I made a sequencer to generate a viable path to make sure there's a way out.
Nutjob, you mean you dynamically change the textures right? You don't actually change the tiles though.. When you lay down walls in the editor and you run the game, you cannot make that square not be a wall during runtime or am I missing something huge???? You can even destroy all of the objects in the square but you still cannot move the party onto it. Please clarify... Thanks!

Re: Using array of strings to access variables

Posted: Fri Nov 07, 2014 6:08 pm
by NutJob
No textures, or tiles, just using secret doors for my walls while I wait for the asset_pack.zip. Using these doors for walls is working well enough and really haven't bothered to figure out how to use/define my own assets, yet. I want a concrete reference before I delve any deeper.

Edit: and the pathing system detects open areas and the direction it's creating itself so when it's creating the path horizontally it places walls always north, and vertically it places walls always to the east, then back tracks and destroys any walls blocking the way because the first pass is autonomous to not interfere too much with main loop.

Re: Using array of strings to access variables

Posted: Fri Nov 07, 2014 6:27 pm
by Scotty
I'm using the dungeon_wall asset with invisible walls behind and pillars between the walls, I started with secret doors but found that they actually stick out a tiny bit more than dungeon walls, so some object don't look good on them.

I've got it working pretty good thus far. I divide up the 32x32 map into 16 7x7 (8x8 don't fit together as nicely due to even numbers) modules, and then create a critical path from start to finish and add a bunch of offshoot sections so it feels less linear. Before each module is drawn into the map, it checks the surrounding modules to use the correct "piece", ie. corner, dead end, straight. And rotates each module if needed.

Next step is going to be creating a ton of different modules that fit each archetype, and possibly adding some subtler random elements into the wall layout of each module itself.

Then will come populating with monsters, items, puzzles (randomly generated puzzles, this will be a challenge), secrets, shops, multiple floors with increasing challenge.

Let's see how far I get, eh!

Re: Using array of strings to access variables

Posted: Fri Nov 07, 2014 6:41 pm
by MrChoke
Scotty wrote:I'm using the dungeon_wall asset with invisible walls behind and pillars between the walls, I started with secret doors but found that they actually stick out a tiny bit more than dungeon walls, so some object don't look good on them.

I've got it working pretty good thus far. I divide up the 32x32 map into 16 7x7 (8x8 don't fit together as nicely due to even numbers) modules, and then create a critical path from start to finish and add a bunch of offshoot sections so it feels less linear. Before each module is drawn into the map, it checks the surrounding modules to use the correct "piece", ie. corner, dead end, straight. And rotates each module if needed.

Next step is going to be creating a ton of different modules that fit each archetype, and possibly adding some subtler random elements into the wall layout of each module itself.

Then will come populating with monsters, items, puzzles (randomly generated puzzles, this will be a challenge), secrets, shops, multiple floors with increasing challenge.

Let's see how far I get, eh!
So you are dynamically generating the paths via script? You are destroying the invisible walls for the paths you are using, for ones you don't you leave the walls there. If that is what you are doing, that is exactly what I am doing too! I got mine mostly working as well. Are you building the paths on game start or are you building them as the party moves thru the level? And is it "smart" so that it walks the paths to link the areas you want linked?

Re: Using array of strings to access variables

Posted: Fri Nov 07, 2014 7:02 pm
by Scotty
You are destroying the invisible walls for the paths you are using, for ones you don't you leave the walls there.


Not quite, the map starts completely empty and builds up the walls from the script.

Are you building the paths on game start or are you building them as the party moves thru the level? And is it "smart" so that it walks the paths to link the areas you want linked?
On game start. It creates the overall layout for the floor in a 4x4 array, then goes through each of these one by one and fills it in.

It's *decently* smart with the overall layout. It won't shortcut through the critical path, like the 1st area of the critical path will only have a connection to the 2nd area of the critical path (plus offshoot areas). The offshoot areas are completely randomly placed at the moment.

Re: Using array of strings to access variables

Posted: Fri Nov 07, 2014 7:30 pm
by MrChoke
Pretty cool.

Question, By creating the walls, you are putting down invisible walls then and then textues around them?
Also, the map is totally open floor when you do run this right?

With mine, I specify "possible" paths to use in the map layout. The idea is to make too many paths and then it narrows it down when it runs by choosing the ones it wants to follow. I also set blocks of squares (I call them rooms) as targets that the process has to link to. It is done when it links all of what is has to link.

Re: Using array of strings to access variables

Posted: Sat Nov 08, 2014 5:38 am
by Scotty
Oh nice, yours seems much more random in its layouts, actually designing the paths in real time.

Here's a couple screens of what I've got

Image

That's the floor layout in the top left. 2 -> 3 -> 4 -> 5 -> 6 -> 7 being the critical path, and 9's being offshoots.

Image

That's what the map turns out like. Obviously it won't just be a single corridor for the whole thing :P. Just what I've been working with to make sure the connections between areas are working right.