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. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    Looks good. Will this work in VR?
     
  2. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Yes. It will work on any device compatible with the Texture2DArray feature. Here is the official unity compatibility list. Currently the map is rendered on a UI canvas image but it could easily be placed on a plane mesh and dynamically appear in front of the player in VR as they look down / take it out from their inventory to be better suited for VR viewing.
     
    StevenPicard likes this.
  3. StevenPicard

    StevenPicard

    Joined:
    Mar 7, 2016
    Posts:
    859
    Sounds great!
     
    r3eckon likes this.
  4. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    After being away for a little bit I got to work on the asset again and this week I managed to improve the generation times by simplifying the avoidance system. The avoidance loop, which was usually executed after every object was being added, is now being executed once over the full map.

    Most existing setups should be fully compatible with the optimized system, however I have found some cases in which issues can occur. One of those cases is an issue occurring when two custom objects share a same prefab and a same priority, causing the removal of both objects. This can of course be avoided by either tweaking the object priority settings or simply using differently named prefabs for each custom object.

    To entirely avoid this issue and also improve the system, avoidance lists may benefit from a new naming scheme where the custom object / variation name is attached with the prefab name to make it possible to distinguish which custom object added a certain prefab. This solves cases where a same prefab is added by a custom object that uses a pattern that does not place the prefab in the way of the object running the avoidance loop. This new naming scheme should be added on top of the existing one, with lone prefab name working to remove matching prefabs added by any custom object. It could also be expanded to allow referring to parts of prefabs.

    To help debug any future issues with the avoidance system, a new Avoidance Debug Mode toggle has been added. This feature will send a bunch of information to the console upon level generation that may help you figure out problems with your setups. It should also help me a lot in responding to support emails.


    If anyone has any thoughts or suggestions on this upcoming change, be sure to let me know! I am not sure when I'll be ready to release the next version but it should be coming quite soon, most likely in early September.
     
  5. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    I apologize for not being able to release the new version on schedule, while I have been quite busy with other projects I also got stuck on a UI issue regarding the shader based mini map. For some reason the edges of the map would be twitching and flickering as the player moved around the level. After attempting most of the fixes I found online with no success I decided to go work on something else hoping that this was an issue with the current Unity version I was using. However after testing it with the latest version and still experiencing the issue, I was officially grasping at straws.

    Turns out the issue was my own apparently wrong usage of the Unity canvas. It appears that having a UI canvas as a child of a moving object in the hierarchy causes all kinds of weird issues. In "screen space - camera" mode, the twitching I described above would occur. In "screen space - overlay" mode, the image would randomly flicker in and out of existence as the camera moves and rotates. It took me a while to realize this was the cause of my issue because not only did I found nothing online about this problem, the rest of my UI elements worked just fine as is, which led me to assume perhaps something was wrong with the combination of shader based texture + ui canvas.

    In any case, I have now fixed this annoying issue and am ready to pull the plug on this next update. I will be back with a follow up post as soon as I have sent next update for validation :)
     
  6. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Version 1.31 has just been sent for validation. If all goes well it should be out by the end of the week!
     
    StevenPicard likes this.
  7. yarsrvenge

    yarsrvenge

    Joined:
    Jun 25, 2019
    Posts:
    87
    Just purchased this and was reading through the manual a bit. I'll likely use the multiplayer demo scene as a starting point even though I am not using multiplayer features. I'm keen on replacing the existing walls, floors, ceilings, stairs with something a bit more realistic. I read this in the docs:

    "It is recommended not to move any object related to the main
    level generation. Wall, Ceiling, Floor and Stairs are all objects
    that are required to create a full dungeon level with no holes."

    I assume it is okay to replace the existing prefabs for the main level generation objects, but they would need to be the same exact dimensions as the current prefabs...is this correct? I can see this will be time consuming, but wanted to make sure there isn't an easier way.
     
  8. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Hey there, this recommendation is related to the fact that the demo levels generated by PDT are spaced out on a 3D grid using a cell size of 3x3x3 world units, in which a (0,0,0) translation settings for an object added to a certain map point or "node" is the center of this area. For example, walls are 3x3 planes pushed 1.5 units towards the direction that requires a wall using the custom object requirements system. Floors and ceilings pieces are the same sized plane but added everywhere an empty tile is above or below a walkable tile, moved 1.5 units towards the bottom and top respectively. This essentially "caps" the play area, not only giving a starting point to build on top of but also making sure the player can't see any back faces or fall through anywhere. This is why moving those objects could break the demo scene base layout.

    However, this is just for my own demo scenes. You can easily use any size you want for the nodes with the "Node Options" GUI, even using uneven nodes that are taller than they are wide. Having a cube area of 3 units simply made things easier for me in creating modular models, but if you intend on using a modular model pack or some other size for grid cells, all you should need to do is figure out a node size that allows whatever models you use as "caps" to connect seamlessly. The older demo scene actually uses floors that have some thickness, so there's also a feature used to push each individual "floor" of the dungeon some distance apart to make sure there is no z fighting.

    You can have a look at Part 4 of the usage manual for an example usage of the Node Options GUI, and if you have other questions just let me know!

    (Edit : Removed some typos for clarity)
     
    Last edited: Oct 1, 2019
  9. yarsrvenge

    yarsrvenge

    Joined:
    Jun 25, 2019
    Posts:
    87
    Thanks! I re-read this sections of the doc and in addition to your comments I was able to sort it out. Really impressed how it is coming together so quickly.

    I'm curious if you have suggestions on the best way to add trim pieces to the bottom, middle or top of the walls to make the dungeon a little more aesthetic. I add some to the bottom of the wall, but there are obvious issues when you start having walls that have a right angle 90 degree corner or connect to a 45 degree angle wall. The trim pieces overlap and cause some Z-Fighting. They obviously work fine when it is just a straight wall followed by another straight wall.

    Not required, it would just add nice touch and make it more immersive.
     
  10. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    For this kind of piece you have a few options. The lazy / quick option would be to use another piece and add it in corners on top of the z fighting. I experienced this problem with a free modular model pack I tried out that had part of the walls sticking out forward a bit, which caused the Z fighting you talk about in inward corners but also left an empty gap in outward corners. Simply adding a model on top to "fill" the corners masked the issues while still looking nice.

    However if you either absolutely need textures to match or just don't want to add this extra model on top, you can also go create the variations you need to handle inward and outward corners. By creating trim pieces that have connecting edges at a 45 degree angle you should be able to seamlessly connect them in any combination with no z fighting or empty gaps. Then you'll have to use the object requirements system to detect spots that need to use those special connection pieces in place of the regular trim pieces.
     
    yarsrvenge likes this.
  11. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    The main AI controller script has recently seen a complete rework / clean up to fix a few issues. It's also been updated to allow debug mode of individual AIs to help fix potential issues, and two new variables use to control light level checking behavior : the PlayerManager.cs script now uses a Self Light Level value to add to the light level count whenever the player lamp is toggled on, while the Light Detection Threshold of the revamped AI controller can now be tweaked instead of being hardcoded to 0 to allow the player to hide in various light level areas from different mobs.




    While the AI seemed immediately way more stable than before in small maps using the reworked script, at first there appeared to be some issues with navmesh pathing when the AI tried to patrol very large maps. However after doing a bit of research on potential issues with navmesh agents, I now believe this problem is instead related to a bug of the Unity version I'm working with, which makes it so activating and deactivating "carving" navmesh obstacles can throw off the pathfinding algorithm, causing the AI to start trying to walk through walls / moving forward into the edges of the navmesh until something causes a new path to be baked, such as walking in front of the AI.

    After removing any objects with carving Navmesh Obstacle, I ran the AI for a bit over 8 hours while the player was fully hidden to make sure it would remain it patrol mode and when I came back to my computer the AI was still walking around. This tells me that the TMBO optimization method turning navmesh obstacles on and off is probably the cause of this issue. The workaround is quite simple : using a "NavmeshSourceTag" instead to bake obstacles as part of the procedural navmesh, but if you really need Navmesh Obstacles to work with carving enabled, I recommend you use Unity 2018.4 and above.

    Finally, I also added a simple option to control the maximum amount of AIs spawning in a dungeon. It has been added under the Performance Options part of the GUI. A parameter of 0 means no limit to amount of AIs that can spawn.

     
    Last edited: Oct 11, 2019
  12. yarsrvenge

    yarsrvenge

    Joined:
    Jun 25, 2019
    Posts:
    87
    I have a need to spawn a single item object that is required on each level. It seems as though if I set the spawn percentage all the way up to 1 and make it "unique" it still does not spawn sometimes. I have not looked at the underlying code yet, but I would imagine this is by design since there is no guarantee of a spawned object. If so, that is ok...I will just need to make a code revision at some point.

    I noticed some weird behavior from agents even though the navmesh looks correct and saw your post above. Based on what you said, it sounds like we should use a navmeshsourcetag on game objects that include a navmesh obstacle component (and carving unchecked) so the agents navigate around things like tables...correct?
     
  13. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    You are mostly correct on both points. There is no real guarantee of an item spawning in the dungeon with the current system, however it would be a quite easy to add level generation requirement and I may very well do it for next version.

    As for agents glitching, the workaround I described is to use NavmeshSourceTag instead of the NavmeshObstacle component. The SourceTag component works during runtime baking of the navmesh and marks a certain object as a part of the navmesh, unlike obstacles which are only supposed to be able to dynamically "carve" the navmesh as they move. In 2018.3 this appears to be the cause of an issue where agents simply cannot calculate a valid path after those obstacle objects are enabled and disabled (which happens as the player moves around due to the optimization code).

    Basically to work around this you can just upgrade to a higher Unity version or use Source Tag with a primitive mesh instead of Obstacle component with carving. Source Tag works to add "obstacles" too, since you can just add a simple rectangular mesh around your tables and essentially make them part of the Navmesh. That way, Agent "Step Height" parameter will control whether or not they are allowed to walk on top of the tables.

    While this whole issue is more related to Unity features than my asset, the asset implementation of those features could probably benefit from a way to make those annoying navmesh obstacle objects remain activated at all times to give the AI an easier time calculating paths as the player moves around. Perhaps custom objects could have a toggle allowing them to be set as "Optimize Rendering Only" where all scripts / colliders / other components of the object remain active except for the renderer component when it goes out of player range.
     
  14. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Here is a simple locked gate object I have added to the low poly model kit. I made it a little while ago but never got around to adding it as an object in the asset. It uses an updated version of the normal door opener script in order to need a key to unlock from both sides.



     
    StevenPicard likes this.
  15. yarsrvenge

    yarsrvenge

    Joined:
    Jun 25, 2019
    Posts:
    87
    I've started working with the room templates. I am creating a room that I only want to be accessible through the origin point and not have the generator open up parts of the wall to other generated corridors and rooms. Basically, it is a locked room only accessible via that one entrance.

    I assumed that as long as the Templatetype to check was only the origin point tile type (bossentrance) and that would do it but sometimes other corridors are still connecting to various walls. Just wanted to get some clarification on how to set this up correctly.
     
  16. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Which tile type are you using for the main room area? If you are using either Room or Room2 types, the template is connecting to other parts of the layout because of the random room growth algorithm, which allows Room tiles to connect to existing Room tiles. Even if you use types to avoid / types to check on the template, this can only prevent the template to connect when it is the one being added, it won't prevent randomly grown rooms from connecting to that template.

    Since the room growth algorithm only uses Room and Room2 types, if you want to make sure your templates don't connect to anything you can use the BossRoom type or even make your own room tile type. If you feel like adding your own room type, you'll probably want to look inside the TileType.cs class and add this new tile type in the "ANYROOM" category so that it can work with any custom object pattern using that type to detect and add things to rooms. You don't need to do this last part if you want the content of that template to be unique, but in this case you'll likely have to add an entrance placement object pattern to work with your new type.
     
  17. yarsrvenge

    yarsrvenge

    Joined:
    Jun 25, 2019
    Posts:
    87
    Thanks for replying. I actually am using the BossRoom tile type as well as brand new types I created (Torture and Start). Even though they are new types, they are still sometimes being connected to from other areas. Sorry, I should have mentioned this.

    I actually put these types in the bottom along with your sample toilet room because as you said, I have some specific generation requirements I built for them.

    Anyway, here is a screenshot of the one that is using the bossroom tiles. I think I even made it similar to your example. I wouldn't say it happens often, it is pretty rare.
     
  18. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Thanks for the extra details, from what I can see from your template I believe the problem is that your room template has tiles other than entrance tiles right on the edge of the canvas. I realize that I have not gone over this specification in the usage manual, but template "stamping" code actually only checks the size of the canvas for existing tiles. If you are getting what looks like large portions of the template connecting to other stuff including rooms, this may very well be the problem. I usually make template canvas bigger than necessary so as to get a rim of "Empty" tiles around the template. The "origin" entrance can be placed on the edge with no issue because it will be directly added next to the corridor tile from which the template has spawned. Anything else added to the edge of a template can potentially connect to the rest of your layout.

    For your current use case, instead of editing the template you could also check the main room tiles for incompatible neighbors like other rooms or corridors. That way the edge tiles will check their immediate neighbors for any type not in the compatible list. However this is more CPU intensive and might increase generation times compared to just leaving a rim of empty tiles around your template. Also, you should not need to use any compatible type detection for entrance tiles unless you add multiple entrances to a single room template. This would make sure the extra entrances can only connect to corridors or other compatible types.

    Something else to note since you are using custom tile types is that in order for corridor avoidance to work with those new types you need to add them to the corridor avoidance lists. If your issue is randomly connecting corridors this may be the cause of your problem. Look for line 50 in the MapGeneratorV2.cs script, there are four arrays containing tile types which growing corridors will actively avoid when growing, depending on which style of dungeon is being generated and whether or not the self avoidance feature preventing corridors from connecting to existing corridors when stepping forward in their growth process is toggled on.


    Honestly this is all stuff I should add to the usage manual, and the tile type management process will likely see an update in the near future to work using a GUI to negate this process. I haven't done it yet because it's actually quite rare that people start using custom tile types with the asset. So far you are one of about 4-5 users who asked me questions about that particular topic since the release of the asset so I'm sorry for the sparse documentation.
     
  19. yarsrvenge

    yarsrvenge

    Joined:
    Jun 25, 2019
    Posts:
    87
    Excellent. Glad I wasn't losing my mind. :)
     
  20. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Here is another model I talked about a while ago that I didn't find time to add to the asset until recently. It is a simple crawl tunnel that can be used to link corridors together. Right now the piece is directly connecting to another wall but my plan is to make it possible for those tunnels to act as their own type of corridors by adding different pieces that can connect together and form more complex paths.

     
    StevenPicard likes this.
  21. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    429
    Hello do you have any plans to add high level dungeon flow editor, which allows to pre design layout of dungeon with key lock system, multi branching and cycling and any other custom rooms?
     
  22. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Hi, this is something I had planned on adding a while ago but never got around to doing it. This is a very complex feature to add considering the random nature of the dungeons and it would require me to rework the core dungeon generation code to take into consideration the "flow" parameters so it may take a while and it may not work exactly like other dungeon generators that are based around this core flow design. This kind of feature is much easier to implement in a graph based generator where nodes are being randomly linked to generate levels, this asset instead relies on a process of "growing" levels on empty graphs so ensuring a bunch of cycles may be difficult.

    To be sure you can accomplish a certain degree of flow control using the existing features of the asset, albeit not without some coding involved. For instance, certain rooms can be forced to only generate on certain types of corridors, and certain corridors can be set to only spawn from certain rooms. This logic can be used to create distinct areas in your dungeon, so the key lock puzzles can be built around those where the key to go to the next area is somewhere within the current area. Corridor / room types can also be prevented from connecting to other types to ensure the player cannot get to the second area without the key.

    In short I may very well add the feature in a future version but it might take a while due to the level of complexity.
     
    TextusGames likes this.
  23. TextusGames

    TextusGames

    Joined:
    Dec 8, 2016
    Posts:
    429
    Thank you. I wish you luck in successful implementation of flow system.
     
    r3eckon likes this.
  24. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    After a while of being away from the Multiplayer scripts I recently managed to add "Live Entity" synchronization to the asset! Here is a quick demo showing how the skeletons are now synced for all players on the multiplayer demo scene.


    Live Entity information is being sent to clients at a 30 tick per second rate, just like the information about other players, and is best suited for constantly moving game objects like mobs, perhaps physical objects as well. The Live Entity custom packet type currently contains Position, Rotation and Animation State to ensure the skeletons are correctly synced for all players. Despite using absolutely no interpolation between received packets, the resulting movements are surprisingly smooth!

    As you can see in the video right now skeletons still only follow the Host player around so next I'll need to work in multiplayer awareness for the mob controller script which should be quite simple given how the host already receives position information about other players.
     
    Last edited: Dec 14, 2019
    StevenPicard likes this.
  25. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Just quickly dropping by to wish everyone a Merry Christmas! It's been a while since I gave away any vouchers so here is an activation code for the asset :) For everyone else more update posts related to new feature of the multiplayer addon will come soon after the holiday season.

    ASV-T4WC-PAH4-NUEG-TCKJ-AFUM
     
  26. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    I recently updated a few more things about the multiplayer addon in order to smooth out the entity sync. The main issue I encountered with my previous way of sending live entity updates seemed to stem from the fact that each entity was sent as a lone packet which drastically increases the amount of network overhead required. To deal with the issue, I initially tried to reduce the amount of updates to 20 per second, which is not as smooth but gives the network interface some breathing room. As expected however that was not enough and the live entities eventually start lagging until they freeze in place for long periods of time, which seems to happen when the network interface is receiving more packets than it can process. This lagging would happen rather quickly, within about 30 seconds of the game starting.

    To entirely fix this issue I made use of a feature already inside the existing version of the addon called "Varpacks" which allow for multiple variables to be packed into a single outgoing packet then interpreted on the client as an array of single packets. For next version of the asset/addon I have introduced the ability to add custom packets that implement the IPacketable interface to be packed into varpacks. This allows every live entity in the game world to be sent out as a single outgoing packet, which the client receives and then "decompiles" to fetch individual packets.

    This immediately seems to have fixed the issue and after letting the game run for a while to test it out there was no issues or any apparent lag in live entity sync. Another feature added to the multiplayer demo scene : the ability to both cancel the generation, return to the main menu or return to lobby. The offline generation UI also allows for cancelling the generation process. In multiplayer mode, when the host performs a cancel or return to menu/lobby, players receive an appropriate command which also kicks them out of the game and into the lobby or menu.

    Finally, the server side AI controllers can now see and go after clients. You can see this as well as the new cancel feature demonstrated in this new video. Keep in mind that although the skeleton may seem a bit more laggy than before especially on the client, this is partially due to the fact that I'm recording and the important part is the way the latest information isn't late compared to the server side information which means interpolation can be used to smooth things out.

     
    StevenPicard likes this.
  27. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    78
    This may be a long shot random thing, but is there a way to make the mini map, while explorable, have the silhouette visible for areas not visited yet? I'm trying to just make a second map object at the moment that sits below the other map in the UI and its a dimmer version, not explorable. I thought if it wasn't explorable, it would just show the entire map and the map "on top" being explorable would lighten the areas as the player moves throughout the dungeon.

    But the dim map below still works like its explorable and matches the top map making it useless. I'm not sure what to do but any insight for a work around or a simple script using the built in PDT functions would be super helpful!
     
  28. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Hello, here are the tweaks you need to perform in order to get this working using a single map object.
    In DrawMap.cs, first create a new public color variable like so :


    This will add a new editor accessible color picker used to set the color that will be used for all non empty unexplored tiles when in exploration mode ( Make sure to check alpha slider when picking color since it's at 0 by default ).


    Then you need to edit the shown lines of code in order to match the screenshot. Essentially you are adding a check to avoid empty tiles and replacing the default transparent unexplored color with the color variable created earlier.



    You can now edit the unexplored color with the editor and save the scene before launching the game to see if everything works :


    I hope this helps!
     
  29. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    78
    holy moses you are a lifesaver! This is awesome. Thank you for this! I’m going to implement it tonight. Happy new year! Cheers!!
     
    r3eckon likes this.
  30. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    78
    Oh man I implemented your changes and it works flawlessly! Thank you for such great support. Now, this may be another weird scenario, but I wonder if you've seen this before.

    When loading into the dungeon, often times enemies are spawned right on top of the player. The player always spawns in at 0,0,0 (for the sake of having an object I know will be in a corridor at generation. My enemies and the way they load are set to only spawn with the patter of 'Room' or 'Room2' in the center tile, and NOREQUIREMENTS on all surrounding. But enemies will sometimes just be in the same spot as the player upon loading the scene and it makes for a jarring entrance to say the least haha.

    I don't know if I'm missing something in the pattern settings, the way its generated etc.

    If you've got any insight here as well, it would be greatly appreciated!

    Cheers!
     
  31. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    This sounds like it might be a bug, can you send me a screenshot of the object requirements so I can test them out on my side? I'm assuming this is using the multi pattern feature, which is relatively new and might still contain bugs I haven't found yet. One thing you can try is to use a single pattern with the ANYROOM tile type in the center, this is what I've been using for AIs.

    If you wish to only spawn enemies in Room and Room2 types and the ANYROOM type includes other rooms you don't want this particular enemy to spawn in you can also create your own override tile types. In the file TileType.cs you simply add a new type ( I added ROOM_OR_ROOM2 ) in the enum at the top and then add this condition in the TileUtilities class function that checks override tile types :

    Code (CSharp):
    1. else if (requirement == ROOM_OR_ROOM2 ) requirementsMet = (tile == TileType.Room || tile == TileType.Room2);

    Remember to add a comma after the previous value in the enum otherwise the compiler will throw an error. Essentially what you are doing is creating a new arbitrary tile type value and making sure that the IsTileTypeMatching function can handle this new value by only returning TRUE ( in this case a valid pattern match ) if the tile type being checked matches what you set as the condition.
     
  32. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    78
    Excellent! I'll try this out, again thanks for the prompt feedback.

    Here's another small question: How would I go about spawning just one of an enemy, either randomly like the others, or at a specific tile type? I have one enemy I spawn at the ending tile, and it works sometimes, but it will occasionally do that same "I'm at the player spawn point" issue. Still, it is just one of them, but I'm curious how I could make sure they spawn randomly but only one.
     
  33. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    This is odd, if the enemy spawning bugs even on a single pattern custom object then this might actually be a bug related to the spawning code. If you are using a single unique type to spawn the enemy then it should definitely only appear once and there. Are you using my SpawnableMob.cs script or the new MobController.cs scripts to spawn them? While I have added a feature used to restrict the amount of mobs in a scene this is mostly for performance purposes. Using a unique type for unique mobs should work so it sounds like maybe the mob doesn't find a spawn and automatically defaults to spawning on the origin, assuming that your dungeon is centered on the 0,0,0 of the world.
     
  34. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Here is a quick demonstration of linear interpolation being used to smooth out the movement of network live entities! This is something I have talked about in a few other posts as a possible solution for the stuttering caused by a lower tickrate and it appears to work great.

    For this demonstration video, the tick rate has been set to a very low 2 Hz which means only 2 updates are being sent per second. In the first part of the video you can see how this extremely low tickrate causes massive jumps in the position of skeletons and the player capsule. I then turn on interpolation only for the skeletons so that you can see how smooth the movement becomes compared to the non interpolated capsule.


    Obviously such a low tickrate is not a real world scenario, it's only used here for demonstration. At a more realistic 20 Hz the smoothing effect is way less noticeable, but still visible enough to be warranted. Also, only position is being interpolated in this demo. You can see this in the second part of the video when skeletons are running towards the camera. As the player moves from left to right the skeleton smoothly translates towards the player however it's orientation still updates at a low rate which causes visible jumps in rotation.
     
  35. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Yesterday I managed to add to the multiplayer features once again, this time for non procedural / existing scene entities! While the LiveEntity script and it's utilities are used for entities being generated as the game is running, this new SceneEntity class and it's utilities focus on game objects that are already within your scenes and is essentially a replacement for what unet called the NetworkTransform. The main advantage of this component compared to using NetVars to send data is that this component is designed for easy setup with no coding involved : just drag and drop the script and assign a Unique ID to the entity! The script also allows for interpolation to be turned on for clients just like Live Entities.


    In order to further reduce the amount of packet overhead going through the network to send entity updates, a new WorldState class implementing IPacketable has been created. This class simply acts as a holder for the two entity lists ( Live and Scene ) with the implemented methods used to send and receive information. This new class basically acts like a custom purpose "VarPack" that allows variably sized entity lists to be packeted and sent to clients.

    Finally, to work with bigger sized packets like the WorldStates I've tweaked the custom exception classes used by the multiplayer addon so that when a packet being built contains too much data, a PacketSizeOverflow exception is thrown with a message including a size comparison between the requested Packet size and the maximum PacketManager buffer size in order to know exactly how much more buffer space is needed.


     
  36. choltonCCS

    choltonCCS

    Joined:
    Feb 24, 2020
    Posts:
    1
    I updated to 1.31 from 1.27 Beta because the game was crashing on loading the scene on windows only, not sure why. But now the dungeons don't generate at all and no settings I save are being saved. I can't turn off Planar Node Settings and I cannot enable No Template Mode.
     
  37. chaseholton

    chaseholton

    Joined:
    Dec 17, 2012
    Posts:
    78
    Whoops, I posted this on a different account. But yeah, no matter what I change I cannot generate a dungeon at runtime with 1.31. I haven’t done anything to my project specifically make that impossible but it’s completely broken.

    EDIT: I am happy! r3eckon's support has been nothing short of amazing. I spent my time digging myself into a hole by not keeping up to date with my plugins. This has been a game saving plugin for Random generation.
     
    Last edited: Feb 26, 2020
    r3eckon likes this.
  38. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    I've replied to the dm you sent me about this. Anyone experiencing editor crashes should update to the latest version of the asset as there are conflicts with earlier versions and the new .NET runtime used in new versions of Unity.
     
    chaseholton likes this.
  39. NightcoreLV

    NightcoreLV

    Joined:
    Feb 26, 2014
    Posts:
    34
    This asset seems didnt update awhile is there any plans to fix warnings or adding new features?
     
  40. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Sorry about this, I've been quite busy with other assets and overall lately haven't had much daily free time to work on assets so I don't know when I'll be able to release a new version for the dungeon generator. If you experience asset breaking errors just let me know and I'll release a hotfix as soon as possible but as far as it goes for new features I have not had much time to think about new things to add so I can't give an ETA on that. If you have ideas for new features as always you are welcome to post them in this thread!
     
    StevenPicard and NightcoreLV like this.
  41. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Merry Christmas to all, here's this year's gift voucher : ASV-CYE9-HQDA-A6KX-P6F4-AYDF
     
    StevenPicard likes this.
  42. magique

    magique

    Joined:
    May 2, 2014
    Posts:
    4,030
    Awesome. Thank you very much!
     
    r3eckon likes this.
  43. KC43_Unity

    KC43_Unity

    Joined:
    Feb 11, 2020
    Posts:
    1
    Yo! I really love this asset. Any word on a 2020 LTS version?
     
    r3eckon likes this.
  44. r3eckon

    r3eckon

    Joined:
    Jul 3, 2015
    Posts:
    506
    Releasing on an updated LTS version is definitely on my to do list however I've been mostly working on an electronics project since last January and that has to take priority since everything has to be set up and ready for spring, so I don't know when it will happen. Most likely next summer once maple syrup season is finished I will be able to focus back on updating assets.
     
  45. aggaton

    aggaton

    Joined:
    Jul 3, 2021
    Posts:
    113
    Hi @r3eckon,

    I recently bought this asset. And I was at first really exited since it appeared to be doing what I was looking for (having bought a multitude of other procedural generation tools, that all somehow seem to come short). I am trying to explore it using the MultiplayerDemoScene and at first am attempting to just replace ceiling, floor and wall with prefabs I bought in another package (ogasoda's sci-fi environment modules). I am however finding it hard to do following the documentation. First of all the doc seems to be outdated compared to the version I downloaded (1.31), many things appears to be different, second I am not sure if the kit is broken or not in the version of unity I am running (2021.2.18f)

    upload_2022-4-4_15-17-42.png

    For instance, this is the visual editor, when I click the arrows to move the piece, the whole thing moves, not just the ceiling tile relative to the box tile, which I thought was how it was supposed to be doing according to the doc. Additionally the prefabs in the asset I am using does not have straight walls like your example (most assets don't have straight walls and needs to be rotated depending on what side they are on and they need special corner pieces too, maybe you could elaborate a bit on how to use the kit with a regular asset kit or if you already have a tutorial I would love to have a link.
    There seem to be confusion regarding versions, the one I can download through the asset store is 1.31, but many of the videos I see above refer to a version 1.7 or something like that.
     
    Last edited: Apr 4, 2022
  46. aggaton

    aggaton

    Joined:
    Jul 3, 2021
    Posts:
    113
    @r3eckon One other weird thing is, when I try to replace a floor tile with another prefab it is not visible at all. Pretty much any prefab I replace won't show. Is there some weird occlusion going on (I tried changing the layer to Floor as I noticed the original prefab had, no difference)?

    upload_2022-4-5_12-57-13.png
     
  47. aggaton

    aggaton

    Joined:
    Jul 3, 2021
    Posts:
    113
    @r3eckon I think I have figured out why, it seems like the mesh of the prefab is not being instantiated correctly somehow
    i.e. this
    upload_2022-4-5_14-12-51.png

    should be something like this
    upload_2022-4-5_14-13-37.png

    Is this a bug? Or is there some setting in the config I need to specify to have the prefab being instantitiated correctly? If I manually go in and insert the mesh into the generated node clones, they all show up corerectly.
     
  48. aggaton

    aggaton

    Joined:
    Jul 3, 2021
    Posts:
    113
    @r3eckon Seem to be due to the prefab I used had been marked as static. Though Isn't this something you want in there for some prefabs for occlusion of object not visible?
     
  49. aggaton

    aggaton

    Joined:
    Jul 3, 2021
    Posts:
    113
    @r3eckon Maybe you could also include the naming convention for items in the doc. When I removed one of the 2 CFloor lines, I got dark holes in the floor, so apparently they need to be there, however it is not very obvious in the editor, since it is a text field you type in, how am I supposed to know what name is correct or mandatory? Also there is only an edit button for the first element.