I just updated the GitHub with a few things:
1) I added the matrix [B] up for download, which is the pyramid-like structure I had. You can store this in matrix [A] to use it, and you will still have it in [B] if you want to generate other maps.
2) If you enter 0 for the seed, the generator now replaces the 0 with a display of the random seed it is generating. The seed value can be recalled from theta
3) The generator no longer does its previous top down render but goes straight into the isometric program (which includes the minimap top down render of course)
4) The isometric code is pretty much the same, except I optimized some things and now the grass draws faster. I also cleaned up the annoying extra pixels with two Pt-Off( commands.
So I kind of got that working. How's this?
I messed with the variables a lot but for some reason couldn't get all the black lines to meet up. Oh well. Here's what that looks like:
Code:
It's basically the same as the regular code, except I added the W variable and changed everything in the loop under the "Other edges" comment.
That sounds absolutely amazing, good luck! Keep me updated!
1) I added the matrix [B] up for download, which is the pyramid-like structure I had. You can store this in matrix [A] to use it, and you will still have it in [B] if you want to generate other maps.
2) If you enter 0 for the seed, the generator now replaces the 0 with a display of the random seed it is generating. The seed value can be recalled from theta
3) The generator no longer does its previous top down render but goes straight into the isometric program (which includes the minimap top down render of course)
4) The isometric code is pretty much the same, except I optimized some things and now the grass draws faster. I also cleaned up the annoying extra pixels with two Pt-Off( commands.
Sam wrote:
I think it would be cool to have a render option that turns off the rendering of lines between blocks that are both on the same level and are the same type, so you only have lines between block types and at vertices.
So I kind of got that working. How's this?
I messed with the variables a lot but for some reason couldn't get all the black lines to meet up. Oh well. Here's what that looks like:
Code:
ClrDraw
2->R
BROWN->N
BackgroundOn DARKGRAY
//Draw MiniMap
RED
Line(3,~3,3,~52,Ans,1
Line(3,~3,52,~3,Ans,1
Line(3,~52,52,~52,Ans,1
Line(52,~3,52,~52,Ans,1
For(B,0,N-1
For(A,0,N-1
[A](A+1,B+1
Ans-13(Ans=25)-2(Ans=20
If Ans>25:RED
Pt-On(3A+5,~3B-5,1,Ans
End
End
//Draw Isometric Terrain
For(A,1,BROWN //substituting values in For loops with colors
~80+20(R-2)-R(A-1->S
132-6A->T
For(B,1,BROWN
[A](B,A)-19->V
BROWN+2(Ans<2)+3(Ans=2->C
BLACK-2(Ans=LTBLUE->O
If V>2 and randInt(0,1
MEDGRAY->C
T+6B->X
S-BR-R+6(V-1->Z
S-BR+6V-R->W
//Fill Box
For(I,Z-R+1,Ans+R-2
Line(X-5,I,X+5,I,C,1
End
Pt-Off(X-5,Z-R+1,4
Pt-Off(X+5,Z-R+1,4
//Complete rest of fill at top
Line(X-2R,Ans+R-2,X+2R,Ans+R-2,C,1
Line(X-R,Ans+R-1,X+R,Ans+R-1,C,1
//Draw grass
If V>2 and C!=MEDGRAY
Then
For(I,0,3,.249
Line(X-6+2I,Ans-I,X+2I,Ans+R-I,GREEN,1
End
End
//Draw main vertical edge facing camera
Line(X,Z-R,X,Ans-R,O,1
//Other edges
For(I,~6,6,BLACK
Line(X+I,Z,X,Z-R,O,1
Line(X+I,W,X+I,Z,O,1
O
If I=6 and B<BROWN
Then
If [A](B+1,A)=[A](B,A
C
If Ans=BROWN:GREEN
End
If I=~6 and A<BROWN
Then
If [A](B,A+1)=[A](B,A
C
If Ans=BROWN:GREEN
End
Line(X+I,W,X,W-R,Ans,1
O
If I=6 and A>1
Then
If [A](B,A-1)=[A](B,A
C
If Ans=BROWN:GREEN
End
If I=~6 and B>1
Then
If [A](B-1,A)=[A](B,A
C
If Ans=BROWN:GREEN
End
Line(X,W+R,X+I,W,Ans,1
End
End
End
It's basically the same as the regular code, except I added the W variable and changed everything in the loop under the "Other edges" comment.
Sam wrote:
Oh my goodness, I just had an idea. This is a great opportunity to use my TI-BASIC RTX code I made a few months ago and never finished! I'm gonna try to throw together a raytraced rendering engine for this program.
That sounds absolutely amazing, good luck! Keep me updated!