Here's my first 20 liner...in 17 lines. It's not much, there is no collision so you can "walk" out of the sky. Just press the mouse button to shoot (and use the mouse to look around) and press 'w' to move forward and 's' to move backward. Since I was a noob I was trying out a few things so that's why it displays the date and time and stuff.
Thanks.
Compressed:
`==========
` Shoot3D
`==========
`====by C. B. Kimbrough
set display mode 800,600,32:sync on:backdrop off:autocam off:make object box 20,900,900,900:date$=get date$():load image "g.bmp",1:load image "b.bmp",2:load sound "l.wav",1
position object 20,0,-460,0:hide mouse:position camera -450,5,-20:make object sphere 22,10:position object 22,1000,1000,1000:hide object 22:draw to front:make object sphere 99,1500
set object 99,1,1,0:fade object 99,0:texture object 99,2:fog on:fog distance 1400:fog color rgb(140,190,140):texture object 20,1:s=0:yrotate camera 90.0
do:ink rgb(0,0,0),0:box 0,0,160,160:w=255:ink rgb(w,w,w),0
box 10,10,150,150:e():oY#=y#:oX#=x#:y#=wrapvalue(y#+mousemovex()*0.2):x#=wrapvalue(x#+mousemovey()*0.2):time$=get time$():if keystate(17)=1:move camera 10.0:endif:if keystate(31)=1:move camera -10.0:endif
q#=q#+0.45:if q#>360.0:q#=0.0:endif:yrotate object 99,q#:set cursor 20,120:print date$:if l=1:play sound 1:endif
if mouseclick()=1:if r=1 or r<90:position object 22,camera position x(),5,camera position z():set object to camera orientation 22:r=100:show object 22:endif:endif
if r>0 then gosub h:if r=99:l=1:else:l=0:endif
yrotate camera curveangle(y#,oY#,25):if object collision(22,1)=1:color object 1,rgb(255,0,0):inc s:else:color object 1,rgb(100,255,100):endif
set cursor 20,40:i=60:ink rgb(i,i,i),0:print "Player:":set cursor 30,65:print s:set cursor 20,100:print time$:set cursor 20,120:print date$
sync:loop
h:
dec r:move object 22,35:return
function e()
if object exist(1)=0:make object sphere 1,20:color object 1,rgb(0,255,0):endif:t=t+1:t=t+1:if t>150:rx=rnd(400):rz=rnd(400):t=0:endif
position object 1,rx,0,rz
endfunction
` lines: 17 (19 if you count the space between the routines and function)
` written in: less than 2 hours
` problems: I've accomplished packing this code down to 14 lines of code
` but mashing the code together seems to make it run "slow" and awkward.
Uncompressed:
set display mode 800,600,32
sync on
backdrop off
autocam off
make object box 20,900,900,900
date$=get date$()
load image "g.bmp",1
load image "b.bmp",2
load sound "l.wav",1
position object 20,0,-460,0
hide mouse
position camera -450,5,-20
make object sphere 22,10
position object 22,1000,1000,1000
hide object 22
draw to front
make object sphere 99,1500
set object 99,1,1,0
fade object 99,0
texture object 99,2
fog on
fog distance 1400
fog color rgb(140,190,140)
texture object 20,1
s=0
yrotate camera 90.0
do
ink rgb(0,0,0),0
box 0,0,160,160
w=255:ink rgb(w,w,w),0
box 10,10,150,150
e()
oY#=y#
oX#=x#
y#=wrapvalue(y#+mousemovex()*0.2)
x#=wrapvalue(x#+mousemovey()*0.2)
time$=get time$()
if keystate(17)=1
move camera 10.0
endif
if keystate(31)=1
move camera -10.0
endif
q#=q#+0.45
if q#>360.0
q#=0.0
endif
yrotate object 99,q#
set cursor 20,120
print date$
if l=1:play sound 1:endif
if mouseclick()=1
if r=1 or r<90
position object 22,camera position x(),5,camera position z()
set object to camera orientation 22
r=100
show object 22
endif
endif
if r>0 then gosub h
if r=99
l=1
else
l=0
endif
yrotate camera curveangle(y#,oY#,25)
if object collision(22,1)=1
color object 1,rgb(255,0,0)
inc s
else
color object 1,rgb(100,255,100)
endif
set cursor 20,40
i=60
ink rgb(i,i,i),0
print "Player:"
set cursor 30,65
print s
set cursor 20,100
print time$
set cursor 20,120
print date$
sync
loop
h:
dec r
move object 22,35
return
function e()
if object exist(1)=0
make object sphere 1,20
color object 1,rgb(0,255,0)
endif
t=t+1
t=t+1
if t>150
rx=rnd(400)
rz=rnd(400)
t=0
endif
position object 1,rx,0,rz
endfunction
whatever...
Game in Progress: Honor