'check something
'Print _Width, _Height
'End
DrawTerrain 225
Sub DrawTerrain
(BaseHeight%
) StartY%
= BaseHeight%
+ Int(Rnd * 50) - 25 CurrentHeight% = StartY% 'keep track of the current Y of the land
RunLength%
= Int(Rnd * 50) + 25 'how far does this lay run? HeightChange%
= Int(Rnd * 100) - 50 'where the elevation go? CurrentHeight% = CurrentHeight% + HeightChange% 'monitor the change in the land's Y
'if the land goes to low then reverse the height change+25
If CurrentHeight%
> 320 Then CurrentHeight%
= CurrentHeight%
- (HeightChange%
* 2) - 25: HeightChange%
= -(HeightChange%
+ 25) 'now check that the land does not go to high
If CurrentHeight%
< 50 Then CurrentHeight%
= CurrentHeight%
+ Abs(HeightChange%
* 2) + 25: HeightChange%
= Abs(HeightChange%
+ 25)
Line -Step(RunLength%
, HeightChange%
), 2 '>>>>>>>>>>>>>>>>>>>>>> this line fixed!!!!!!!!111 totalrun% = totalrun% + RunLength% 'track how far along it is
If totalrun%
> 645 Then ScreenEnd%%
= TRUE
'terrain is now done.
'box in the paint area
'Line (0, StartY%)-(0, _Height), 2
'Line (0, _Height)-(_Width, _Height), 2
'Line (_Width, 0)-(_Width, _Height), 2
'Sleep 5
Paint (320, 340), 2, 2 'ahh lovely green grass land! 'screw this
'''''''''If Point(1, 1) = 2 Then Cls: DrawTerrain (basehieght%) 'whole screen is green so try again(why though?)