Remember Daedalus? Its a random dungeon generator that was made free a while back ago. I’m using it now, and its running perfectly, but I need to modify the script a bit to suit my needs.
Out of the box, you can make the dungeons spawn an entrance and exit prefab to mark where the dungeon’s entrance and exits are. I’m trying to modify it to spawn more markers, one for a shop. So far, all of my attempts have ended in catastrophic failure, causing unity to bug out in ways I’ve never seen before!
I understand that Daedalus is relatively old, so no hard feelings if no one’s willing to help.
Never heard of it outside of Greek mythology. If it’s code though, it can be reasoned about, but you have to at least identify what parts of the code are responsible for what before you can meaningfully change it. Once you identify that, I’m sure you can get support here for any issues you have.
NOTE: modifying an existing codebase is an EXCELLENT way to gain engineering insight and get better at this stuff, but definitely start with something you can actually do. In this case, what about trying these steps: every time a dungeon entrance or exit is generated, inject your marker “just inside” the dungeon.
At least with that you will have had some success, and then you could broaden out by:
learning how to find better places to put those markers
or
remove the associated exit marker, leaving your new shop marker.
So I followed your advice and decided to handle this in a way that’s on my skill level.
By that, I mean I went into each individual tile type and placed a spawner in it. Then I made an array in the spawner script to spawn a few things.
Now, on level generation, my tiles will spit out an enemy, a weapon, or nothing at all. I’ll do the same thing to spawn a shop, too. I’ll likely be changing this later, but for now, this is perfection when it comes to prototyping.
I will be studying the code to get a better insight on coding. Especially since I didn’t even know you can link variables in the way that the people who made Daedalus did so that togglable variables can appear in completely different scripts, and such.
Anyway, thanks again for the advice. Its a shame the Daedalus script is so obscure, now; its is a fantastic free option for random dungeons.
nice, I like that you’re finding good progress. as Kurt-Dekker says, that’s the best way to learn how to approach things in code. I agree with your closing remark, I didn’t know about it either (mostly because I’m at a point at which I yearn for more, so I pretentiously look for more daring things only to be baffled by them), but it could help many beginners or even small projects lift off the ground.
if you have questions regarding the code or some practices, well I haven’t seen it, but feel free to ask anyway, we should be able to figure out something or explain things if necessary.