TestingCaves

Testing Individual Rooms

Just open any individual Cave scene in res://src/ProceduralLevels/Levels/Caves/ and press F6 or "Play Scene" button.

Play scene button

This works because on Room.gd of the following code for testing any "Level" scene by running them standalone:

Run standalone code

if get_tree().current_scene == owner: is a good trick to be able to run special logic to enable these kinds of tests. And since this is in Room.gd it should also work for any LinearWorld levels as well.

This is just useful to walk around the scene, as you won't be able to navigate to other levels, nor there will be any enemies spawned.

Testing entire caves with Sandbox

Open the ProceduralWorldSandbox.tscn scene and press F5.

You can press F10 to toggle between the "Debug Camera" and the "Gameplay Camera". While in the "Debug Camera" you can:

  • pan around using the movement keys
  • zoom in/out with the mouse's scroll wheel

Testing Caves in game.

Finding Opening hours for a cave in the editor

  1. Find out what is the level that has the cave you want to test
  2. Find out what the "opening hours" for it are.
  3. Run the game normally, use the Debug Menu to warp to the desired level and set the time of the day to something inside the cave's opening hours
  4. Save the game so that you don't need to repeat this setup
  5. Enter the Cave

Here you can also use F10 to toggle between Gameplay and Debug Camera just as above.