Loads of crap
This commit is contained in:
parent
b5bf7619e6
commit
1dc768ad27
725 changed files with 15096 additions and 191 deletions
|
|
@ -2,8 +2,8 @@ class_name MapGenerationClass
|
|||
extends Node
|
||||
|
||||
# Map settings
|
||||
@export var map_width: int = 500
|
||||
@export var map_height: int = 500
|
||||
var map_width: int = Global.map_width
|
||||
var map_height: int = Global.map_height
|
||||
|
||||
# Path generation settings
|
||||
@export var num_horizontal_paths: int = 3
|
||||
|
|
@ -38,20 +38,27 @@ var path_segments: Array = [] # Store all path segments for better branching
|
|||
var path_id_counter: int = 0
|
||||
|
||||
func _ready():
|
||||
pass
|
||||
generate_map()
|
||||
generate_paths()
|
||||
generate_water_bodies()
|
||||
generate_final_map_data()
|
||||
#print_visual_map_to_console()
|
||||
|
||||
|
||||
#if export_image:
|
||||
# export_map_as_image()
|
||||
|
||||
func generate_final_map_data():
|
||||
var objects_before = Performance.get_monitor(Performance.OBJECT_COUNT)
|
||||
|
||||
for y in range(map_height):
|
||||
for x in range(map_width):
|
||||
MapData.setup_cell_data(y, x, map_data[y][x], is_path_at(x, y), is_water_at(x, y))
|
||||
MapPopulationClass.generate_cell(x, y, map_data[y][x], is_path_at(x, y), is_water_at(x, y))
|
||||
|
||||
# Check immediately after
|
||||
await get_tree().process_frame
|
||||
var objects_after = Performance.get_monitor(Performance.OBJECT_COUNT)
|
||||
Log.pr("Objects created in generate_final_map_data: ", objects_after - objects_before)
|
||||
|
||||
|
||||
func generate_map():
|
||||
# Initialize noise
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue