terrain is set to false by default or it will render a 3d map, I dont think pde can handle listing all the tabs, it is there just not visible.
Select the last tab you can find and then press ctrl + PgDn.
also this is why I said yes and no.
You can ignore any class that sound gui related, its just Grid_space and Grid. Although if you use my code it will have dependencies.
in the grid class there is the following code
void draw_2d(){
if(terrain3d&&toggle){
pushMatrix();
translate(W/2, H/2);
if(mousePressed){
//XX += pmouseX - mouseX;
//YY += pmouseY - mouseY;
}
rotateX(PI/3+radians(xrot+YY));
translate(-W/2, -W/2);
translate(w/2, h/2);
rotateZ(radians(zrot+XX));
translate(-w/2, -h/2);
translate(w/2, 0);
rotateY(radians(yrot));
translate(-w/2, 0);
translate(-hdistance-400, -distance-400,-vdistance);
keys();
}
if(toggle){
logic();
fill(255);
text("hello",100,100);
text(rows,100,120);
rowcount = 0;
colcount = 0;
if(terrain2d&&!plain){
float yoffr = flyingy;
float yoffg = 0;
float yoffb = 0;//small float offset for smooth changes in value
for (int yy = 0; yy < rows; yy++) {
float xoffr = flyingx;
float xoffg = 0;
float xoffb = 0;
for (int xx = 0; xx< cols; xx++) {
if(perlcolor){
//perlx[xx][yy] = map(noise(xoffr, yoffr), 0, 1, -255, 255);
perlx[xx][yy] = noise(xoffr, yoffr);
//perly[xx][yy] = map(noise(xoffg, yoffg), 0, 1, -255, 255);//output of map(last numbers) controlled for height of mountains.
//perlz[xx][yy] = map(noise(xoffb, yoffb), 0, 1, -255, 255);
//terrain[xx][yy] = map(noise(xoffr, yoffr), 0, 1, -255, 255);
}
terrain[xx][yy] = map(noise(xoffr, yoffr), 0, 1, -255, 255);
perlx[xx][yy] = noise(xoffr, yoffr);
if(perlheight){
//perlr[xx][yy] = map(noise(xoffr, yoffr), 0, 1, -255, 255);
perlx[xx][yy] = noise(xoffr, yoffr);
//perlg[xx][yy] = map(noise(xoffg, yoffg), 0, 1, 0, 255);//output of map(last numbers) controlled for height of mountains.
//perlb[xx][yy] = map(noise(xoffb, yoffb), 0, 1, 0, 255);
}
xoffr += 0.05 + zoom;
xoffg += 0.3;
xoffb += 0.5;//change offsets to control smoothness.
}
yoffr +=0.05 + zoom;
yoffg +=0.3;
yoffb +=0.5;
}}
for (int yy = 0; yy < rows-1; yy++) {
if(terrain3d)beginShape(TRIANGLE_STRIP);
for (int xx = 0; xx< cols; xx++) {
int pos = xx + yy * cols;
strokeWeight(0);
//Grid_space posre = squares.get(0 + i * rows);
//Grid_space posce = squares.get(j + 0 * rows);
Grid_space a = squares.get(pos);
//if(mousePressed){
// deltay = a.shape.y - mouseY;
// deltax = a.shape.x - mouseX;
//a.shape.x = mouseX - deltax;
//a.shape.y = mouseY - deltay;
//}
//if(!shape){
float num = perlx[xx][yy];
float R = terrain[xx][yy];
float floor2 = groundlevel2;
float mountain = mountainlevel;
float sea = sealevel;
float grass = grasslevel;
if(a.shape!=null){a.shape.draw();}
if((terrain2d||terrain3d)&&!plain){
fill(a.col);
if(R<sea){
a.col2 = color(0,0,255);
a.col = color(0,0,255,255-abs(R)*1.2);
C = color(0,0,255,255-abs(R)*1.2);
}
if(R>floor2){
a.col2 = color(255,255,0);
a.col = color(255,255,0,255-abs(R)*1.2);
C = color(255,255,0,255-abs(R)*1.2);
}
if(R>grass){
a.col2 = color(0,255,0);
a.col = color(0,255,0,255-abs(R)*1.2);
C = color(0,255,0,255-abs(R)*1.2);
}
if(R>mountain){
a.col2 = color(255,255,255);
a.col = color(255,255,255,255-abs(R)*1.2);
C = color(255,255,255,255-abs(R)*1.2);
}
//if(posre.col == temp_rows.get(i).col){
// rowcount ++;
//}
//if(posce.col == temp_cols.get(j).col){
// colcount ++;
//}
}fill(a.col);
if(rowcount == rows) rowrepeat = true;
else rowrepeat = false;
if(colcount == cols) colrepeat = true;
else colrepeat = false;
if(forward||backward){
if(acceleration!=0)a.ax = acceleration;a.ay = acceleration;
if(a.collide) fill(0);
if(a.pos()&&hover) fill(0,255,0);
if(!fill) noFill();
stroke(a.col);
strokeWeight(bordersize);
if(!border) noStroke();
if(forward&&!pause&&!backward) a.forward = true;a.pause = false;a.backward = false;a.update();
if(backward&&!pause&&!forward) a.forward = false;a.pause = false;a.backward = true;a.update();
a.attractors();
if(mouse)a.mouse();
}
if(!terrain3d){
if(!circle&&!dot&&!shape&&!plain){
//if(num>=0.80)fill(0);
noStroke(); if(plain)stroke(0);rect(a.x,a.y,a.w,a.h);
//a.get_neighbours();
strokeWeight(0);
fill(255);
for(int k=0;k<a.Neighbours_b.length;k++){
Grid_space neighbour = a.Neighbours_b[k];
if(neighbour!=null&&neighbour.col2!=a.col2){
a.Walls_b.set(k,false);
}
else{
a.Walls_b.set(k,true);
}
noStroke();
stroke(0);
strokeWeight(1);
if(!a.Walls_b.get(k)&&contour){
if(k==0){
line(a.x,a.y,a.x+a.w,a.y);
}else if(k==1){
line(a.x+a.w,a.y,a.x+a.w,a.y+a.h);
}else if(k==2){
line(a.x+a.w,a.y+a.h,a.x,a.y+a.h);
}else if(k==3){
line(a.x,a.y+a.h,a.x,a.y);
strokeWeight(1);
}}}}else{
if(circle){
ellipseMode(CORNER);ellipse(a.x,a.y,a.w,a.h);
}
else if(dot){
strokeWeight(2);
point(a.x,a.y);
strokeWeight(1);
}
else{
//text(deltax,a.x,a.y);
}}}
else if(terrain3d){
float mult = 1;
fill(a.col);
stroke(a.col);
if(!border)noStroke();
if(!fill)noFill();
if(floored){
float a1 = terrain[xx][yy];
float a2 = terrain[xx][yy];
float a3 = terrain[xx][yy];
float a4 = terrain[xx][yy];
if(a1<sealevel){
a1 = sealevel;
}else{
if(a1<groundlevel2){
a1 = groundlevel2;
}else{
if(a1<grasslevel){
a1 = grasslevel;
}else{
a1 = a3;
}}}
if(a2<sealevel){
a2 = sealevel;
}else{
if(a2<groundlevel2){
a2 = groundlevel2;
}else{
if(a2<grasslevel){
a2 = grasslevel;
}else{
a2 = a4;
}}}
vertex(xx*a.w*mult, yy*a.h*mult, terrain[xx][yy]);
vertex(xx*a.w*mult, (yy+1)*a.h*mult, terrain[xx][yy+1]);
}else if(R<-100){
vertex(xx*a.w*mult, (yy)*a.h*mult, terrain[xx][yy]);
vertex(xx*a.w*mult, (yy+1)*a.h*mult, terrain[xx][yy+1]);
}}}
if(terrain3d)endShape(CLOSE);
}}
if(terrain3d){
popMatrix();
}
if(toggle)gridbox.draw();keys();
if(toggle)sliderMenu.draw();
};```
the specific bit of code that draws the lines
for(int k=0;k<a.Neighbours_b.length;k++){
Grid_space neighbour = a.Neighbours_b[k];
if(neighbour!=null&&neighbour.col2!=a.col2){
a.Walls_b.set(k,false);
}
else{
a.Walls_b.set(k,true);
}
noStroke();
stroke(0);
strokeWeight(1);
if(!a.Walls_b.get(k)&&contour){
if(k==0){
line(a.x,a.y,a.x+a.w,a.y);
}else if(k==1){
line(a.x+a.w,a.y,a.x+a.w,a.y+a.h);
}else if(k==2){
line(a.x+a.w,a.y+a.h,a.x,a.y+a.h);
}else if(k==3){
line(a.x,a.y+a.h,a.x,a.y);
strokeWeight(1);
}}}}
not sure why the code is escaping the code block.