I was reading through some of the forum posts today, and saw this link
(http://forums.sc2mapster.com/resources/project-workplace/2407-helrals-random-dungeon-map/) about Helral's random dungeon maps. Inspired by this, and feeling a little nostalgic for Diablo II, I've been toying round with the idea of making dungeons with random setups, but using the preset designed and detailed tile pieces instead a true random generator.
After a little bit of work, I've got a prototype up and running, though it's using units as doodad placeholders atm (more on that later on). As you can see in the first pic, our intrepid hero is in a corridor of the dungeon:
In the second photo, we can see one of the loving crafted dungeon tiles.
Using triggers, I record the positions of units making up the room (using the supply depot as a reference), then duplicate the units at the end of the corridor, as we can see in game.
Now to the crux of the matter. While the triggers work perfectly well with units, the doodads which will eventually be used to make the tile pieces don't seem to have same trigger versitility. One work around could be to set the actor of a duplicated unit to a doodad model, but this would be very laborious and time consuming (in order to make artistic pieces). A second option would be to create doodad models at the location of preset units and then remove the units using triggers, but again this isn't ideal for similar reasons to the first.
I'm hopeful that there is a way to script functions which will be able to interact with doodads in a similar manner to the triggers already in the system, but I haven't the faintest of ideas of where to start. Any comments on this prototype, and any tips or tutorials that you guys might be able to suggest to me, would be very greatly appreciated.
This is something I had planned to play with after I finish my current project. Shoot me a message when you get further along as I have a library for dynamic spawning of npcs similar to the director in L4D. The units are only spawned between the player the end goal and in side corridors. Its pretty neat.
So how far developed is this? You can link any rooms together already and have corridors inbetween? How does it fare with larger rooms? (I guess if this is gonna be used in a dungeon crawler, it'll probably have to do most of the map).
Also, what trigger interaction do you need that doodads can't give you? Maybe there's some way.
You can always make any doodad, or anything with a model, into a unit. Just make it so you can't target or select the thing and for the players it'll seem just like a doodad.
That sounds pretty awesome, and quite possibly how I'd like spawn the dungeon mobs. I'll send a pm when / if I manage get the dungeon system working to my satisfaction. :)
I'm afraid this is right at the first stage of development. But since I can get terrain in a region to be duplicated to a target point, it shouldn't be too hard to spawn the whole dungeon. I plan to use a randomisation function to select a tile piece from a list, then go to the corresponding region and copy the doodads to the selected reference point on the game play area then rinse, repeat. As a space saver, I could even have the set pieces on the game play area, copy the details to arrays, then clear the dungeon area before making the dungeon. I also have some ideas to prevent the tiles accidentally being placed on one another which I want to explore.
(And for s3rius as well) The triggers that I've been using thus far include getting the x, y coordinates of unit positions, unit types, create units at certain points etc. But the only strictly doodad triggers I've found pretty much just amount to animating them, or removing them. But Mienk, what is this technique that you speak of? Can I use triggers to automatically do it for, say, any and all doodads in a region? Or is it something that has to be manually done in the data editor for each doodad that is used? Tell me more! :D
As you have mentioned, the triggers on doodads are very limited. That's why I recommend using the data editor to create units modeled after the doodads and use those instead of actual doodads. For purposes of triggers these 'doodad' units will be treated as units. You'll probably have to play with their push and stuff so players can't move them or walk around them.
Another reason why making them units would be the fact that doodads implant their footprint on the ground and the footprint stays there. This is why it's suggested to use the dynamic pathing blocker units if you want to be able to unblock a path later in your game. If you use a pathing blocker doodad, it'll always be blocked even if you kill/remove the doodad.
Attach line of sight blocker to all of the spawned unit ? Is it that hard
----
I dunno I didn't really think about it, but a few minutes of digging shows that the LoS blockers work by having a special type of footprint that blocks LoS, so editing the footprints of the wall units is probably the way to go.
I thought of another way to handle a random dungeon; however instead of randomizing the actual 'terrain' it randomizes which pre-made section of the map you go to next. The big problem is that you'd need a lot of space to do such a thing because you'd have to make various hallways and rooms. You could then randomly generate which mobs and doodad units spawn in the rooms to change things up a bit.
Ahh, I suspected that I'd need to edit the units in the data editor. While its no problem to do a handful of doodad modeled units, to do a vast library to create nice artistic pieces would require a lot of work to implement. Teleporting units to new section pieces would be much more practical, but in terms of aesthetics and game flow I not so sure. Too large a tile piece and the setup may seem rather repetitive, too small and the map may seem too disjointed. You would need to turn the mini-map as well (if you don't want to break the illusion that you are exploring a cohesive random dungeon) but the player in term might easily become lost :P But it's an idea definitely worth considering.
This has all given me quite a lot to think about, I'll try to explore the possibilities and post my results. But keep the comments rolling! :)
But how about that: Create an invisible unit (maybe already with the pathing blocker footprint).
Instead of making one new unit for every type of doodad you can then use triggers to attach actors to the unit.
E.g.
That'd not only save you the trouble of making dozens of wall pieces, but also go easier on the memory you need and on the people who want to use your system (since I think there's no Export/Import function for data objects).
That'd not only save you the trouble of making dozens of wall pieces, but also go easier on the memory you need and on the people who want to use your system (since I think there's no Export/Import function for data objects).
Good call. In this case I would remove the footprint from the doodad and use dynamic pathing blockers for the units that they doodads are going to be attached to.
Nice to see that my map is inspiring other people as well :)
btw in my map it is now even possible to generate pre-made rooms.
I can even set it to use only premade rooms and place corridors between these.
But going back to the doodad topic: My method does not use any doodads at all. it uses units that aren't selectable, targetable, commandable, etc. so they work just like doodads only I can remove them easily (compared to trying to remove a whole load of doodads at once)
hmmm what s3rius says will probably work even better then my method. I just made my method when I was first toying about with the sc2editor :)
So basicly what would work best (using s3rius' method) is placing invisible units and binding the wall actors to them.
Maybe I should start using that method as well XD
anyway, I can't wait to see what your generator will look like when it is done :)
FYI you only need to make one "wall section" unit. Each wall section can detect its neighbors and swap to the appropriate model (such as corner, t-junction, etc.) This could potentially be done entirely in actor events (using queries) or you could do it with triggers. But it shouldn't be necessary to make multiple units, as long as they all share the same pathing footprint.
Keep me posted Chrom, I'd be more than happy to help if you hit any roadblocks. Dynamic content makes me all happy in the netherlands :)
I have a dynamically changing spider-mine minefield that reconfigures itself as you move through it in one of the Single Player maps of my campaign. Might throw that into a library once I release as I could see it being awesomely useful for bound type maps.
I would highly suggest using records to create presets of interlocking pieces within a grid though.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hi everyone.
I was reading through some of the forum posts today, and saw this link (http://forums.sc2mapster.com/resources/project-workplace/2407-helrals-random-dungeon-map/) about Helral's random dungeon maps. Inspired by this, and feeling a little nostalgic for Diablo II, I've been toying round with the idea of making dungeons with random setups, but using the preset designed and detailed tile pieces instead a true random generator.
After a little bit of work, I've got a prototype up and running, though it's using units as doodad placeholders atm (more on that later on). As you can see in the first pic, our intrepid hero is in a corridor of the dungeon:
In the second photo, we can see one of the loving crafted dungeon tiles.
Using triggers, I record the positions of units making up the room (using the supply depot as a reference), then duplicate the units at the end of the corridor, as we can see in game.
Now to the crux of the matter. While the triggers work perfectly well with units, the doodads which will eventually be used to make the tile pieces don't seem to have same trigger versitility. One work around could be to set the actor of a duplicated unit to a doodad model, but this would be very laborious and time consuming (in order to make artistic pieces). A second option would be to create doodad models at the location of preset units and then remove the units using triggers, but again this isn't ideal for similar reasons to the first.
I'm hopeful that there is a way to script functions which will be able to interact with doodads in a similar manner to the triggers already in the system, but I haven't the faintest of ideas of where to start. Any comments on this prototype, and any tips or tutorials that you guys might be able to suggest to me, would be very greatly appreciated.
Cheers!
This is something I had planned to play with after I finish my current project. Shoot me a message when you get further along as I have a library for dynamic spawning of npcs similar to the director in L4D. The units are only spawned between the player the end goal and in side corridors. Its pretty neat.
So how far developed is this? You can link any rooms together already and have corridors inbetween? How does it fare with larger rooms? (I guess if this is gonna be used in a dungeon crawler, it'll probably have to do most of the map).
Also, what trigger interaction do you need that doodads can't give you? Maybe there's some way.
You can always make any doodad, or anything with a model, into a unit. Just make it so you can't target or select the thing and for the players it'll seem just like a doodad.
@KineMorto: Go
That sounds pretty awesome, and quite possibly how I'd like spawn the dungeon mobs. I'll send a pm when / if I manage get the dungeon system working to my satisfaction. :)
@s3rius: Go
I'm afraid this is right at the first stage of development. But since I can get terrain in a region to be duplicated to a target point, it shouldn't be too hard to spawn the whole dungeon. I plan to use a randomisation function to select a tile piece from a list, then go to the corresponding region and copy the doodads to the selected reference point on the game play area then rinse, repeat. As a space saver, I could even have the set pieces on the game play area, copy the details to arrays, then clear the dungeon area before making the dungeon. I also have some ideas to prevent the tiles accidentally being placed on one another which I want to explore.
@Mienk: Go
(And for s3rius as well) The triggers that I've been using thus far include getting the x, y coordinates of unit positions, unit types, create units at certain points etc. But the only strictly doodad triggers I've found pretty much just amount to animating them, or removing them. But Mienk, what is this technique that you speak of? Can I use triggers to automatically do it for, say, any and all doodads in a region? Or is it something that has to be manually done in the data editor for each doodad that is used? Tell me more! :D
Thanks everyone for your comments thus far!
@ChromiumBoy: Go
As you have mentioned, the triggers on doodads are very limited. That's why I recommend using the data editor to create units modeled after the doodads and use those instead of actual doodads. For purposes of triggers these 'doodad' units will be treated as units. You'll probably have to play with their push and stuff so players can't move them or walk around them.
Another reason why making them units would be the fact that doodads implant their footprint on the ground and the footprint stays there. This is why it's suggested to use the dynamic pathing blocker units if you want to be able to unblock a path later in your game. If you use a pathing blocker doodad, it'll always be blocked even if you kill/remove the doodad.
Now for the real challenge: get line of sight to work correctly within your maze.
@RileyStarcraft: Go
Attach line of sight blocker to all of the spawned unit ? Is it that hard
Quote from progammer:
@RileyStarcraft: Go
Attach line of sight blocker to all of the spawned unit ? Is it that hard
----
I dunno I didn't really think about it, but a few minutes of digging shows that the LoS blockers work by having a special type of footprint that blocks LoS, so editing the footprints of the wall units is probably the way to go.
I thought of another way to handle a random dungeon; however instead of randomizing the actual 'terrain' it randomizes which pre-made section of the map you go to next. The big problem is that you'd need a lot of space to do such a thing because you'd have to make various hallways and rooms. You could then randomly generate which mobs and doodad units spawn in the rooms to change things up a bit.
@RileyStarcraft: Go
As for the LoS blockers, I'm not sure how their footprint works and if that also gets stamped on the map permanently
I'd thought about the path blockers, but I'd forgotten about LoS blockers to be honest. Something I must investigate.
@Mienk: Go
Ahh, I suspected that I'd need to edit the units in the data editor. While its no problem to do a handful of doodad modeled units, to do a vast library to create nice artistic pieces would require a lot of work to implement. Teleporting units to new section pieces would be much more practical, but in terms of aesthetics and game flow I not so sure. Too large a tile piece and the setup may seem rather repetitive, too small and the map may seem too disjointed. You would need to turn the mini-map as well (if you don't want to break the illusion that you are exploring a cohesive random dungeon) but the player in term might easily become lost :P But it's an idea definitely worth considering.
This has all given me quite a lot to think about, I'll try to explore the possibilities and post my results. But keep the comments rolling! :)
@ChromiumBoy: Go
true that , placing doodad sucks.
But how about that: Create an invisible unit (maybe already with the pathing blocker footprint). Instead of making one new unit for every type of doodad you can then use triggers to attach actors to the unit. E.g.
That'd not only save you the trouble of making dozens of wall pieces, but also go easier on the memory you need and on the people who want to use your system (since I think there's no Export/Import function for data objects).
Good call. In this case I would remove the footprint from the doodad and use dynamic pathing blockers for the units that they doodads are going to be attached to.
@ChromiumBoy: Go
Nice to see that my map is inspiring other people as well :)
btw in my map it is now even possible to generate pre-made rooms.
I can even set it to use only premade rooms and place corridors between these.
But going back to the doodad topic: My method does not use any doodads at all. it uses units that aren't selectable, targetable, commandable, etc. so they work just like doodads only I can remove them easily (compared to trying to remove a whole load of doodads at once)
hmmm what s3rius says will probably work even better then my method. I just made my method when I was first toying about with the sc2editor :)
So basicly what would work best (using s3rius' method) is placing invisible units and binding the wall actors to them.
Maybe I should start using that method as well XD
anyway, I can't wait to see what your generator will look like when it is done :)
FYI you only need to make one "wall section" unit. Each wall section can detect its neighbors and swap to the appropriate model (such as corner, t-junction, etc.) This could potentially be done entirely in actor events (using queries) or you could do it with triggers. But it shouldn't be necessary to make multiple units, as long as they all share the same pathing footprint.
@ChromiumBoy: Go
Keep me posted Chrom, I'd be more than happy to help if you hit any roadblocks. Dynamic content makes me all happy in the netherlands :)
I have a dynamically changing spider-mine minefield that reconfigures itself as you move through it in one of the Single Player maps of my campaign. Might throw that into a library once I release as I could see it being awesomely useful for bound type maps.
I would highly suggest using records to create presets of interlocking pieces within a grid though.