Current code? Ok, but its not that diferent from the old one.
rem SYNC the program
sync on : sync rate 60
rem Make ground
make matrix 1,2000,2000,50,50
rem Make and position the "HERO"
make object sphere 1,2,3,6
position object 1,0,0,0
rem make and position the "GOAL"
make object cylinder 2,40
position object 50,2000,0,2000
rem Make the variables to globals
global nmax as integer
global lives as integer
global score as integer
rem Restart
start:
rem set the variable values
nmax=65
level=1
score=0
lives=10
rem
next_level:
rem Make the level
for n=3 to nmax
if object exist(n)=0 then make object sphere n,rnd(40)+10
position object n,rnd(1800)+100,0,rnd(1800)+100
color object n,rgb(rnd(255),rnd(255),rnd(255))
next n
rem The loop
do
rem The text
text 1,1,"Level: "+str$(level)
text 1,16,"Nr. of objects: "+str$(nmax)
text 1,31,"Score: "+str$(score)
text 1,46,"Lives: "+str$(lives)
rem The functions
control()
hit()
level_done()
rem Update screen
sync
loop
rem If the level is done, this is the function...
function level_done()
if object collision(1,2)=1
inc nmax,15
position object 1,0,0,0
inc score,3
goto next_level
endif
endfunction
rem The controls
function control()
rem Position the camera
position camera object position x(1),object position y(1)+5,object position z(1)
rem Rotate camera...
rotate camera 0,object angle y(1),0
rem MOVE!!!
if upkey()=1 then move object 1,4
if downkey()=1 then move object 1,-2
rem Turn left or right
if leftkey()=1 then yrotate object 1,object angle y(1)-2
if rightkey()=1 then yrotate object 1,object angle y(1)+2
rem The boundaries
if object position x(1)<0 then position object 1,0,0,object position z(1)
if object position x(1)>2000 then position object 1,2000,0,object position z(1)
if object position z(1)<0 then position object 1,object position x(1),0,0
if object position z(1)>2000 then position object 1,object position x(1),0,2000
endfunction
rem If you hit the blocking objects...
function hit()
if object collision(1,0)<>0 and object collision(1,0)<>2
position object 1,0,0,0
dec lives,1
dec score,1
endif
endfunction
Quote: "... (way more than likely) has everything to do with why you can't make it work. a quick search for "cfile trojan" on google reveals they are probably 1 in the same issue. with some research, i'm confident you can rid yourself of the virus. otherwise, you're in for additional bouts of frustration."
Ive searched the internet, first for "cfile trojan", and then for "cfile trojan + darkbasic", but didnt find anything usefull. My guess is that I will HAVE TO UPDATE MY OUTDATED ANTIVIRUS IF I CAN FIGURE OUT HOW!!!