Woohoo I finally managed to upload my 20 liner
Yeah I know I should finish my damn track for our Racing Game but no worry I finished this 20 liner some times ago but I couldn't upload it
So here we go!
rar file:
http://tomy.fateback.com/20%20Liners/Serious%20Snake.rar
zip file:
http://tomy.fateback.com/20%20Liners/Serious%20Snake.zip
zip file with .exe (this link has a DOWNLOAD LIMIT):
http://home.ripway.com/2004-3/92544/Snake2complete.zip
Anyway here's a short describtion of the game:
-It has 3 different stages (revolutionary isn't it
)
-The Snake is animated!!!!!!!!!!!!!!!(WOW)
-arrow keys to move!
-You gain points by eating apples
-If the time is 0 you'll loose
-If you move into a wall or a tree you'll loose
-If you move out of the screen you'll appear on the other side (if there isn't a wall at the end of the screen)
Now for the biggest new feature:
Sometimes a big fat ugly mouse will appear and you'll gain many points by eating them! But watch out: some mouses (the blue) have eaten rat poison and will decrease your time (20 seconds)!
The normal mouses will increase your points! The mouses which are eating cheese will increase both your points and time!
EDIT: the mouses will disappear after a while (when the little countdown at the top of the screen is 0)
The amount of points you gain depends on the time left on the little countdown.
Known bugs:
-tree collision isn't that good
-sometimes an apple is positioned on a wall or tree
Then just wait for the next mouse and eat it (if you eat a mouse the apple will be repositioned)
-If you press the arrow keys to fast you'll die
Any comments?
Enjoy
Tomy
EDIT:
here's the code
Startpoint: : newobject = 1 : set image colorkey 0,0,0 : maxlength = 768 : currentlength = 5 : level=1 : count=0 : timeleft=-10 : dim xpos(maxlength) : dim ypos(maxlength) : dim direction(maxlength) : dim edge(maxlength) : dim objx(4) : dim objy(4) : score = 0 : time = 120000
for r = 1 to currentlength : xpos(r)=320-20*(r-1) : ypos(r)=320 : direction(r)=2 : edge(r)=0 : next r : load image "Title.jpg", 26 : load image "SeriousSnake.bmp",19 : set image colorkey 255,255,255 : for x=1 to 4 : load image "Snake"+str$(x)+".bmp", x
load image "Snaketail"+str$(x)+".bmp", x+4 : load image "Snakehead"+str$(x)+".bmp", x+8 : load image "Snakeedge"+str$(x)+".bmp", x+12 : next x : load image "apple.bmp", 30 : for x=1 to 3 : load image "mouse"+str$(x)+".bmp", 30+x
load image "background"+str$(x)+".jpg", 19+x : load image "obstacle"+str$(x)+".bmp", 22+x : next x : sync on : sync rate 20 : backdrop on : hide mouse : randomize timer() : set text font "Arial" : set text size 30
while returnkey()=0 : cls rgb(255,255,255) : paste image 26,120,50 : paste image 19,250,50,1 : if downkey()=1 : inc level : if level>3 : level=3 : endif : wait 100 : endif : if upkey()=1 : dec level : if level<1 : level=1 : endif : wait 100 : endif
ink 0,0 : center text 320, 320, "CHOOSE A LEVEL!" : for x=1 to 3 : if level=x : center text 320, 320+x*40, "<Level "+str$(x)+">" : else : center text 320, 320+x*40, "Level "+str$(x) : endif : next x : sync : endwhile
cls rgb(255,255,255) : center text 320, 240, "LOADING LEVEL "+str$(level)+"..." : sync : wait 3000 : while escapekey() = 0 : for x=0 to 31 : for y=0 to 23 : paste image 19+level,x*20,y*20 : next y : next x : if level=1 : for r=1 to 14 : sprite 800+r,120,r*20+80,23 : sprite 814+r,500,r*20+80,23 : next r : maxobstacles=28 : endif
if level=2 : for x=0 to 31 : paste image 24,x*20,0 : paste image 24,x*20,460 : next x : for y=1 to 22 : paste image 24,0,y*20 : paste image 24,620,y*20 : next y : maxobstacles=0 : endif : if level=3 : for r=1 to 14 : sprite 800+r,120,r*20+80,23 : sprite 814+r,500,r*20+80,23 : next r : for x=1 to 3 : sprite 828+x, x*145, 210, 25 : next x : maxobstacles=31 : endif
if count=0 : for r = currentlength to 1 step -1 : if r <> 1 : if xpos(r)=xpos(1) and ypos(r)=ypos(1) : wait 1000 : finish(score) : endif : xpos(r)=xpos(r-1) : ypos(r)=ypos(r-1) : edge(r)=edge(r-1) : direction(r)=direction(r-1) : else
if direction(1)=1 or direction(1)=3 : ypos(r) = ypos(r) + (direction(1)-2)*20 : else : xpos(r) = xpos(r) - (direction(1)-3)*20 : endif : endif : if r<>1 and r<>currentlength and edge(r+1)=0 : sprite r, xpos(r), ypos(r), direction(r) : endif
if r=currentlength : sprite r, xpos(r), ypos(r), direction(r)+4 : endif : if r=1 : sprite r, xpos(1), ypos(1), direction(r)+8 : endif : if edge(r+1)<>0 : sprite r, xpos(r), ypos(r), edge(r+1)+12 : endif : next r : edge(2)=0 : endif
if xpos(1)<0 : xpos(1)=620 : if level=2 : finish(score) : endif : endif : if xpos(1)>620 : xpos(1)=0 : if level=2 : finish(score) : endif : endif : if ypos(1)<0 : ypos(1)=460 : if level=2 : finish(score) : endif : endif : if ypos(1)>460 : ypos(1)=0
if level=2 : finish(score) : endif : endif : if newobject=1 : objx(1)=rnd(30)*20+20 : objy(1)=rnd(22)*20+20 : newobject=0 : endif : sprite 770, objx(1), objy(1), 30 : if rnd(100)=0 and timeleft<0 : newmouse=1 : timeleft=100 : mouse=rnd(2)+1 : endif
if timeleft>0 : sprite 771,objx(2),objy(2),30+mouse : if newmouse=1 : objx(2)=rnd(640-sprite width(771)) : objy(2)=rnd(480-sprite height(771)) : newmouse=0 : endif : else : if sprite exist(771) : delete sprite 771 : endif : endif : dec timeleft
if timeleft<0 : timeleft=-10 : endif : if count=0 : if sprite hit(1,770)=1 : newobject=1 : inc currentlength : inc score, 10 : endif : if sprite hit(1,771) : newobject=1 : if mouse=1 : dec time, 20000 : endif : if mouse=2 : inc score, timeleft : endif
if mouse=3 : inc score, timeleft : inc time, timeleft*500 : endif : inc currentlength : timeleft=-10 : endif : count=2 : endif : if currentlength=maxlength or time < 50 : wait 1000 : finish(score) : endif : for x=1 to maxobstacles : if abs(xpos(1)-sprite x(800+x))<20 and abs(ypos(1)-sprite y(800+x))<20
wait 1000 : finish(score) : endif : next x : if upkey()=1 and direction(1)<>3 : if direction(1)=2 : edge(2)=4 : endif : if direction(1)=4 : edge(2)=1 : endif : direction(1)=1 : else : if rightkey()=1 and direction(1)<>4 : if direction(1)=1 : edge(2)=2 : endif : if direction(1)=3 : edge(2)=1 : endif : direction(1)=2 : else : if downkey()=1 and direction(1)<>1
if direction(1)=2 : edge(2)=3 : endif : if direction(1)=4 : edge(2)=2 : endif : direction(1)=3 : else : if leftkey()=1 and direction(1)<>2 : if direction(1)=1 : edge(2)=3 : endif : if direction(1)=3 : edge(2)=4 : endif : direction(1)=4 : endif
endif : endif : endif : dec time, 50 : time$ = left$(str$(time/60000),1) + ": " + str$(time/1000-(val(left$(str$(time/60000),1))*60)) : ink 0,0 : text 50, 436, "Score: " + str$(score) : text 590 - text width( time$ ), 436, time$ : if timeleft>0 : center text 320,20,str$(timeleft) : endif : sync : dec count : endwhile
function finish(score) : for x=1 to 1000 : if sprite exist(x) : delete sprite x : endif : if image exist(x) : delete image x : endif : next x : repeat : cls 0 : ink rgb(255,255,255),0 : center text 320,120,"GAME OVER!" : center text 320, 240,"YOUR SCORE: "+str$(score) : center text 320,360,"PRESS ENTER..." : sync : until returnkey()=1 : goto Startpoint : endfunction
EDIT: Ah and it's for DBP (forgot to mention that
)