Hey everybody look whar I made! I made a crappy li'l program that uses goto!
Complete:
REM Refresh rate setup
Autocam off
Hide mouse
Sync ON
Sync Rate 30
REM Directions
Sync
Set cursor 185,0
Set text size 50
Ink RGB(0,0,255),0
Print "Scary Shapes"
Sync
Ink RGB(255,0,0),0
Set Text size 25
Print "Use the arrowkeys to move."
Print "Try to dodge the other balls for 1000"
Print "seconds. If you collide with any other "
Print "object you will lose health. Lose all your"
Print "health and the game will restart after five seconds."
Print "Press any key to continue."
Sync
Wait 1000
Wait key
cls
Start:
Sync
Set cursor 185,0
Set text size 50
Ink RGB(0,255,0),0
Print "Get Ready"
SYNC
Wait 1000
REM Variable setup
Health = 100
Time# = 1000
REM Make shapes in random places
Make object cube 1,100
Position object 1,RND(2000),0,RND(2000)
Set object collision to boxes 1
Color object 1, RGB(RND(255),RND(255),RND(255))
Make Object sphere 11, 50
Make Object Sphere 12, 50
Make object sphere 13, 50
Color object 11,RGB(0,255,0)
Color object 12,RGB(255,255,0)
Color object 13,RGB(0,0,255)
Set object collision to spheres 11
Set object collision to spheres 12
Set object collision to spheres 13
Position object 11,RND(2000),0,RND(2000)
Position object 12,RND(2000),0,RND(2000)
Position object 13,RND(2000),0,RND(2000)
REM Make player sphere
Make object sphere 10,50
Position object 10,-100,0,-100
Set object collision to spheres 10
Color object 10, RGB(255,0,0)
REM Program's main logic loop
Do
REM Restart if health is 0
If health = 0
Stop object 10
Stop object 11
Stop object 12
Stop object 13
Delete object 1
delete object 10
delete object 11
delete object 12
delete object 13
Wait 5000
Goto Start
Endif
If time# = 0
Stop object 10
Stop object 11
Stop object 12
Stop object 13
Delete object 1
delete object 10
delete object 11
delete object 12
delete object 13
SYNC
Set cursor 185,0
Set text size 35
Ink RGB(0,255,0),0
Print "Good Job You Beat The Game!"
Print "The game will restart in five seconds."
SYNC
wait 5000
goto complete
Endif
REM Show health left
Ink RGB(255,0,0),0
Set Text font "arial"
Set text size 50
Set cursor 550,0
Print Health
REM Show time left
Ink RGB(255,255,255,),0
Set cursor 0,0
Print "TimeLeft"
Ink RGB(255,255,255),0
Set Cursor 185,0
Time# = Time#-1
Print Time#
REM Store object angle Y in aY#
aY#= Object angle Y(10)
REM Control camera input
If UpKey()=1 Then move object 10,20
If LeftKey()=1 Then yrotate object 10,wrapvalue(aY#-5)
If RightKey()=1 Then yrotate object 10,wrapvalue(aY#+5)
If DownKey()=1 Then move object 10,-10
REM move cubes randomly
Point object 12, X#,0,Z#
Point object 11, X#,0,Z#
Point object 13, X#,0,Z#
Move Object 11, 19
Move Object 12, 19
Move Object 13, 19
REM Collision detection
If object collision(10,0)>0 Then Health = health - 2
If Object collision(10,0)>0 Then position object 10,X#,0,Z#
If object collision(11,0)>0 Then position object 11,X1#,0,Z1#
If object collision(12,0)>0 Then Position object 12,X2#,0,Z2#
If object collision(13,0)>0 Then Position object 13,X3#,0,Z3#
REM Get player position and store it in Vars X# and Z#
X# = object position x(10)
Z# = object position z(10)
Z1# = object position z(11)
X1# = object position x(11)
X2# = object position x(12)
Z2# = object position z(12)
X3# = object position x(13)
Z3# = object position z(13)
REM Get camera position and store it in CZ# and CX#
cZ# = Newzvalue(Z#,aY#-180,100)
cX# = Newxvalue(X#,aY#-180,100)
REM Position camera
Position Camera cX#,75,cZ#
REM Point camera at the player
Point camera X#,25,Z#
REM End loop and refresh screen
Sync
Loop
It's the first thing I've made without a tut, so I'm real excited about it......NOT!LOL
If you play it you'll see what I mean.
It took me about two hours to make it so it's a pretty half baked quikie job tell me what ya think about it though, if you want to.
I've bein driving since the age of three; if you don't belive me ask my parents, you can find them at the county hospital for the mentally imbalanced.