Goo tubes played the same as manual tubes. Drop TubeGoo, the purple tile alternatives and the tube_goo custom data layer; the maze generator now picks auto or manual for two-way tubes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
48 lines
2.6 KiB
GDScript
48 lines
2.6 KiB
GDScript
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):
|
|
# regionsPerScreen: how the maze regions split each screen (columns, rows).
|
|
# Regions are joined only by tubes.
|
|
# corridorWidth: corridor width in tiles (walls are 1 tile). 1 is the
|
|
# narrowest the slime gets through (checked in the game).
|
|
# braid: the share of dead ends opened into loops (0 = a perfect maze).
|
|
# hallsPerRegion: open rooms carved over the corridors.
|
|
# oneWayOnRoute: how many tubes between regions on the Start-End route are one-way.
|
|
# extraTubesPerScreen: tubes between regions on top of the spanning tree.
|
|
# openTubesPerScreen: long rides through open air and rock, within or
|
|
# between neighbouring regions.
|
|
# wallPipesPerScreen: short tubes through a wall inside a region (shortcuts).
|
|
# steeredShare: the share of two-way tubes that are manual, not auto.
|
|
# winding: how much tubes wander (0 = shortest path).
|
|
const LEVELS: Array[Dictionary] = [
|
|
{regionsPerScreen = Vector2i(2, 1), corridorWidth = 3, braid = 0.5, hallsPerRegion = 0, oneWayOnRoute = 0,
|
|
extraTubesPerScreen = 0.5, openTubesPerScreen = 1.5, wallPipesPerScreen = 0.0, steeredShare = 0.3, winding = 2.0},
|
|
{regionsPerScreen = Vector2i(2, 1), corridorWidth = 2, braid = 0.3, hallsPerRegion = 1, oneWayOnRoute = 1,
|
|
extraTubesPerScreen = 1.0, openTubesPerScreen = 2.0, wallPipesPerScreen = 1.0, steeredShare = 0.35, winding = 3.0},
|
|
{regionsPerScreen = Vector2i(2, 1), corridorWidth = 2, braid = 0.15, hallsPerRegion = 1, oneWayOnRoute = 2,
|
|
extraTubesPerScreen = 1.5, openTubesPerScreen = 3.0, wallPipesPerScreen = 2.0, steeredShare = 0.4, winding = 4.0},
|
|
{regionsPerScreen = Vector2i(1, 1), corridorWidth = 1, braid = 0.05, hallsPerRegion = 2, oneWayOnRoute = 3,
|
|
extraTubesPerScreen = 1.5, openTubesPerScreen = 3.5, wallPipesPerScreen = 3.0, steeredShare = 0.4, winding = 5.0},
|
|
{regionsPerScreen = Vector2i(1, 1), corridorWidth = 1, braid = 0.0, hallsPerRegion = 3, oneWayOnRoute = 4,
|
|
extraTubesPerScreen = 2.0, openTubesPerScreen = 4.5, wallPipesPerScreen = 5.0, steeredShare = 0.45, winding = 6.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]
|