Rem Project: consecutron
Rem Created: 11/01/03 20:02:56
Rem ***** Main Source File *****
Rem Consecutron By Shadow.
sync on
dim world(79,28)
lev=1
randomize timer()
do
cls
if inkey$()="x" then end
if gameplay=0 then playx#=40:playy#=15: d=0: loadworld(lev):gameplay=1
if d=0 then dec playy#,0.125
if d=1 then inc playx#,0.25
if d=2 then inc playy#,0.125
if d=3 then dec playx#,0.25
if playx#79 then playx#=0
if playy#28 then playy#=0
if leftkey() then d=3
if rightkey() then d=1
if upkey() then d=0
if downkey() then d=2
dx=int(playx#+0.5):dy=int(playy#+0.5)
for i=0 to 79:for j=0 to 28
if world(i,j)>0 then text i*8,j*16,str$(world(i,j))
next j:next i
text playx#*8,playy#*16,"#"
if last0
just=world(dx,dy)
if just=want then inc score,just else dec score,just
world(dx,dy)=0
inc collected
last=just
endif
if collected=lev then collected=0: last=0: gameplay=0:inc lev
gosub cheats
if cheat>0 then collected=0:last=0:gameplay=0:lev=cheat:cheat=0: clear entry buffer
text 0,464,"LEVEL: "+str$(lev) + " SCORE: "+str$(score)+" GET:"+str$(want)
sync
loop
cheats:
a$=right$(entry$(),6)
if a$="office" then cheat=10
if a$="aliens" then cheat=20
if a$="launch" then cheat=40
if a$="begins" then cheat=80
if a$="appear" then cheat=160
if a$="wonder" then cheat=320
if a$="terror" then cheat=640
if a$="cities" then cheat=1280
if a$="planet" then cheat=2290
return
function loadworld(level)
for i=0 to 79:for j=0 to 28:world(i,j)=0: next j:next i
n=1
for i=1 to level
x=rnd(78):if x=>40 then inc x:y=rnd(28)
world(x,y)=n
inc n
if n>9 then n=1
next i
endfunction
Can you guess how I thought up the cheat codes?