(RESOLVED) Issue w/ Plate Tectonics Tile Collision & Override

Godot Version

V4.5.1 (irrelevant)

Question

I have an issue with a plate tectonics simulation…

For my space exploration game, I have a function to realistically simulate plate movement, volcanic hotspots, and mountain ranges. Each tile on a 48x48 grid (variable size) has 3 values: elevation, mantle heat, and plate ID. Tiles with the same plate ID move in unison based on an average calculation derived from the mantle heat.

The issue comes when these plates collide. It’s supposed to override one of the plates when they overlap, as each tile can only be assigned one plate value. I originally did this by giving the newest plates priority, however this resulted in the entire map becoming just a few (2-5) tectonic plates, instead of the initial 20.

I tried fixing this by giving priority to plates that are thickest in that specific spot, but now it causes the plates to fragment uncontrollably. The attached image shows this.

What are some potential solutions to fix this? How should I assign priority?

(RESOLVED)

I simply randomized the priority for each cycle. Idk why I didn’t think of this earlier…