Okay, I've made tons of changes to the way things work, and the speed of the system overall.
The first bar is much faster, the second bar doesn't exist anymore,
and it only takes about 10 seconds for the gravity to settle.
The only problem, is that the latest change to the direction that things fall,
and the way pressure is applied, is giving me some really strange results.
I'm ending up with radio-active patterns inside of the planet, with all kinds of strange quirks.
I'm not sure why either.
Here is the code that determines the relationship between the current tile and the test tile:
//get distances from cores
if(currentx<centerx){distx = centerx - currentx;}
if(currentx>centerx){distx = currentx - centerx;}
if(currentx==centerx){distx = 0;}
if(currenty<centery){disty = centery - currenty;}
if(currenty>centery){disty = currenty - centery;}
if(currenty==centery){distx = 0;}
if(currentz<centerz){distz = centerz - currentz;}
if(currentz>centerz){distz = currentz - centerz;}
if(currentz==centerz){distz = 0;}
//determine which core is most distant
if(distx>disty&&distx>distz){//if x is distant
if(currentx<centerx){testx = currentx + 1;}
if(currentx>centerx){testx = currentx - 1;}
}
if(disty>distx&&disty>distz){//if y is distant
if(currenty<centery){testy = currenty + 1;}
if(currenty>centery){testy = currenty - 1;}
}
if(distz>distx&&distz>disty){//if z is distant
if(currentz<centerz){testz = currentz + 1;}
if(currentz>centerz){testz = currentz - 1;}
}
if(distx==disty&&distx>distz){//if x=y and both are distant
if(currentx<centerx){testx = currentx + 1;}
if(currentx>centerx){testx = currentx - 1;}
if(currenty<centery){testy = currenty + 1;}
if(currenty>centery){testy = currenty - 1;}
}
if(distx==disty&&distz>distx){//if x=y and z is distant
if(currentz<centerz){testz = currentz + 1;}
if(currentz>centerz){testz = currentz - 1;}
}
if(distx==distz&&distx>distz){//if x=z and both are distant
if(currentx<centerx){testx = currentx + 1;}
if(currentx>centerx){testx = currentx - 1;}
if(currentz<centerz){testz = currentz + 1;}
if(currentz>centerz){testz = currentz - 1;}
}
if(distx==distz&&distz>distx){//if x=z and y is distant
if(currenty<centery){testy = currenty + 1;}
if(currenty>centery){testy = currenty - 1;}
}
if(disty==distz&&disty>distx){//if y=z and both are distant
if(currenty<centery){testy = currenty + 1;}
if(currenty>centery){testy = currenty - 1;}
if(currentz<centerz){testz = currentz + 1;}
if(currentz>centerz){testz = currentz - 1;}
}
if(disty==distz&&distx>disty){//if y=z and x is distant
if(currentx<centerx){testx = currentx + 1;}
if(currentx>centerx){testx = currentx - 1;}
}
if(distx==disty&&disty==distz){//if all are equal distant
if(currentx<centerx){testx = currentx + 1;}
if(currentx>centerx){testx = currentx - 1;}
if(currenty<centery){testy = currenty + 1;}
if(currenty>centery){testy = currenty - 1;}
if(currentz<centerz){testz = currentz + 1;}
if(currentz>centerz){testz = currentz - 1;}
Basically, it determines the distance of the current tile from each of the axis/cores.
Then it makes the test tile one tile closer towards the farthest axis/core.
The test tile is supposed to represent the tile "below" or one tile closer towards the center.
I'm not sure why, but this is the result:
I'm going back to the drawing board with this one.
Something is about moving the tiles towards the farthest core is causing this.
Please also note that bits of land aren't even falling down, or are perhaps resting on land in other layers.
I'm going to think long and hard on this one and hope I figure out why that block of code isn't getting the job done.