Posted: 26th Jan 2003 17:48
+ Code Snippet
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?
Posted: 26th Jan 2003 18:18
This is a game I coded in a very short time about collecting consecutive numbers.
You collect the numbers 1-9 in order, then repeat.
It says "GET:" followed by your next number at the bottom of the screen.

If you get the number it wants you to, that number is added onto your score.

If you get a different number, that number is subtracted from your score.

Control with Up,Down,Left and Right. You need to react quickly (on harded levels especially).

If you like it, good for you. There are 2290 levels.

If you don't, I don't mind. I only spent a small amount of time on it.
Posted: 26th Jan 2003 18:19
"harded" should be "harder"
Posted: 1st Feb 2003 23:40
Seems like a great coding job, except for one problem. I can't "get" any number. I just pass right through it.
Posted: 2nd Feb 2003 5:51
heh,

same here
Posted: 10th Feb 2003 11:44
the problem is around here
+ Code Snippet
    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

it should not say last0, but as I am using a different computer I can't find out what it should be. maybe last=0 ?
Posted: 13th Feb 2003 19:24
+ Code Snippet
Rem Project: consecutron
Rem Created: 11/01/03 20:02:56

Rem ***** Main Source File *****

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#<0 then playx#=79
    if playx#>79 then playx#=0
    if playy#<0 then playy#=28
    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 last<9 then want=last+1 else want=1

    if world(dx,dy)>0
        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


Does this one work?