OndrejNepozitek / Edgar-Unity

Unity Procedural Level Generator
https://ondrejnepozitek.github.io/Edgar-Unity/docs/introduction
MIT License
817 stars 70 forks source link

Secret rooms #99

Closed pvalium closed 3 years ago

pvalium commented 3 years ago

Hi. Is posible to hide/show certain rooms via code? I want to add secret rooms that are invisible (the door, is a wall), but player can enable/show them via a button.

pvalium commented 3 years ago

Well, so far I have achieved it using an extra tilemap, and some fixes in corridors, and runs ok.

OndrejNepozitek commented 3 years ago

Hey, that's great that you managed to come up with something.

Somebody has asked me a similar quite before so I've already thought about it a little. Basically, the goal would be to combine this with the Fog of War feature. You'd mark a room as hidden and that would instruct the generator to hide it via the FoW and also to not remove the walls from neighbouring rooms. Then if you triggered some action to reveal the room, the generator would first remove the blocking walls and then reveal the room.

I also thought about adding custom door blockers for example if you wanted to have a special game object present at the secret room entrance, etc. So instead of just not removing the tiles from the connection to the neighbouring room, the generator would instead spawn the predefined blocker tiles/objects.

Are you happy with your current solution or is there anything I can help you with?

pvalium commented 3 years ago

Yes, my solution its ok for me. Thank you anyway!

El vie., 25 jun. 2021 8:36, Ondřej Nepožitek @.***> escribió:

Hey, that's great that you managed to come up with something.

Somebody has asked me a similar quite before so I've already thought about it a little. Basically, the goal would be to combine this with the Fog of War feature. You'd mark a room as hidden and that would instruct the generator to hide it via the FoW and also to not remove the walls from neighbouring rooms. Then if you triggered some action to reveal the room, the generator would first remove the blocking walls and then reveal the room.

I also thought about adding custom door blockers for example if you wanted to have a special game object present at the secret room entrance, etc. So instead of just not removing the tiles from the connection to the neighbouring room, the generator would instead spawn the predefined blocker tiles/objects.

Are you happy with your current solution or is there anything I can help you with?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/OndrejNepozitek/Edgar-Unity/issues/99#issuecomment-868261767, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE25VMW4O2C42FSRH376VPLTUQPYHANCNFSM47H2TG2A .