Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(+1)

why sometimes l cant use customize(manual mode) add door

Hey! Can you please provide some details? What exactly are you trying to achieve and what is preventing you from doing so?

i found out the problem, must choose rect tool to add door.


Now I have a new problem. When I'm building the dungeon, there will be a timeout. It's useless for me to modify the generation config about timeout.

There's always have this InvalidOperationException: Timeout was reached when generating level

If the timeout is reached everytime , that means that there's something wrong with your level description.

The most common issues are:
- You should provide both vertical and horizontal corridors. If you provide only one of them , the generator is often unable to produce a level. For example, you usually can't draw a cycle using only vertical corridors.
- Check that you always use the same length of doors.  It seems like you're using manual doors so make sure that you stick to the same door lenght in all your room templates. For example, if you sometimes use lenght 1 and sometimes lenght 2, the generator may be unable to produce a level.
- Check that your level graph is not too complicated. You usually don't want to have too many cycles in the graph.

If you don't find the problem yourself, please do the following: There is an "Advanced" section in the Dungeon Generator component and there should be an "Export map description" button. Click the button and it should create a file called "exportedMapDescription.json" in the root folder of your project. Please send me this file - it contains information about the shapes of your rooms. You can send me that file at ondra@nepozitek.cz and I'll look into that.

Thanks for your help.

When I generated the level, my character and camera lost each other's transform, and my enemies couldn't read the player's tag. There were a lot of MissingReferenceException. When should I get monsters to get players, and cameras and players to get each other.

I'm sorry I have so many questions.

When a level is generated, all the room templates that are used in the level are instantiated and moved to the correct positions. If there were some missing references, it may be because you generated a level, then referenced something in the level, then generated the level again and all the references got lost. However, I'm not sure why should you lose a reference to your camera. If you don't create the camera at runtime, the reference should always be the same. Moreover, keep in mind that it takes some time to generate a level. That means that if you run some code in on of the Start()/Awake() methods, some game objects may not exist yet. For example, if your player game object is part of a room template, it'll be present in the scene only after a level is generated so if you try to find it by its tag before that, you won't find anything.  The correct approach to that is to have the game object always present in the scene or make sure that you use it only after a level is generated (for example in a custom post-processing task as described in the docs).