From 12c696bc5b6e960a1d9228a5b68e5aafcc02e23c Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 9 Feb 2024 11:24:39 -0500 Subject: LL2 support --- racing/router.gd | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 racing/router.gd (limited to 'racing/router.gd') diff --git a/racing/router.gd b/racing/router.gd new file mode 100644 index 0000000..15b3f31 --- /dev/null +++ b/racing/router.gd @@ -0,0 +1,149 @@ +extends Node + +const LL1_AREAS = [ + ["Starting Room", 0, 0, 0], + ["Second Room", 0, 0, -15], + ["The Traveled", 34, 0, -18], + ["The Agreeable", 30, 0, -45], + ["The Colorful", 10, 0, -83], + ["Suits Area", 0, 0, -78, true], + ["Arrow Garden", -93, 1, -93], + ["The Wondrous (Table)", -108, 1, -78], + ["Courtyard", -64, 0, -71], + ["Yellow Backside Nine", -38, 0, -58], + ["Hot Crusts Area", -20, 0, -81], + ["Crossroads Corner", -28, 0, -54], + ["The Discerning", -54, 0, -34, true], + ["Green Backside", 22, 0, -94], + ["Observant Upstairs", 40, 9, -92, true], + ["Eight Room", 95, 15, -28], + ["The Perceptive", 60, 9, -57], + ["The Tenacious", 0, 0, -43], + ["Rainbow", -96, 0, -41], + ["The Undeterred", -87, 0, 25, true], + ["Directional Gallery", -57, 0, 0], + ["The Eyes They See", -54, 0, -23], + ["Tower First Floor", -27, 0, -23], + ["The Optimistic", 76, 0, -17], + ["The Initiated", 63, 0, -0, true], + ["Art Gallery", 92, 0, 15], + ["Art Gallery Top", 80, 30, 15], + ["Lookout", 75, 18, 51], + ["Knight Night Room", 37, 0, 7], + ["The Seeker", 9, 0, 16, true], + ["Hidden Room", 13, 0, 4], + ["Owl Hallway", 44, 0, -26], + ["Challenge Room", -9, 6, 13], + ["Pilgrim Room", -22, 0, 24, true], + ["Cellar Replica", -44, 0, 30], + ["Elements Area", -61, 0, 40], + ["The Artistic", -25, 0, 54, true], + ["Outside The Wise", -44, 0, 71], + ["The Wise", -72, 0, 72, true], + ["The Scientific", -18, 0, 89], + ["The Wanderer", 0, 0, 80], + ["The Fearless", 18, 10, 90], + ["Champion's Rest", 23, 0, 62, true], + ["The Steady", 31, 0, 77, true], + ["The Bold", 67, 0, 77, true], + ["Color Hunt", 45, 0, 69], + ["Room Room", 95, 6, 84], + ["The Bearer", 61, 0, 51], + ["Tower Third Floor", 18, 0, 33], + ["Rhyme Room (Cross)", 0, 9, 42], + ["Tower Seventh Floor", 0, 37, 64], +] + +const LL2_AREAS = [ + ["Orange Pyramid", 86, 10, -84, true], + ["The Stellar", 43, 6, -86], + ["The Fuzzy", 12, 1, -86, true], + ["The Devious", 0, 0, -88], + ["The Sharp", -26, 0, -88, true], + ["The Structured", -50, 0, -88], + ["Brown Pyramid", -86, 10, -85, true], + ["The Tasty", -86, 7, -62], + ["Black White Room", -88, 0, -32], + ["Lime Magenta Room", -96, 0, -24], + ["Red Blue Room", -87, 0, -23], + ["The Archaeologist", -74, 0, -32], + ["The Earnest", -87, 0, -56], + ["The Hidden", -50, 6, -71, true], + ["The Sapient", -36, 36, -41], + ["The Ethereal", -42, 0, -22], + ["The Learned", 34, 1, -64, true], + ["Whispers Behind Quiet Walls", 44, 0, -51, true], + ["The Lunar", 45, 0, -22], + ["The Arcadian", 86, 0, -53], + ["The Frozen", 84, 0, -27], + ["The Unscrambled", -50, 0, -10], + ["Nightmare", 73, 0, -27, true], + ["The Amazing", -13, 0, -42], + ["Challenge Room", -94, 0, 2], + ["The Fresh", -82, 0, -10], + ["The Exemplary", -82, 0, 11], + ["The Roaming", -66, 0, -11], + ["The Veteran", -66, 0, 12], + ["The Royal", -50, 0, 10], + ["The Exact", -33, 0, -12], + ["The Appreciated", -33, 0, 11], + ["The Unsullied", -17, 0, -11], + ["The Unopposed", -18, 0, 10], + ["The Multitalented", -10, 0, 0], + ["Starting Room", 0, 0, 0], + ["Control Room", 0, 0, 14], + ["Countdown Room", 0, 0, 33, true], + ["The Lucky", 13, 1, 32, true], + ["Greenhouse", 14, 0, 6], + ["The Sweet", 24, 0, 18, true], + ["The Fall", 87, 0, -4, true], + ["White Pyramid", 46, 0, -1], + ["Z", 95, 0, 25, true], + ["The Worldly", 92, 0, 58], + ["The Perennial", 39, 0, 32], + ["The Analytical", -28, 0, 35], + ["Car Room", -59, 0, 50, true], + ["The Mythical", -35, 4, 73], + ["LL1 Starting Room", -70, 0, 41], + ["LL1 Second Room", -86, 0, 41], + ["The Seen", -83, 0, 57, true], + ["Purple Pyramid", -87, 10, 85, true], + ["Four Pips", -66, 0, 76], + ["Twinkle Twinkle Little Star", 6, 0, 55, true], + ["The Unforgettable", 9, 40, 88], + ["HI Room", 27, 0, 59], + ["The Handy", 39, 10, 83], + ["Mint Pyramid", 86, 10, 83, true], +] + + +func choose_route(): + var rng = RandomNumberGenerator.new() + rng.randomize() + + var areas_slot + var level_name + if rng.randi_range(0, 2) == 0: + areas_slot = LL1_AREAS + level_name = "level1" + else: + areas_slot = LL2_AREAS + level_name = "level2" + + var start_pos + var end_pos + var found = false + while !found: + var areas_dupe = areas_slot.duplicate() + var i = rng.randi_range(0, areas_dupe.size() - 1) + start_pos = areas_dupe[i] + areas_dupe.remove(i) + i = rng.randi_range(0, areas_dupe.size() - 1) + end_pos = areas_dupe[i] + + var start_vec = Vector3(start_pos[1], start_pos[2], start_pos[3]) + var end_vec = Vector3(end_pos[1], end_pos[2], end_pos[3]) + if start_vec.distance_to(end_vec) > 50 and not (start_pos.size() >= 5 and start_pos[4]): + found = true + + return [level_name, start_pos, end_pos] -- cgit 1.4.1