TGC Codebase Backup



Duvar by ozmoz

13th Apr 2007 16:28
Summary

This is fun 2d games :)



Description

This is fun 2d games in beer glass:)



Code
                                    ` This code was downloaded from The Game Creators
                                    ` It is reproduced here with full permission
                                    ` http://www.thegamecreators.com
                                    
                                    SET WINDOW ON
SET WINDOW SIZE 500, 500
SET WINDOW TITLE "DUVAR YIKMA"
SET WINDOW POSITION 50,20

dim a$(50)
dim b$(50)
k=150
tx=100
ty=100
can=5
sev=1
open to read 1,"ekran.txt"
  for i=1 to 30
     read string 1,a$(i)
  next i
close file 1
gosub bol
sync on
bas:
cls rgb(150,200,100)
rem bos ekran
ink rgb(0,250,250),1
for x=1 to 30
  set cursor 0,x*8
  print a$(x)
  next x
set cursor 1,10
print a$(1)
set cursor 1,9
print a$(1)
for x=2 to 29
  set cursor 2,x*8
  print a$(x)
 next x
rem taslar
for y=1 to 40
 if y<10 then i=y*30:j=20
 if y>10 and y<20 then i=(y-10)*30:j=40
 if y>20 and y<30 then i=(y-20)*30:j=60
 if y>30 and y<40 then i=(y-30)*30:j=80
 ink rgb(41,241,241),1
 set cursor i,j
 print b$(y)
rem kontrol
if i>tx-13 and i<tx+13 and j>ty-13 and j<ty+13 and b$(y)="€€€€"
puan=puan+10
b$(y)=""
if tx>150 then dur=0
if tx<151 then dur=4
endif
next y
rem raket
if leftkey()=1 then k=k-5
if rightkey()=1 then k=k+5
ink rgb(90,41,150),1
set cursor k,220
print "======"
set cursor k+5,220
print "======"

if k<10 then k=10
if k>255 then k=255
ink rgb(150,41,50),1
set cursor 320,0
print "Puan=";puan
set cursor 400,0
print "Seviye=";sev
for c=1 to can
set cursor 320+(c*10),50
print chr$(169)
next c
rem top
ink rgb(250,241,250),1
set cursor tx,ty
print "o"
if ty=215 and tx>k-15 and tx<k+16 then dur=1
if ty=215 and tx>k+15 and tx<k+31 then dur=2
if ty=215 and tx>k+30 and tx<k+50 then dur=3
if ty<15  and tx>150 then dur=0
if ty<15  and tx<151 then dur=0
if tx<10 and dur=1 then dur=3
if tx<10 and dur=0 then dur=0
if tx<10 and dur=4 then dur=0
if dur=0 and tx>290 then dur=4
if dur=3 and tx>290 then dur=1
if dur=0 then inc tx,sev:inc ty,sev
if dur=1 then dec tx,sev:dec ty,sev
if dur=2 then dec ty,sev
if dur=3 then inc tx,sev:dec ty,sev
if dur=4 then dec tx,sev:inc ty,sev
if ty>230 then can=can-1:tx=100+rnd(50):ty=100+rnd(50)
if can<0 then end
if puan=400*sev then sev=sev+1:gosub bol
sync
goto bas
bol:
for y=1 to 40
   b$(y)="€€€€"
   next y
return