class_name MazeSettings extends RefCounted # What the player picked for the next maze (the Maze setup panel sets these, # MazeLevel reads them), and what each complexity level means. See docs/MAZE.md. const MIN_WIDTH = 1 const MAX_WIDTH = 4 const MIN_HEIGHT = 1 const MAX_HEIGHT = 3 const MIN_COMPLEXITY = 1 const MAX_COMPLEXITY = 5 # Per complexity level (index 0 is level 1): # chambersPerScreen: how the chambers split each screen (columns, rows). # oneWayOnRoute: how many tubes on the Start-End route are one-way. # extraTubesPerScreen: tubes added on top of the spanning tree (loops and traps). # steeredShare: the share of two-way tubes that are manual or goo, not auto. # winding: how much tubes wander on their way (0 = shortest path). const LEVELS: Array[Dictionary] = [ {chambersPerScreen = Vector2i(2, 1), oneWayOnRoute = 0, extraTubesPerScreen = 0.0, steeredShare = 0.0, winding = 0.5}, {chambersPerScreen = Vector2i(2, 2), oneWayOnRoute = 1, extraTubesPerScreen = 0.5, steeredShare = 0.2, winding = 1.0}, {chambersPerScreen = Vector2i(2, 2), oneWayOnRoute = 2, extraTubesPerScreen = 1.0, steeredShare = 0.3, winding = 2.0}, {chambersPerScreen = Vector2i(3, 2), oneWayOnRoute = 3, extraTubesPerScreen = 1.5, steeredShare = 0.35, winding = 3.0}, {chambersPerScreen = Vector2i(3, 2), oneWayOnRoute = 4, extraTubesPerScreen = 2.0, steeredShare = 0.4, winding = 4.0}, ] static var width := 2 # In screens. static var height := 1 static var complexity := 2 static var mazeSeed := 0 # 0: pick a new random one when the maze is made. static func get_level(level: int) -> Dictionary: return LEVELS[clampi(level, MIN_COMPLEXITY, MAX_COMPLEXITY) - MIN_COMPLEXITY]