Hello! looks very nice.
Before I purchase:
— Is it easy to implement a lock/door and key system?
— Can it generate in editor (without pressing play button)
Cheers!
Viewing post in Edgar PRO - Unity Procedural Level Generator comments
Hey!
Generation in editor:
Yes, it's possible. The generator component has a button which you can click in editor to generate a level.
Locks and keys:
It depends on what you want to achieve. There is no explicit support for locks and keys, but the generator should give you access to everything you need to implement that. Doors are implemented in examples scenes Example 1 (you press a button to open a door) and Enter the Gungeon (doors are closed when you enter a room so you have to fight with enemies, and also one way doors that have to be opened from a specific side). Now it depends if your locks and keys should be static (lock positions are fixed for each level graph, different level graphs can have different lock positions) or dynamic/procedural (you want to randomize lock positions in individual level graphs). I'll assume static locks but the other approach should also be possible. For static locks, you can create a custom class to represent connections between individual rooms in a level graph. In that class, you can add an isLocked field to describe if the connection should be locked or not. If you plan to have different keys opening different locks, you can also add a key field that specifies which key opens the lock. After you generate a level, you can access this information and setup your locked doors game objects (for example in a custom post-processing task).
Let me know if you have any other questions!
Hello and thanks for your support!
And yes, it’s possible to have unique rooms. There are basically two possible approaches:
- You can have a room template that you only assign to a single room in the level graph. By doing so, you can be sure that it’ll be used at most once in the level.
- Or you can use the “Repeat mode” option that is available on each room template. (https://ondrejnepozitek.github.io/Edgar-Unity/docs/basics/room-templates#repeat-mode) You can choose that the room template must not be used multiple times in a level. Just be sure that you don’t overuse this feature because the generator might have problems generating very constrained levels.