- Randomized Scene Generator (CE)
- 10 Aug 2017 06:10:36 pm
- Last edited by iPhoenix on 16 Aug 2017 11:00:25 am; edited 1 time in total
I was bored, and am making programs that generate cool backgrounds/scenes, randomizing them every time, so it will be unlikely hat you get use
I will post source later, but I have one of the scenes done.
Name: SHARK ATTACK!!!
Randomized features: the height of the waves (each column of "water" has a random factor), the extent of the darkness, the light blue splashie-things, the direction the fin is facing, the left-right position of the fin, the thickness of the fin, and the height of the fin.
Name: City Generator
Randomized features: position + size of buildings, time of day, spacing of windows. (if night) color of windows.
Code:
I will get an actually screenie later, I made this with Zeman at his house and am without ti-connect
Feel free to suggest more scene ideas, comment on existing ones, and create on of your own! (Just know I will be creating "one program to rule them all" that will randomly pick a scene to display, and display it)
Current scene ideas list:
1) island, with randomized palm trees, ocean, sand, and birds
2) homework, with randomized math problems, and randomized amounts of correct work and answers
I will post source later, but I have one of the scenes done.
Name: SHARK ATTACK!!!
Randomized features: the height of the waves (each column of "water" has a random factor), the extent of the darkness, the light blue splashie-things, the direction the fin is facing, the left-right position of the fin, the thickness of the fin, and the height of the fin.
Name: City Generator
Randomized features: position + size of buildings, time of day, spacing of windows. (if night) color of windows.
Code:
264/6->Xmax:~Ans->Xmin
164/6->Ymax:~Ans->Ymin
{Red,Orange,Yellow,Green,Blue,Navy,Magenta->L1
{Black,DarkGray,Gray,MedGray,LtGray,White,LtGray,MedGray,Gray,DarkGray->L2
ClrDraw
randInt(0,1->Q
BackgroundOn White
If Q
BackgroundOn Black
DispGraph:ClrDraw
For(A,1,randInt(5,10)
randInt(2,3)->S
SrandInt(4,8)+(S-1)->W
S*(~W+randInt(5,20))+S-1->H
LtGray+randInt(0,3->C
randInt(~44,44->P
P+(W/2)+.5->J
P-W/2-0.5->I
For(B,I,J
For(D,Ymin,H+S
C->O
If not(remainder(int(D-Ymin),S)) and not(remainder(B-I,S)) and (B>(I+1) and B<(J-1)) and D<H
Then
LtBlue+(not(randInt(0,2))*Q)->O
R+1->R
If S=2 and W=13 and Q
L1(1+remainder(R,dim(L1->O
If S=3 and W=14 and Q
L2(1+remainder(R,dim(L2->O
End
Pt-On(B,D,1,O
End
End
End
I will get an actually screenie later, I made this with Zeman at his house and am without ti-connect
Feel free to suggest more scene ideas, comment on existing ones, and create on of your own! (Just know I will be creating "one program to rule them all" that will randomly pick a scene to display, and display it)
Current scene ideas list:
1) island, with randomized palm trees, ocean, sand, and birds
2) homework, with randomized math problems, and randomized amounts of correct work and answers