Search Unity

Procedural Dungeon Toolkit - Dungeon Themed Procedural Generation Toolkit

Discussion in 'Assets and Asset Store' started by r3eckon, Sep 23, 2016.

?

What kind of update would you like to see released first ?

Poll closed May 13, 2018.
  1. Prefab placement helper GUI ( Easily editing the generation point of objects without code )

    8 vote(s)
    33.3%
  2. Generation rules editor GUI ( Editing the current generation parameters for custom levels )

    5 vote(s)
    20.8%
  3. Level type selection GUI ( Easily selecting , adding , removing saved types of levels )

    2 vote(s)
    8.3%
  4. Add more assets to the current level ( Chests , Rare Items )

    3 vote(s)
    12.5%
  5. AI manager script ( For mob pathing / spawning )

    5 vote(s)
    20.8%
  6. Other / Post in thread

    1 vote(s)
    4.2%
  1. fancyferret

    fancyferret

    Joined:
    Feb 4, 2017
    Posts:
    31
    Ok, this sounds great. I'll test the Item Spawner. ORK has an "item collector" component that handles loot drops/tables but I think it can be messaged via events, Playmaker, or such. As far as mobs, I've been able to use various other assets with ORK mobs/NPCs as long as they're prefabs with the right ORK component also attached to keep track.

    Another question I have is about movement style...

    In the old dungeon crawlers like Eye of The Beholder they used a one-step/grid move where you'd advance forward, backward or to the sides in increments of one step/dungeon block. I know there's a specific asset actually for this but is that a built-in option here or is player controller setup left up as a third-party option?
     
  2. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    The asset currently only generates a level out of prefabs acting as parts, so I do not include a custom player controller currently. I do include basic scripts for each prefabs that needs it like light flickering, door opening and even an AI that follow the player around, but it is mainly a level environment generation toolkit.

    However that could probably be a future script I add and you can probably do it yourself before I add it. I guess it cannot be that hard to accomplish by simply adding a script which according to keyboard input translates and rotates a camera around the level in such a way that it looks like these old dungeon crawlers. The main generator class contains helper methods to get the center of a particular tile in the level, and also a way to know where the "Player" object is located within this level grid to help get this stuff working.
     
    Last edited: Nov 17, 2017
    fancyferret likes this.
  3. fancyferret

    fancyferret

    Joined:
    Feb 4, 2017
    Posts:
    31
    Ok, thanks! I'd prefer something that handled just the level creation anyway so that's actually perfect. Just wanted to make sure I didn't have to possibly fight with a control system that's tied into this also.
     
    r3eckon likes this.
  4. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    I've got confirmation from the asset store team that the asset will go on 25% off sale from November 27th to December 8th PST. The asset will be selling at 30$ for a little over a week :)
     
    limo and fancyferret like this.
  5. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Sale begins in about 12 hours! Read the previous post for details about how long it's going to run.

    By the way, the usage manual is about 2/3 of the way complete. I've written about 50 pages so far and have covered the set up process, basic map settings, generation algorithm settings and am currently finishing up the part on usage of custom object slots which is definitely the longest and most complicated. The update containing this manual should come some time next month, I cant say for sure when it will be finally completed.
     
    StevenPicard likes this.
  6. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Given that I might finish the new usage manual in the near future, if you have any suggestions or requests for this new unified documentation piece be sure to let me know in this thread or through email. I will consider adding it in the guide and at the very least clear things up for you directly.

    Also, next version will include a couple bugfixes along side this new guide. For instance, while writing an extra example usage for the Avoidance & Priority part of the guide I noticed that objects trying to remove themselves using a priority of 0 were causing the generation to break. Since I usually use the high priority object to remove clipping prefabs and not the other way around, this bug went by unnoticed for a while. In any case the feature now works as intended at removing an object of priority 0 if it meets an object listed in the avoidance list!
     
  7. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Only a day and a couple hours left for the sale, the asset will stay at regular price for a while after this so make sure you buy it quickly to save on your purchase!

    If you are one of the people who recently bought the asset, I would be thankful if you left feedback in a review / rating on the asset store! For any other questions or suggestions, feel free to leave a post on this thread or send me an email directly :)
     
  8. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Hello everyone, I'm back with the final progress report on the guide before the next update is finally sent for review. I am pretty much done writing the main part of the guide, all that's left right now to write down the FAQ to help people quickly find answers and direct them to the part of the guide that is going to help them learn what they want to do.

    Overall, this new document spans nearly a hundred pages, which is something I had expected given the amount of documentation pieces that have been combined to create this single Usage Guide. Given the fact that this document goes through everything the old PDFs did in even more depth, I will be removing the existing documentation from the asset. The readme file will remain since I think this is what the asset store team uses to set up assets for validation.

    As I have mentioned before, next update will also come with a bunch of bug fixes I have implemented while writing this guide. Some of the most recent bugs I have nailed down include weird GUI quriks that happen when multiple drop downs were opened, a bug with the Model Editor that caused compatible types to not save properly and the ability of the generator to handle cases where the main Seed parameter is of 0, which caused the entire layout not to generate. Indeed, Maps created using the Map Editor without changing the default seed parameter of 0 used to not generate at all. This has been fixed by simply using a random seed in the event that this parameter is still at 0, which also adds the ability to randomize the object placement while using a map file.

    In any case, I will be back shortly to tell you guys when I'll have sent the new version for validation. I will also make the new documentation piece available from my Google Drive and post the link here so you can read it before the next version makes it to the store!
     
    Tortyfoo, limo and StevenPicard like this.
  9. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Version 1.20 has just been sent for review to the asset store team! It will most likely release before the end of this week if everything goes well. Once again, this version includes the new usage manual as well as various bug fixes I have implemented while writing this new guide. Old documents have been removed while I have also added the new barrel model I posted screenshots of. It does not include the chest and torch holder models for now since I wanted to keep working on them for a bit longer. I'm actually trying to make well animated versions of both models to have a chest that actually opens and close, while the torch holder model is going to be animated to be used as a secret lever to open secret rooms, a feature I have been wanting to add for a little while to the asset!

    In any case, If you wish to check out the new usage manual while the new version is validating, it is available on my google drive at the following link.

    I wish everyone a happy holiday season and will be back soon with more updates for the asset :)
     
    StevenPicard and limo like this.
  10. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    New version is out! Here is the full changelog for 1.20

    + PDT Usage Guide has been added

    - Defunct documentation have been removed
    - Build preparation dropdown has been removed ( Buttons have been moved to more relevant locations in the GUI )

    * Fixed custom object avoidance when priority setting is at 0
    * Fixed a weird GUI quirk caused when having both Map Settings and Procedural Map Settings opened
    * Map file seed parameter of 0 now uses a random seed instead of not generating the layout
    * Fixed model editor bug causing compatible types to not save properly
    * Fixed a GUI issue with the model file list, file name now wraps instead of overflowing
    * Fixed seed and floors parameters that were inverted when saving maps breaking the data
    * Archiving models now cleans up the folder before saving new model files
    * Archiving models now re orders existing archived models correctly
     
    StevenPicard likes this.
  11. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Hello everyone, I have just tested a new feature some of you have been asking me to implement since the beginning : the ability to generate a dungeon within the editor, so that they are not only existing at runtime. I have been testing out various ways to accomplish this for a while without success and after deciding to ask around I have been directed to a piece of code included within unity that made this process much faster and stable to use inside the editor.


    The process is a little different than straight up generating a dungeon in editor mode, but the result is exactly the same! This feature works best with smaller dungeons and after a bit of optimization by removing empty nodes and the dungeon generator script from the prefab, seems to not cause as much stuttering as the [ExecuteInEditor] tag methods I had originally tried out did. Of course, large maps will still generate a lot of objects so once again, this feature is best suited for small maps.

    This feature along with a couple small tweaks and fixes I have added while trying this feature are most likely going to be coming out as soon as possible after the Holidays :)
     
    limo likes this.
  12. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    By the way since someone has requested the edits immediately, I have packed the updated scripts into an archive along side instructions on how to set them up. They are obviously still work in progress scripts that may cause errors, however anyone who wants to try these out just send me an email with your invoice number so that I can confirm that you own the asset and I should reply as soon as possible with this archive!

    Once again my email address is : r3eckon@gmail.com
     
  13. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    I've just sent the next version to the asset store team for validation! It contains the new feature I posted a video about yesterday along with a couple small fixes relating to it. I've also updated the usage manual so that it includes instructions on how to use this new feature.

    I'm not sure how fast they work during the Holidays so this might take a bit longer than usual to release.

    In any case, Merry Christmas to everyone and I will be back soon with new updates :)
     
  14. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    As expected, the asset store team is working slower during the Holidays and next version is still pending validation.
    I might take some time today to work on new store page images to reflect new features and update older screenshots.
    If I do so the update might take even longer to come out so I'll wait and see if it releases this week before sending the updated store page version for validation.
     
  15. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Version 1.21 has just released! Here is the changelog for this version.

    + NEW FEATURE : Save entire dungeon as a prefab file
    + NEW SCENE : Showing off a dungeon prefab that you can modify in the editor.

    * Optimized the game object count by removing empty nodes
    * Fixed new barrel rotation and translation causing incorrect placement
    * Fixed a bar of the cell prefab using the wrong material
    * Fixed the item spawner having to deal with a dungeon prefab
    * Fixed the door opening script having to deal with a dungeon prefab
    * Updated the Usage Manual to include information about the new feature
     
  16. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    I'm currently working on creating a LITE version of the asset so that people who want to try out some of the features can have the ability to quickly generate a dungeon for a lower price. As per the asset store guidelines that disallow any sort of "amount" based limitation or time limits on the asset, some features are instead entirely removed to reflect it's much lower selling price.

    Here are the main changes to the LITE version :
    • Custom Objects are entirely removed, both its GUI and all methods used to place, create and manage them.
    • Procedural Map Options GUI only use the old algorithm. MapGeneratorV2 and "Room Models" are removed.
    • The Map Editor and Model Editor GUI windows are removed.
    • Map files cannot be loaded. All levels are randomly generated.
    • Navmesh generation helper methods and the basic "follow" AI script have been removed.
    • No dedicated usage manual. A readme file will explain the basics of the asset.
    LITE users will still be able to use the asset to generate and play with a procedural dungeon, replace the existing prefabs and textures, tweak the old map generation algorithm to change the levels a bit, use the Item Spawner system which I have already made available for free as an independent asset and finally they can also have a look at and tweak the source code to expand on the asset themselves. Basically, this LITE asset is mostly used to quickly show potential users what the asset can do while keeping the paid version worth it and a desirable upgrade. This LITE version can also be desirable to more programming savvy users who simply want a cheap dungeon generation starting point that they can then expand on in a way they see fit without all the helper methods and GUI the full version contains. It is essentially the same as the initial 1.0 to 1.6 version of the asset of a little over a year ago; a basic dungeon generator "demo" without most of the GUI I have developed to remove the need to know programming to add extra objects to the generation process. Since those "hardcoded" features have been stable for a while, updates to the LITE version will be much less frequent than updates to the paid version. The only "updates" it will receive are bug fixes if bugs are eventually found within it.

    Now, about pricing. To reflect the fact that this LITE version is basically the same as the initial version that some of the early supporters paid for, I will not be making it free. It will most likely be selling at $5 with a way to "upgrade" to the full version for the price of the full asset minus this 5$. Basically, there are no discounts or lost value for buying this LITE version before the full version. While this is still a bit lower than the original $10 price of the asset, keep in mind that early supporters got every upgrade that came after the initial release in an "Early Access" style deal, while this LITE version will remain the same without any features being added in the future.

    If anyone feels like this is not a good idea or if you have any further questions or suggestions about this LITE version, be sure to let me know! Thank you to all who supported the development of this asset and I hope you all had an happy holiday season :)
     
  17. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    Sounds like a good idea. Early adopters like myself got a great deal based on all the updates we've received.
     
    r3eckon likes this.
  18. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Thanks for the feedback Steven! Making business / marketing decisions like this is still quite perplexing to me so I want to make sure you all feel like this lower price is fair to early adopters such as yourself. I'm glad to see that you think it is!
     
  19. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Here is a new addition to the Tile Map Generation Algorithm! "Post Generation Triggers" allow for some room models to call generation code after the first pass of the recursive algorithm is completed. This creates more explorable areas starting from particular rooms, here used to grow corridors out of the tiny green "closets" and large yellow "boss rooms".


    This feature will be added soon to the asset, most likely in the next update, and I hope to use it to finally create these "secret rooms" I've talked about in a couple posts. My idea is that some closets will contain a path to a bigger room full of more valuable loot by adding a post generation trigger that will add that room after a "secret entrance" tile type. The asset can then use this tile type to add a fake wall with a drawer acting as a door, that could perhaps be activated by toggling a torch lever next to it in scooby doo style secret room :)

    This feature is probably going to require an extra GUI to handle without programming but I feel like it will be useful enough to warrant the need for this GUI, so this might take a bit longer to add to the asset than a regular update to the tile map algorithm. Nevertheless, I should be back soon enough with more progress reports on this new feature!
     
    StevenPicard and limo like this.
  20. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Hello everyone, this is a progress report on the next update!

    I've been working on the fake passage model which is coming along nicely, I`m having a bit of trouble getting the textures to match with the regular wall texture so that the fake passage is not easily noticeable. Like I've stated before this fake passage is simply a tight tunnel with a fake bookshelf that will move out of the way after pulling on a torch next to it, or maybe even pulling on a certain book in the shelf. For this purpose I want to also update the "drawer" model to actually include some fake books that are part of the mesh with spaces for items to generate.

    Also, the Post Generation Triggers system has been updated a bit and most importantly prepared for use within the GUI. My previous method for handling these triggers were extra Tile Types that are painted on to the room models. This method was not very convenient mostly because room models could not feature a trigger with a custom orientation and could only spawn new corridors and rooms in the Northbound direction unless 4 tile types ( one for each direction ) were created for each type of trigger.

    The new system will simply involve attaching a PGTrigger object to any point on the room model to which you can set a custom orientation that will be automatically rotated with the model and the data needed to save each trigger to the model files will be saved alongside the model data instead of as a tile type, much like the compatible and incompatible tile type arrays. Since the rotation is automatic, this means that your PGTriggers will always grow corridors and rooms in a direction that is relative to your model. This allows for a room that could have an exit on each side leading to multiple more rooms. My goal with this system is to have a type of generation algorithm configuration that basically only generates rooms leading to other rooms without having any long corridors in between, which is a rather popular dungeon style in roguelike games where quick action is the focus.


    Above I've linked a new video demonstration of various configurations of the tile map generation algorithm if you want to have a look at those. Nevertheless, I am almost ready to start implementing the Post Generation Triggers into the actual asset so I should be back shortly with some UI screenshots showing off how this feature is going to work with the Model Editor Window.
     
    StevenPicard likes this.
  21. TonkRogerio

    TonkRogerio

    Joined:
    Apr 12, 2013
    Posts:
    15
    I'm getting a bunch of errors when I open the demoscene.

    The demo is also void of any floors or walls and it only shows a couple of items all together as the picture shows. What am I doing wrong?

    https://i.imgur.com/n86jyXj.png


    DirectoryNotFoundException: Could not find a part of the path "D:\Documents\Documents main folder redirect\Unity Projects\Wiz clone\Assets\Resources\PDTFiles\Saved Data\CustomItemList.txt".
    System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/FileStream.cs:292)
    System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share)
    (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
    System.IO.File.OpenRead (System.String path) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/File.cs:363)
    System.IO.StreamReader..ctor (System.String path, System.Text.Encoding encoding, Boolean detectEncodingFromByteOrderMarks, Int32 bufferSize) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/StreamReader.cs:167)
    System.IO.StreamReader..ctor (System.String path)
    (wrapper remoting-invoke-with-check) System.IO.StreamReader:.ctor (string)
    CustomItemManager.loadItemList (System.String path) (at Assets/Procedural Dungeon Toolkit/Scripts/CustomItemManager.cs:45)
    CustomItemSpawner.Start () (at
     
  22. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    It looks like you did not place the "Resources" folder at the root of your unity project. Did you follow the set up guide? The first few steps of setup include placing a particular folder correctly inside of your unity project, since it contains a lot of data needed to generate the levels. They are outlined both in the usage manual and inside of the readme file.



    I've also noticed that the path of your project seems to be located inside of a "Redirect" folder. I'm not sure if this is an actual windows redirect folder or just a name you gave it but it might be what's causing your problem. If you've correctly set up the resources folder and it still does not work try creating the project in a different folder to see if this fixes your problem.

    By the way, I've quickly added the fog of war feature you were talking about where only one tile is being revealed at a time, here is a video demonstration of this new feature in action!

     
    Last edited: Jan 24, 2018
  23. TonkRogerio

    TonkRogerio

    Joined:
    Apr 12, 2013
    Posts:
    15
    I followed the video tutorial but it didn't mention the resource pack. Can you point me towards creating dungeons from a new scene please?

    EDIT:- Just saw your mini-map work. that's excellent. the only issue I have with it really is that it's hard for the player to figure out if they have loose ends or not because there are no walls. I'm not sure if you see what I mean but in those sort of games players will usually be able to chose between two routs and then be reminded that the other rout is still unfinished based off of the graphics of the map. Probably not something you're thinking of implementing immediately but I strongly suggest it as it would make the mini-map really professional and streamlined for the player.
    Still./ thanks so much for implementing that feature. is it coming in the next update?

    Edit 2:- I've just had an idea. I'm not really great with programming but maybe it might be an easy fix to simply add a black square for any wall encountered. Not sure if that would be difficult to implement or not but it looks to me like the easiest way to do it.
     
    Last edited: Jan 24, 2018
  24. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Yeah the current video tutorial is a bit outdated as I've stated in the description. When I made the tutorial, this "Resources" folder was automatically being extracted to the correct location after simply double clicking on a unitypackage file that was included inside of Dependencies, however the Asset Store Team suddenly disallowed extra unitypackage files from being included so you have to go through this manually. On this video tutorial, I really recommend that you instead read through the usage manual since these videos take a while to create and I cannot stay up to date with the process without creating an entirely new video, the usage manual is where the most up to date instructions are located.

    If you follow the instructions I have sent you in the above image it should be very quick to get started, but let me write them down for you.

    1. First you want to import the asset into your new scene.
    2. Next, drag the "Resources" folder that is found inside "Procedural Dungeon Toolkit" to the root of your project. The root is the "Assets" folder. Basically, put this "Resources" folder next to the "Procedural Dungeon Toolkit" folder.
    3. Import the "Characters" standard asset package to get the default fps controller setup.
    4. Click on the demoscene file inside of the "Premade Scene" folder to open the demo scene
    5. Hit play, you should now be inside of a procedurally generated dungeon
    Here is what your project should look like throughout these steps if you execute them correctly.

    First, after importing the asset into a new project.



    Then, this is the "Resources" folder you want to drag and drop.



    Here is the root of your project after the "Resources" folder is there.



    From this point simply import the "Characters" standard asset package. This is how the root of your project should look like before you load the demo scene file.



    As you can see, the "Resources" folder is located in the root of the project, or the "Assets" folder. This folder is used to store data about items, prefabs and generated levels so that the generator can access it even in standalone builds of the player. The "Resources" folder is archived by unity and this data is then easily accessible on any device.

    You can then load up the demo scene and you should be placed inside a procedurally generated dungeon!
     
  25. TonkRogerio

    TonkRogerio

    Joined:
    Apr 12, 2013
    Posts:
    15
    no I get that. I got it working. maybe I should have mentioned it. sorry. I was wondering how to start from a fresh new scene. I'll watch the video because it might have the answer there. I also added some stuff to my last post about the mini-map.


    //EDIT:- Just saw your mini-map work. that's excellent. the only issue I have with it really is that it's hard for the player to figure out if they have loose ends or not because there are no walls. I'm not sure if you see what I mean but in those sort of games players will usually be able to chose between two routs and then be reminded that the other rout is still unfinished based off of the graphics of the map. Probably not something you're thinking of implementing immediately but I strongly suggest it as it would make the mini-map really professional and streamlined for the player.
    Still./ thanks so much for implementing that feature. is it coming in the next update?

    Edit 2:- I've just had an idea. I'm not really great with programming but maybe it might be an easy fix to simply add a black square for any wall encountered. Not sure if that would be difficult to implement or not but it looks to me like the easiest way
    to do it.//
     
  26. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Oh great, I'm glad that you got it working! Starting from a fresh scene is not very convenient but to get it working you need to do the following. I think I have added these instructions in the readme file but not the guide since most people simply start from the demo scene, save their changes to a new scene and then start tinkering around from that point, which I would advise. However, let me explain how you can set up the asset without the demo scene.

    To start, set up the asset just like before but do not load the demo scene.

    First of all, create an empty game object and name it "Map". Place this object at 0,0,0 in your scene to make sure the dungeon generates around the origin. This is not required but makes things a bit easier.

    Then, link the "DungeonGenerator.cs" script to this "Map" object. When you click on the object, you should now see that the custom inspector is loaded instead of the default unity inspector. This GUI is the main gui where you can tweak the map generation algorithm, toggle on and off or add new prefabs, move them around, etc.

    Then, create 3 cube objects. One of them is the "Wall" prefab, one of them is the "Floor" prefab and the other is the "Roof" prefab. Scale the wall to 3x3x3 and scale the floor and roof prefabs to 3x1x3 to create "tiles".

    Next up, click the "Map" object to reveal the main GUI once again. Under the "Object Slots and Toggles" drop down, link your Wall, Roof and Floor objects to their respective slots in the GUI. Make sure you toggle these slots ON using the checkbox next to each object slot but make sure it is toggled OFF for any other slot to prevent the script from trying to instantiate a missing prefab. This part of the GUI is where all of the "building blocks" of your dungeon are located.

    Also, make sure you delete any slots under the "Custom Object" region of this drop down by using the "X" button next to each existing slot. These slots are where you would add custom objects but since we're starting from scratch the prefab does not exist.



    As you can see, I have linked the 3 objects we created. I've circled the button you need to press to delete the "Pillar" custom object since it's slot is empty.

    Let's keep going. From this point the generator contains all the necessary game objects required to generate a level, however the current settings are all pinned to zero because we are in an entirely new scene. The next screenshot will outline the changes you need to make in order to generate a dungeon.



    Under "Map Options" turn on "Random Seed Mode" to have the ability to generate a random dungeon every time you hit the play button. Also, increase the "Map Width" and "Map Height" sliders to something a little bigger than the default value to make sure the generator has enough space to generate this dungeon. In summary, the "Map Options" drop down are where the main dungeon canvas settings are located.

    Next, under "Procedural Map Options" ( and I forgot to circle that one ) toggle off the "Use Pre 1.16 Algorithm" to reveal the settings of the new map generation algorithm. The value I have circled will work, so you can just use those if you want. However, this part of the generator is where you tweak the generation algorithm so the amount of working configurations are numerous. Before moving on to the next drop down, make sure you hit "Apply Current Settings" to save this configuration.

    Finally, toggle off the "Use Object Pooling" toggle under "Performance Options" since you are not using a player game object as being the origin of the basic object pooling script I have included.

    You should now be able to hit play and, by going into scene mode and focusing on the "Map" gameobject, should see a procedural dungeon built out of your 3 created objects! As you can probably tell, this process is much more complicated than just starting from the demo scene which is why I simply recommend starting from the demo scene and tweaking things from there. You should at least go through the usage manual while using the demo scene so that you can get a good grasp on all the features.

    About your wall detection idea, I could implement this however it will be a bit more complex to add since I need to perform neighbor detection to see where walls need to be added on the drawn map. And yes, the new fog of war feature is going to be added in the next update!
     
  27. TonkRogerio

    TonkRogerio

    Joined:
    Apr 12, 2013
    Posts:
    15
    Wow this is working great, thanx, man. This is like 20% of my game right here. now I just need to code the rpg stuff. My character controller works perfectly with this after a couple of changes too.

    I've noticed the "pre 1.16" algorithms create a lot of unlinked rooms. is this completely fixed now if you untick that option? if not then there is the potential of breaking the game if something important gets spawned in those rooms, right?

    How do I add the mini-map function to new scenes? I've added the "player map" item to my own player from the demo scene but it doesn't work properly.

    Also, this asset is exactly what I was looking for. I think I've figure out ways to make secret rooms with one single door asset. it's not ideal but I can get it to work I think. Great work.
     
  28. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    You're welcome! I'm happy that you are liking it :)

    About the pre 1.16 algorithm, yes this has been fixed if you untick that. The old algorithm was a lot more messy than the new one and I had not quite nailed the problem causing these weird rooms and I did anticipate that if an important Unique item would happen to spawn in one of those rooms it would be game breaking. This is one of the main reasons why I completely reworked this algorithm, I only left the old one in the asset as a legacy algorithm for those who wish to use it, and it's also the only algorithm that is available in the upcoming "Lite" version of the asset. Very rarely when I am running the program used to debug the algorithm, as I have posted about a couple times earlier in the thread and on my youtube channel, I still see some useless room entrances appearing. The next update will be fixing this completely by adding room entrances to the "Deadend Removal" algorithm which you can already turn on to remove corridors leading to deadends.

    About the map, I've just noticed that in a fresh scene the execution order of the "Start" method of this script seems to be messed up and happens before the map has been generated, which causes an error crashing the rest of the script. Also, I seem to have never implemented a player position using a game object slot feature meaning the player position could only be acquired from an object actually named "Player".

    Instead of having you change all of these things by yourself, I've archived the updated script along with set up instructions ( basically, close unity, open the project folder in explorer and replace the old script with the new one ) so that you can use this new fixed script right now. It also includes the new feature you asked about to make the fog of war disappear only on the tile which the player is currently standing on. I have not implemented the wall detection yet but it might be coming in the next update if I figure out a good way to do it before I decide to release this update.

    Anyhow, here is the link to this archive : https://drive.google.com/open?id=1lDrsmcRZ2iAVmXcucsXJ9eh1kej8MsA1

    After you've set this new script up, to get the map from scratch, create a new plane game object. You can then remove the Collider component to make sure it wont interfere with other objects. In the Mesh Renderer component, replace the Default Material with the "MapMat" material included inside the "Procedural Dungeon Toolkit/Prefabs/Materials" folder. Next, link the "DrawMap.cs" script to this plane game object. On this new component, you can link any game object in your scene to the "Player Object" slot of the Draw Map component so that this object is used as the position of the player. Then, toggle off "Compass Mode" to make sure the plane wont rotate to follow the player's orientation, if it is toggled on by default. Also, turn off the "Explorable" toggle for the moment so you can check if the map drawing is working correctly.

    You should then be ready to hit play and see if the map is working and correctly rendering the whole map. If you see an all white texture instead of the map, this might be because the character controller's position is too low for the map to register the correct floor. In this case, try creating an empty game object as a child to your character controller object and put it slightly higher, to make sure it is really "within" the dungeon when your character is on the floor, then link this new empty gameobject as the "Player Object" slot of the map drawing component. You can also use the "Override Floor" toggle to instead render an entire floor. I will most likely use this feature in a game where you can search the dungeon for a map of each floor, so that to get the whole map you need to first reach that particular floor, or even as a way to have a procedural "Floor Plan" wall poster as can be found in most office buildings.

    In any case, once you've confirmed that the map drawing is working, you can simply split the scene and game windows in unity to correctly place the map in the middle of the player's field of view. Make sure that you link the Plane object containing the map drawing script to the "Camera" object of your player so that it will always be positioned in front of the camera.

    I hope you have no trouble setting up these new scripts and once again thank you for your kind words about the asset, I really appreciate it :)
     
  29. TonkRogerio

    TonkRogerio

    Joined:
    Apr 12, 2013
    Posts:
    15
    It's working perfectly as far as I can tell now, mate. you're a legend and well worth the 5 stars when I write my review tomorrow. Thank you for everything, you're a star. you've just saved me tons of work and even allowed me to have random gen in my game which is something I had no idea how to do :/
     
    r3eckon likes this.
  30. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    After nearly a month spent in validation limbo, the LITE version of the asset has finally been released! For those who wish to try out a stripped down version of Procedural Dungeon Toolkit at a lower price, keep in mind that your purchase of the LITE version is kept into consideration when you upgrade to the full version!

    Here is a link to the store page for anyone interested : https://www.assetstore.unity3d.com/en/#!/content/108331
     
  31. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Here is another feature I never got around to adding until tonight, the ability to quickly edit the size of each level node to control it's position in the scene. It was already possible to edit by modifying a single line of code but this GUI makes it much more easy to tweak. By increasing or decreasing this option and the Floor / Roof Height parameter you will now be able to easily place level pieces of any scale.



    In the above picture I have slightly increased the X and Z values of the node size which created gaps in my un scalled pieces. However, the practical use is obviously to have the wall, ceiling and floor sizes to make corridors that are either wider or thinner, as seen below :





    This process currently breaks the translation settings for objects that are not at the origin of a node, for example the torch and drawer objects are not resting on walls anymore while in the "wide" example they are clipping through it. While this is not much of an issue since most uses this feature are creating pieces made for this scale, I intend on adding a "Scale Translation" toggle that will scale translations based on the node size they were created for vs the node size they are being applied on.
     
    TonkRogerio and StevenPicard like this.
  32. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Here are some screenshots of the GUI update to the Model Editor used to add Triggers to room models. This "Trigger Editor" window will open by clicking on a new button next to "Choose Origin Point", which also puts the model editor into a trigger editing mode that does not draw tile types. An orientation drop down is used to select the orientation of the trigger you want to add to the current point and by clicking on the relevant button you can then add each type of post generation trigger to the room model.



    Points on the buffer that contain triggers will also turn to red while in this edit mode, as seen below. The information window also updates to show the information of triggers on the current tile. Something you might notice about the editor is that the buffer's Y coordinates now correctly reflect the cardinal orientations used to add triggers, which makes the trigger orientation process much more natural.



    Next update should release some time next week, once I have also updated the manual to explain this new stuff. Until then, I will be back soon with screenshots and videos of this new feature in action!
     
  33. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    I've just tested the actual Post Generation Trigger system to make sure it works and sure enough the system works perfectly at calling generation code after the initial map has been generated. Here we have a pretty weird looking map that was created without having any "Branching" of corridors whatsoever.


    Indeed, the "branches" of the level are entirely created using PGTriggers that have been applied on the tiny room model shown below. As you can see, it only features an entrance and a single room tile before a PGTrigger is added to the top of this room tile.


    And here are the generation settings used to create the above map! While this might not make for the best level, this was only to test out if the system was working as intended inside of the asset. This system will be best used when paired with gameplay relevant rooms like the secret rooms I have been talking about in a few posts previously.


     
  34. TonkRogerio

    TonkRogerio

    Joined:
    Apr 12, 2013
    Posts:
    15
    so I've been messing about with this app and I've got a few problems that have come up.

    1:- I keep getting this "UnassignedReferenceException: The variable lamp of PlayerInventory has not been assigned." error. I'm guessing it's because I don't use your inventory script. Is there a way to bypass this check for games that don't need it?

    2:- The Dungeon creation editor is different from the ones in the tutorials. is it updated?
    https://i.imgur.com/OjVmbZ5.png

    3:- When I create my own dungeons they lag a lot. even on small ones. I usually get 65fps on much larger dungeons. Why do you think this is happening?
    https://i.imgur.com/04Oh5WD.png

    4:- Is there a way to force the player to spawn at a door that leads to outside of the map? at the moment the pc just spawns in the middle of the dungeon. I want there to be a door that I can code to spawn the player outside and the player must start right in front of this door.

    5:- is there a way to call for more than one type of door? I want to have wooden doors and iron doors for example. do I just give them the same properties as the normal doors? in the map editor there are entrance 1 +2 and room 1+2 which is odd.

    Thanx a lot for your time. despite these problems, I'm really enjoying this app. Hit me back when you can.
     
  35. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Hey there, let me answer those questions for you.

    1. Are you sure you are not using the inventory script? The only way I managed to get this error is by removing the "Lamp" object reference of the playerinventory script. As you can see below, by deactivating the script I do not get the error anymore.





    If you still get the error I will need a bit more information on what might be causing this problem in your case. Click on the error when it appears then show me this part of the editor so that I can see which script is causing the error if it is not the playerinventory script, maybe hidden somewhere in your scene for some reason.



    2. Yes it has been updated. The original map editor did not allow for editing the map while holding down the mouse button, this is why instead of using default unity editor buttons I have used rectangles. However, the editor works exactly the same way as described in the video tutorial. Once again I really recommend that you instead read the usage manual instead of watching the youtube tutorial, so that you get the most up to date information.

    3. I'm not sure what could be causing this. The CPU thread seems to be taking a major hit from a particular script, perhaps it's related to the playerinventory script bugging out while trying to update the missing lamp object. To know which script is causing this lag, try using the unity Profiler and send me screenshots once you have identified which script is causing this. As shown below, by going down the "Update.ScriptRunBehaviourUpdate" tree you can see every script that might be taking a toll on your game. The script causing this lag should be listed there.



    If you can, send me the map file you are using that is causing this lag. I'll try opening it up to see if it is also laggy on my computer.

    4. There are many ways you could do this, all depends on the how you want this door to work. The easiest way would be to simply have a scripted "portal" type door that will instantly teleport the player inside the dungeon at the usual spawn point, perhaps after a small cutscene or loading screen. Using this method will simply require you to create a custom starting script for your game that will first spawn the player outside the dungeon, then use the "spawnPlayer()" method of the DungeonGenerator.cs script to spawn the player at a spawn point in your dungeon. Your outside world can be an entirely different scene than the dungeon one and you use scene transitions to move between the two places. Someone else has actually used this exact method without problem so right now this seems like the best way.

    If you want a door that is part of the dungeon and that will instead lead downstairs into the dungeon, then this process depends on where the "outside" world is relative to your dungeon. Since I assume you want to probably have the dungeon be underground, you will need to edit the way the MapGeneratorV2.cs script works to make sure the space taken by this staircase is taken into consideration by the rest of the map, add extra tile types for this special stairwell and also add custom objects to place the stairwell correctly. I'm myself not sure about the best way of going about the second option would be. I'm thinking it should also be possible to only have a single object that contains the stairwell and the first entrance to the dungeon, making sure to use a tile type to represent the space taken by this stairwell so that the generator does not spawn anything in this area. I'll try out a couple ways of going about what you want to do and report back when I've got a solid way of doing this, as I've actually wanted to add something along those lines for a while now. It might take a bit longer since I'm currently working on another part of the generator.

    5. Yes, absolutely. The Priority and Avoidance system is made for this purpose. One thing though, in trying to make you instructions on how to do this I've noticed a small bug that would prevent you from doing this. Since this is a single line of code you need to remove I'll explain how to do it this time.

    Open up the DungeonGenerator.cs script and scroll down to line 2540. In this newEntrance method, you need to remove this line of code, which for some reason changed the name of the prefab before it is instantiated.



    This line prevented my avoidance system from finding the actual "DoorFrame" prefab and I only used it in the early days of the generator to reduce the amount of "(Clone)" objects, so let's remove it. Your script should now look like this. Hit save before closing the script editor.



    Now that this is fixed, the Avoidance system will work as intended. I've noticed that some other hard coded objects seem to have this problem as well so I've went ahead and removed all of those name changing lines for next update. In any case, let's get down to adding this new door.

    First of all, create a new Custom Object slot and link your new door prefab. The object I'm using for this demonstration is the "SecretPassage" prefab I have been working on. Then, hit Edit... to open up the Custom Object editor. If this new door object requires different translation parameters than the regular door object, make sure to input the right translation in there. Also, make sure that the translation type is "Vector4" so that the object will be automatically orientated towards the room.



    For the next step we need to create the detection pattern that will place this door where there is a valid room entrance. For this purpose, you can use the ANYROOM and ANYENTRANCE global tile types which will detect both type 1 and 2 entrances / rooms. By the way, those two different types of rooms are only there so that you could, if you wanted, add certain prefabs to certain rooms instead of having all rooms be the same. Currently both types of rooms work exactly the same and have the same prefabs.

    Set the "Orientation" to "Automatic". The Vector4 translation type paired with "Automatic" orientation means that the object will be automatically rotated towards the tile it is trying to detect as the North tile of this pattern. In the case of the room entrance, the door will be orientated towards the Room tile it detects in front of the door frame.

    Next, toggle on "Use Auto Generated Directional Presets". This toggle is used to automatically create rotated versions of the detection pattern so that objects that should be placed in every possible direction can detect every spot in the map where they can spawn. When used with the "Automatic" orientation, the prefabs are rotated in whatever direction the pattern was matched, which is essential for objects that depend on their orientation.

    Finally, create the detection pattern shown below and hit "Save to Object" to apply this pattern to the new entrance.



    By toggling off the existing door object, you should now already see this new door object being correctly placed where the existing prefab should have. However, we want to randomly replace some doors with this new one. For this, we use the "Avoidance and Priority" settings. Turn on "Use Avoidance" and slide the "Global Priority" toggle all the way to 100. The toggle makes sure that this object will check for any objects you add the the avoidance list before either removing the offending object if the Global Priority is higher than the one of the object your are trying to remove or removing itself if the priority is lower.



    Now, add the "DoorFrame" prefab to the list by entering it's name in the text box and hitting "Add to Avoidance List". Note that the avoidance list finds objects by using the name of the prefab as it is listed in the scene hierarchy. This is the reason why the code I had you fix earlier was preventing this from happening since the "DoorFrame" prefab was renamed to "Entrance" before being added to the scene.

    Finally, turn on and set a "Generation Chance" to this new door object so that it only removes about half of your doors. For some reason this slider seems to go up to 200% but actually just a GUI mistake and the slider at a half position only means 50% of the time. Without using the "Generation Chance" toggle, this new door object would replace every existing door prefab in your scene.



    You should now be able to hit play and see that about half of every door in the scene has been replaced with the new one!



    As you can see, this "Secret Passage" prefab that only creates a tighter tunnel has replaced the usual door prefab in some instances. Basically, the "Generation Chance" slider prevents some of the new door prefab from generating which keeps about half of the original door prefab intact.



    By the way, this brick texture is not mine, I've found a nice library of free textures on the website https://3dtextures.me/ . I wont add those to the asset since the creator does not want us to redistribute his work but feel free to go on the website to download and use them.
     
    TonkRogerio likes this.
  36. TonkRogerio

    TonkRogerio

    Joined:
    Apr 12, 2013
    Posts:
    15
    I'll deal with the first three questions and I'll read the other three at another time.

    1:- absolutely right. I must have attached that script in an attempt to try and fix the previous problem of the map being drawn if you remember. I guess I just forgot and it started giving me this error. Thanx. this is fixed.

    2:- I've had a look at the read me but my brain must have confused the model editor for the map editor. The model editor is something I haven't really read through too much as I'm guessing it requires code but not sure yet. Looks interesting from the little i know of it though.

    3:- Here is a pic of it. It's the same problem with any made map, even if it's randomly generated. Probably a problem at my end but who knows :/ I really need this to set up a map though as a sort of hub world for my game.
    Where should i send the file? although I'm not sure if it will help as it's really any randomly generated map or created map that will do this.
    https://i.imgur.com/e3izPVV.png

    I'll get to the other two points later on. thanx for the quick reply.

    EDIT:- had a look at 4 and I'm not sure we're on the same path here. I know how to spawn into your dungeon from an external dungeon or menu or w/e. I'm asking for something a bit more simple I think. Basically your dungeon spawns me in some random block, which looks silly. I want to create a single wall block and to be spawned there facing away from it instead of at a random place in the dungeon. then I could use this block to spawn me wherever but that's a separate unrelated thing that I know how to do.
    So really I'm just looking for a special wall block that only spawns once in each dungeon and absolutely must spawn, and we spawn there facing away from it instead of randomly in the middle of the dungeon.
    It does feel a bit weird to not have an entrance block in a dungeon generator tbh so I thought maybe you already had it in there.

    Thanx again. I'll check 5 another time as it looks like it's a bit more complicated and time consuming.
     
    Last edited: Feb 3, 2018
  37. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    I'm glad you managed to fix your first problem! About the Model Editor, it is a pretty useful feature that currently enables you to draw room templates that are stamped at random on the level and with the next update those rooms will even be able to start new corridors ( and other rooms ) by using special "Triggers" placed on the models. It's great to make bigger boss rooms that can span multiple floors then have an exit on the other floors that lead to more rooms.

    About #3, I'll need you to open the Update.ScriptRunBehaviourUpdate drop down and follow along with the item that has the most CPU usage percentage so that we can debug the script causing this issue. And you can just add the model file in a zip and upload it to any file sharing website ( Google Drive works great ) so that I can access it, although you are right that since I don't get the issue this might not help to debug.

    And about #4, I think I understand what you want to do now and yes it is entirely possible. Let me show you how to do it. Since we are editing the level generation algorithm in a way that the GUI does not allow yet, please open the script MapGeneratorV2.cs and comment out ( add // in front of ) the following lines.


    Those 4 lines usually generate corridors in all 4 directions around the middle Spawn point but since you only want one, just keep the "Upwards" direction so that the player is already aligned with this. As you can see, we now have a spawn that is a deadend, marked by the green tile in the map. The player was of course spawned towards the open end of this tile like you wanted.



    And if you want to add a custom door, spawn marker or anything special to this spawn point in the dungeon, just create a custom object slot and use the following pattern to detect this spawn. No need to toggle on automatic orientation since it will always be towards the north, just make sure your prefab is in the right direction and you should be good. I've made a simple spawn marker just to you the pattern I'm talking about.



    If you have yet to read through this part of the guide, the "NOREQUIREMENT" drop downs basically represent the level tiles I want to ignore since they are of no importance to my simple spawn marker. I only need to check the "Spawn" type tile in the middle, which represents the current tile the generator is checking when building the level.

    As you can see, I've also translated it towards the top so that my player object is not spawned through it.


    And about 5, it does take a bit of time to do at first but that editor is one of the main part of the generator GUI and is extremely time saving compared to the alternative of having to manually program detection patterns. Make sure you read through the guide when you get the chance to learn all about how to use it.

    Until then if you have any other questions just let me know!
     
    TonkRogerio likes this.
  38. TonkRogerio

    TonkRogerio

    Joined:
    Apr 12, 2013
    Posts:
    15
    Well the weirdest thing happened. I tried to run my player controller without a lv so I turned off the dungeon gen script and it still gave me really low fps. so I then turned off the game object with the script and it was fine. loads of frames. I tried loading my map again and realized that it's not drawing the map. maybe that update you gave me made changes to the map drawing in a way that it messes up with loaded maps.

    Here is a pic of the profiler:-

    https://i.imgur.com/37XTmUU.png

    EDIT:- so I did some more testing and I started the map but with player map turned off. I turned it on halfway during the map and it started working just fine, but I noticed I didn't spawn in the green square. But it's weird that if I start with it off and then turn it on after starting up the game that it works fine with no frame drop.


    Also thanks for helping me understand how to spawn an entrance. can I in essence spawn that entrance in a room? or maybe in a model? no description is necessary. I'm going to have a look at the model part of your asset at some point in the near future because I think I'll defo be making use of it soon. Sounds very interesting, specially if I can spawn specific model rooms with specific doors. I thought code would be needed for it but I guess I was wrong. I'll read that section from the readme as i skipped it last time.
    At any rate, I get how to do the entrance using the method you showed me.
     
    Last edited: Feb 3, 2018
  39. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Seems like this player map bug is related to the FPS drops, since the profiler shows that the map script is taking up all the CPU usage causing this lag. I'm still unsure about what might be causing this issue since I have no problems when loading a map saved on my hard drive, but since you have no problems with the map if you activate it after the dungeon has been generated seems like there might still be an execution order problem with this script, at least when you are using it with another first person controller.

    I'll do some testing and get back to you when I find something but this might be a bit harder to debug since it does not happen on my side.

    EDIT : So it looks like I cannot find the cause of your error I'm afraid. If you could send me a screenshot of the error after clicking on it so that I can see the details and the line causing it it would help me a lot in trying to debug this.
     
    Last edited: Feb 5, 2018
  40. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Here is a screenshot of the Secret Passage prefab I have been talking about in a couple posts. I was getting a weird z fighting issue due to the scale not matching correctly to the walls for some reason but it's now been fixed and looks pretty much spot on.



    While the main purpose will be to place a fake drawer prefab in front and create a secret entrance, it can also be placed in a custom object slot checking for a straight line of corridor tiles to create very tight hallways with more open corners, which makes me think that maybe having an actual "Tight Corridor" tile type might be a good idea to add a bit of variety to the dungeon.

    Anyhow, the update will be a bit delayed since I've found a few annoying bugs with the new trigger editor system that I want fix before releasing. I'll be back to tell you guys when it'll be sent up for validation :)
     
  41. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Update has just been sent for review! It should be live some time next week, maybe even before the end of this week if the asset store team is not too busy.

    Here are links to the updated Usage Manual and to a new Demo Build for those who want to check out the Post Generation Trigger system in action. The build generates quite weird maps with the branching options set to 0 meaning that every corridor that is not attached to the spawn tile has been generated by the tiny room model made of a single room tile and two entrances. The screenshot of the previous post has actually been created with this room model, but the regular entrance had been changed to show the secret passage model.
     
  42. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Oh wow, this was much much quicker than I expected. Version 1.22 is already live! Here is the full changelog.

    + Added Node Options
    + Added PGTriggers & Trigger Editor Window
    + Added Generation Direction toggles
    + Added Secret Passage prefab & textures

    * Updated the map drawing script to allow prefab based player position, custom exploration range and usage of node options
    * Updated the model editor for PGTriggers
    * Fixed model editor trying to save and load empty paths
    * Flipped model editor buffer Y direction to match cardinal directions
    * Fixed Hardcoded Objects naming that prevented Avoidance from removing them
    * Fixed door opening script
    * Updated usage manual to explain new features
    * Tweaked hardcoded torch generation to be on the floor node instead of on the wall node
    * Various smaller bugfixes and memory optimizations
     
    Last edited: Feb 8, 2018
    TonkRogerio likes this.
  43. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Here is a new bookshelf / drawer model I'll be filling with prop books and item spawners. Other than being correctly textured, this one is a bit taller than the old one so that it will correctly hide the secret passage behind it. My plan is to have one of those packs of fake books in between item spawners to be interactive and used to activate the secret entrance. Perhaps the actual pack of book that needs to be triggered by the player could also be procedurally placed within the bookshelf to make for a small puzzle to open these doors.

     
  44. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Using the item spawner system I've easily created non pickupable book props that are randomly placed in the new bookshelves. By adding different variations of the books prefab this should make for a quick way to diversify rooms a bit. Also, the texture is only solid colors right now and a bit of my unwrap is messed up so I'll have to rework that.



     
  45. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Here is a change that will be coming in the next version, I've also flipped the Y coordinate of the Map Editor's buffer to match the north of the levels in game, making it a bit easier to design maps correctly.



    As you can see the direction of the map in the buffer matches the actual direction of the map and the player correctly spawns towards the open end of this corridor.



    In the next few days I'll be experimenting with adding the PGTriggers editor to work with hand drawn maps, so that you can basically hand draw the main part of the map and let the generator grow other parts of it. I should be back soon with progress reports on this new feature pretty soon!
     
  46. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    The new feature enabling PGTriggers to be placed on pre made maps is already implemented and being tested! As you can see below, I have created a simple map with 3 triggers at the end of the main area of this map. The white square at the bottom is the Spawn tile where the player will start.


    This Trigger editor behaves and works in exactly the same way as the model editor's. You enter Trigger Edit mode and then pick an orientation using the drop down. Finally, click on the relevant button to add a new Post Generation Trigger with the input settings to the map and a red square will show up at this point in the map when in PGTrigger Edit mode.

    Basically, this feature allows you to design the important parts of your map while still enabling the random generation algorithms to take over and randomize other parts. Here are 3 variations which have all been created using a single map file!


    Finally, since the PGTrigger system uses the MapGeneratorV2 algorithms to generate corridors and rooms and also to clean dead ends, a new option has been added to show the Procedural Map Options drop down even while using a map file so that you can still tweak the behavior of the procedurally generated parts of your level if you desire.


    This new feature will be added in the next update which should be coming next week or even this week if the asset store team is as fast as it was last update. I still have a bit of testing to do regarding this feature but the major work needed to implement and get it working is already done :)
     
  47. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
  48. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    While playing around with the new map editor features I've found the cause of and fixed an annoying bug with the generator that caused increasing level values to actually generate downwards in the environment, which made for some weird quirks when creating maps and room models. I've actually been aware of this bug for a while without ever paying much attention to it since at the time I had no idea why this was happening so I simply decided to adapt most features to work around it, mostly by automatically flipping the model and map editor's representations of the canvas to still show the tile map in the correct direction.

    You can try this bug by going in the Map Editor and drawing a small map containing a stairwell ( one STAIRS tile and one STAIRCASE tile above it ). When generating procedural maps, the STAIRS tile type is added on the lower level of a stairwell so the floor and ceiling objects work with this idea in mind to correctly place the openings for the stairwell. However, a map drawn as I have described will not generate the stairwell correctly since in reality the STAIRCASE tile that you've placed above the STAIRS tile will actually be below this tile due to nodes going downwards.

    This has now been fixed and a map like the one I have talked about will now correctly place objects needed to create a working staircase. To be sure, nothing about the GUI process of drawing maps is changed due to this fix besides the fact that staircases can now be drawn much more naturally. Most of the stuff that needed some changes are behind the scene / automatic features of the asset.

    Since I've been testing for longer than I expected, the coming update will most likely release next week.
     
  49. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Here is another small feature I have added while updating the map editor. Using this new "Buffer Rect Size" slider you can render and edit a much larger portion of the map on the canvas by making each tile smaller ( or bigger to "zoom in" ). While this breaks the labels in ways that I don't think I can fix due to the way they are rendered in the editor, having the ability to see an entire map is quite useful!


    This feature will also make it to the next version. Also, here is a new "Dungeon Exit" prefab I have created yesterday. It's basically just a ladder leading into a hole in the roof which is brightly lit up to give the impression of sunlight on the outside.


    For some reason due to the way the character controller is set up it is possible to climb the ladder even if the bounding box is at a very drastic inclination.


    Like the name of the prefab implies I will use this to mark the ending of a dungeon, which will involve editing the generation algorithm a little bit to re-implement the ending tile in a right way by using algorithms to find the spot in the dungeon that is farthest from the spawn location or at least to make sure the ending is not right next to the spawn. After the coming update to the map editor, I'll be working on gameplay scripting to make interactive prefabs within levels including this exit ladder and the secret passages I've talked about in a few posts.
     
  50. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Version 1.23 has just been released! Here is the changelog for this new update :)

    + Added PGTrigger support for the Map Editor

    * Flipped map editor Y coordinate to correctly reflect cardinal directions
    * Fixed map drawing script square sizes dealing with with non square maps
    * Flipped the node level direction that was descending instead of ascending
    * Fixed table translations not using the node center as translation origin
    * Updated map editor, model editor & map drawing script to work with node direction change
    * Added fast and precise movement of the map editor canvas
    * Updated the usage manual to include information about the updated Map Editor