Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / [DBC] First Try at Golf

Author
Message
Flaming Ghost
19
Years of Service
User Offline
Joined: 29th Apr 2005
Location: Um...Right here
Posted: 3rd May 2005 11:15
Here's my Golf game. It's my first 20 line contest game, I hope to make it better. Please suggest things taht might make it shorter, or better. The scoring doesn't work very well, sorry.

GOLF
Sync On : Hide Mouse : autocam off : set text size 35 : Make Object Cube 5,100 : Position Object 5,0,0,-20 : Scale Object 5,50,5,100 : Color Object 5,rgb(10,100,10)
Make Object Cube 6,50 : Position Object 6,0,10,55 : Color Object 6,rgb(100,100,100) : Make Object Sphere 1,5
Make Object Sphere 10,8 : make object collision box 1,-2.5,-2.5,-2.5,2.5,2.5,2.5,0 : Scale Object 10,100,5,100 : Position Object 10,0,3,20 : make object collision box 10,-2,-.5,-2,2,.5,2,0 : Color Object 10,Black
y#=5 : z#=-60 : u#=1 : P#=0 : g#=2 : z_speed#=0 : grav#=0 : W#=0 : i#=0
Do : Position Camera 0,y#+10,z#-25 : Point Camera 0,y#,z# : Position Object 1,0,y#,z# : Set Cursor 10,0 : Print \\\"Power: \\\",P# : Print \\\"Wins: \\\",W# : Set Cursor 100,0 : Print \\\"Press Upkey to start the powerbar, press space to launch\\\"
inc z#,z_speed# : inc y#,y_speed# : if z_speed#>0 then dec z_speed#,.1 : if z_speed#<0 then inc z_speed#,.1
dec y_speed#,.5 : if y#<5 : y_speed#=0 : z_speed#=z_speed#/1.1 : endif
If upkey()=1 : y#=5 : z#=-60 : g#=1 : r#=1 : s#=0 : i#=0 : endif
If g#=1 : If u#=1 : P#=P#+.5 : If P#>10 then u#=0 : endif
If u#=0 : P#=P#-.5 : If P#<1 then u#=1 : endif : endif
If Spacekey()=1 : If r#=1 : i#=1 : g#=0 : z_speed#=P#/1.3 : y_speed#=P#/2 : r#=0 : endif : endif
If Object Collision(1,10)>0 : If z_speed#<3 and z_speed#>-3 : counter=0 : W#=W#+1 : s#=1 : do : inc counter : if counter=120 then exit
if counter>0 then Text 300,400,\\\"SCORE!!!\\\"
sync : loop : z_speed#=0 : y#=5 : z#=-60 : endif : endif
If z#>30 then z_speed#=z_speed#*-.9
Sync
Loop

Am I dead yet?
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 3rd May 2005 23:07
hey, thats actually quite good
perhaps you could make an animated model for a character, and maybe a matrix for your golf course and that would be quite cool

"Well, if he dies, it'll teach him not to do it again." - Me
Link102
19
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 5th May 2005 07:16 Edited at: 5th May 2005 07:19
Good one, not many people try to create a golf game.

If you can, you should create a powerbarr insted of a power number, and upkey->spacebar should be spacebar pressed->spacebarr released

Here's the code without the ""


please reply

Login to post a reply

Server time is: 2024-11-24 02:33:18
Your offset time is: 2024-11-24 02:33:18