This works reasonably fast for 16x16 chunks

This commit is contained in:
2026-01-08 13:20:03 +11:00
parent 192fb28ea9
commit 7e393e88ac
2 changed files with 62 additions and 30 deletions

View File

@@ -4,9 +4,9 @@ extends Node
var _chunks: Array[Chunk] = []
#Create some test samples - these samples must ALWAYS be 9-elements long, 5th element is the result
var _samples: Array[PackedInt32Array] = [
[1,1,1, 1,1,1, 1,1,1],
]
#var _samples: Array[PackedInt32Array] = [
#[1,1,1, 1,1,1, 1,1,1],
#]
@onready
var wfc: Node = get_node("../Generator")
@@ -15,6 +15,8 @@ func _ready() -> void:
var ruleset: PackedInt32Array = read_sample_ruleset("sample1.png")
var samples: Array[PackedInt32Array] = parse_samples_from_ruleset(ruleset)
var c = wfc.generate_chunk_at(0,0,_chunks,samples)
#TODO: build a visual layout for the results
#TODO: handle the chunk-edges
#print(ruleset)
#print(samples)