
-----------------------------------
Legolas
Sun Jan 23, 2005 10:08 pm

Zelda
-----------------------------------
This is just the starting of a recreation of the old Zelda game: Links Awakening.  Its not finished yet, and the AI still has some glitches in it so I didn't include it.  Alt - A button, Ctrl- B button, Enter/Return - Start button, Arrow keys - movement.

-----------------------------------
zomg
Sun Jan 23, 2005 10:14 pm


-----------------------------------
whoa! :shock:  thats amazing... but uh isnt that copyright infringment lol :lol:

-----------------------------------
Bacchus
Mon Jan 24, 2005 7:14 am


-----------------------------------
woah thats nice, cant wait till its done :)

-----------------------------------
Viper
Mon Jan 24, 2005 9:21 am


-----------------------------------
can u post it as a .zip plz

-----------------------------------
Andy
Mon Jan 24, 2005 4:34 pm


-----------------------------------
wow.. that is very well done.. although.. if u press down ctrl and alt at the same time, the program crashes.. i also recommend you use x and z instead of ctrl and alt  just because its more standard.. when you hold down the sword, it shouldnt keep slashing, and also you should be able to chop grass.. you must've put in alot of effort, please keep us updated on your progres.. +50 bits

-----------------------------------
Mr. T
Mon Jan 24, 2005 4:57 pm


-----------------------------------
Damn, those are some sick uber hacks!!!

-----------------------------------
cycro1234
Mon Jan 24, 2005 7:45 pm


-----------------------------------
AWSOME DUDE!! I LOVE ZELDA! Super 1337!

-----------------------------------
Mazer
Mon Jan 24, 2005 10:09 pm


-----------------------------------
I'd like to see this, but I'm running Linux now and don't have time to download an emulator... could you put up a screenshot or two somewhere and then link to them?

-----------------------------------
Viper
Tue Jan 25, 2005 9:23 am


-----------------------------------
how many line is it .............n when it gonna be done i wanna play  :D  :D

-----------------------------------
MiX-MaztA-M8riX
Tue Jan 25, 2005 11:27 am


-----------------------------------
Damn, Cant download files at school :(

Not even supposed to be on forums :|

I'll D-L it at my dads this weekend and by some other replies alraedy, sounds '1337' lol  :lol:

-----------------------------------
[Gandalf]
Tue Jan 25, 2005 6:56 pm


-----------------------------------
How is that a hack?  Very nice game, probably best (or tied for) rpg start I have ever seen on turing.

A few suggestions:
1. When you exit and reenter a screen the grass respawns.
2. When you are near an object you cant change direction. (to face the object)
3. Make buildings enterable! :D

Can't wait till you're done!

-----------------------------------
Unreal_Origin
Tue Jan 25, 2005 7:59 pm

Amazing job
-----------------------------------
wow i was truely impress and i can't wait for the rest, 

one question how many lines is that?

-----------------------------------
Legolas
Tue Jan 25, 2005 8:50 pm


-----------------------------------
The game is about 800 lines of code including the declaring of all the pictures.  

Gandalf - From the Zelda games, when you leave the screen and return, the grass is meant to respawn, not stay cut.  The change direction bug is also known to me, but haven't reajusted the collision detection to take that into effect yet.

-----------------------------------
Unreal_Origin
Tue Jan 25, 2005 9:25 pm

I found a bug
-----------------------------------
hey when you start, go left 2 sreens, down 2 screens right one screen, down one screen, then go off the jump to the next screen and you get stuck inside a bush, 

anyhoo i am still very impressed

-----------------------------------
Viper
Wed Jan 26, 2005 8:57 am


-----------------------------------
wow it sounds like u were trying to find a glitch or was it jus chance u found it  :?  :?

-----------------------------------
Mazer
Wed Jan 26, 2005 9:30 am


-----------------------------------
Just checked it out from the school computers (I still think people should post screenshots).
Very well done, I'm impressed. I don't have a seal of approval to give you but once I can be bothered to make one, you'll receive yours.

-----------------------------------
Drakain Zeil
Wed Jan 26, 2005 12:51 pm


-----------------------------------
It sounds cool, I'll  download it when I'm on windows again.

-----------------------------------
Catalyst
Wed Jan 26, 2005 10:52 pm


-----------------------------------
awesome :D

-----------------------------------
basketball4ever
Wed Jan 26, 2005 11:12 pm


-----------------------------------
very nice, though slow :) very nice.  cant wait to play zelda with turing when ur done :D

-----------------------------------
[Gandalf]
Thu Jan 27, 2005 1:40 am


-----------------------------------
The slowness problem is probably with your pc.  Turing games seem to require much more cpu and stuff than then should...

-----------------------------------
AsianSensation
Thu Jan 27, 2005 6:03 pm


-----------------------------------
yep, yep, alot of effort, pretty smooth too. ++bits.

-----------------------------------
Jonny Tight Lips
Thu Feb 03, 2005 7:40 pm


-----------------------------------
wow that is amazing! And only 800 lines!!! wow, could you post the sorce for that. I want to know how you did the walking and the back ground? did you use a tile system? Did you use sprites? AMAZING GAME!

-----------------------------------
apomb
Fri Feb 04, 2005 3:22 am


-----------------------------------
all you need to do is make it a .nes file and hope you dont get caught for, lke it has been stated, copyright infringenment ... great job tho!  8)

-----------------------------------
TheZsterBunny
Fri Feb 04, 2005 5:56 am


-----------------------------------
Very nice ^_^

one complaint however- no diagonal movement!

If you hold up and left, you'll move up. if you hold attack, you constantly attack. :S

=Z

-----------------------------------
zomg
Fri Feb 04, 2005 8:08 am


-----------------------------------
Very nice ^_^

one complaint however- no diagonal movement!

If you hold up and left, you'll move up. if you hold attack, you constantly attack. :S

=Z

there wasnt diagonal movements in the gameboy either

suggestion:if u hold down sword it should do that power up spining thing

-----------------------------------
Flikerator
Fri Feb 04, 2005 12:10 pm


-----------------------------------
Wow im really impressed :D

When shall we see an update? ^^

-----------------------------------
mike200015
Sat Feb 05, 2005 11:27 am


-----------------------------------
wow thats amazing.. very nice.. i also checked out that glitch where u get stuck in the bush, but besides that its amazing!! cant wait for it to be done

-----------------------------------
ssr
Sat Feb 05, 2005 6:40 pm


-----------------------------------
I LOVE THIS GAME
man u must have put so much effort in tot eh game
hey u should sell it after u r done :D  $50 each
but share it here for free
lol

-----------------------------------
Jonny Tight Lips
Tue Feb 15, 2005 9:52 pm


-----------------------------------
I was wondering if it would be ok if I used your tiles? There the perfect size and just what I need. Just wanted make sure its ok with you. Don't wanna make anyone mad. Hope you don't mind. Very nice game. I would still like to see the sorce code for it.

-----------------------------------
illu45
Sun Mar 06, 2005 11:50 am


-----------------------------------
Wow.. that's simply awesome... Very nice wrok, can't wait for more

-----------------------------------
djlenny_3000
Mon Mar 07, 2005 11:18 am


-----------------------------------
MOST AMAZING THING IN TURING EVER only 1 thing i am drooling over, i want enemies

-----------------------------------
[Gandalf]
Mon Mar 07, 2005 5:09 pm


-----------------------------------
I'm not sure we're getting an update...  It's been a long while since this was posted.  I would love to see an update - at least release the source code if you're not working on it anymore...

-----------------------------------
person
Mon Mar 07, 2005 5:22 pm


-----------------------------------
ever notice that no one really finishes their games?? (at least not the ones they submit)

-----------------------------------
Flikerator
Mon Mar 07, 2005 8:23 pm


-----------------------------------
ever notice that no one really finishes their games?? (at least not the ones they submit)

Im still finishing my Zombie Game  :roll:  (Put on hold due to competition).

-----------------------------------
Bacchus
Mon Mar 07, 2005 8:32 pm


-----------------------------------
i usually finish mine unless they hit a bug that im to lazy to fix or have a brain fart, then their put on hold until further notice :P

-----------------------------------
Flikerator
Mon Mar 07, 2005 8:40 pm


-----------------------------------
i usually finish mine unless they hit a bug that im to lazy to fix or have a brain fart, then their put on hold until further notice :P

Whats the bestest biggest codiest game you made?

EDIT

and finished  :wink:

-----------------------------------
Bacchus
Mon Mar 07, 2005 9:08 pm


-----------------------------------
hm.. im not exacly sure, the biggest code ive written (and finished) would have probably been bomberman. the largest code ive written was pacman just cause i had variables for every single dot that he can eat lol which was +100 lines by itself but i never finished that lol. then again its not the size that matters, its how you use it :P

-----------------------------------
person
Mon Mar 07, 2005 9:38 pm


-----------------------------------
LOL Bacchus

the longest code iv ever made was 750 lines long...(horse racing ISP)

-----------------------------------
Bacchus
Mon Mar 07, 2005 9:56 pm


-----------------------------------
ya pretty sure pac-mands my longest, 902 lines long (not even done) and 344 of those lines are just setting the dot variables lol, should have just used a txt file

-----------------------------------
[Gandalf]
Tue Mar 08, 2005 5:07 pm


-----------------------------------
My longest is 415 lines, but 40 or 50% of it is text.

Actually, now that I look at it - my longest is 436 lines (cheap asteroids).

-----------------------------------
Token
Tue Mar 08, 2005 8:39 pm


-----------------------------------
wow, that is really amazing, i cant wait to see when it is compleated! keep up the good work man

-----------------------------------
Mazer
Tue Mar 08, 2005 9:06 pm


-----------------------------------
ever notice that no one really finishes their games?? (at least not the ones they submit)
In my day, we used to finish our games, submit them, and continue working on them until we die and become the subject of Legends. Many songs were made to tell our stories, but those are all but forgotten now.

-----------------------------------
Bacchus
Tue Mar 08, 2005 9:10 pm


-----------------------------------
like wat then? id like to try those games lol. meh im not that good at making games, im not creative. im better at utilities and such to either enhance scripting for certain things or just to fool around lol

-----------------------------------
person
Wed Mar 09, 2005 4:23 pm


-----------------------------------
im only good aat answering questions that have an input/output thing...nothing too creative and fooling around is just boring for me because i cant think of any random things to make or...(continues saying pointless things)...

-----------------------------------
[Gandalf]
Wed Mar 09, 2005 5:08 pm


-----------------------------------
Just do what I did for one of my long programs.  Learn, type what you learn, learn some more, type some more of that, and so on to infinity  :D - something good will come out of it eventually  :) .

Again, I am beggining to seriously doubt that this game will ever be updated.  Actually, how about we put a bet on that - anyone?  The person that loses has to make a game.  That game won't be finished, and then we will bet on that, and the cycle will continue!

Congrats if you understood that  :?   :clap: - you prize:  you have to make a game (which in turn won't be finished, and we will then..........) lol, what a crazy post of mine.

-----------------------------------
Artimes
Fri Apr 01, 2005 11:13 pm


-----------------------------------
I think what you did was kind of similar to my Pac-Man game. A simple algorythm reads a file with a series of numbers. Each number represents a tile type. 

So in your file you would have for example;

1111
10001
10001
10001
1111

0 represents an empty space, and 1 represents a brick for example.

The program reads the text file and places a picture(tile) depending on the the number in the text file on the grid. It would generaly start in the top left corner, work to the right, then goto the next row. Therefore it's easy to make a map using tiles and a text file.

You can also have an array for these like "passable (i)", where i is the tile number and the array can be a boolean, true or false.

You would then using a function find out what tile your sprit is situated on, his direction, and then check the tile infront of him, that tile's "passalbility" and then decide whether you can move forward or not... 

*takes deep breath*

That's just the jist of it. I also noticed the map files can be opened in notepad and as I said, just a bunch of numbers. ;)

-----------------------------------
jamonathin
Sat Apr 02, 2005 3:37 pm


-----------------------------------
Hey thats a pretty cool idea Artimes  8)

-----------------------------------
Jonny Tight Lips
Sun Apr 03, 2005 9:26 pm


-----------------------------------
I would still like to see the sorce code.

-----------------------------------
Flikerator
Mon Apr 04, 2005 10:45 am


-----------------------------------
I would still like to see the sorce code.

Wouldn't we all...We should raise a big mass of bits ^^;

-----------------------------------
jamonathin
Tue Apr 05, 2005 8:04 am


-----------------------------------
Pretty good game[ i finally took the time to dl it at school].  I'm curious of how he made the restrictions, like if he programmed every co-ordinate (prob. not) or if he used whatdotcolor in a seperate picture no one else can see.  A problem he's going to have down the road is when he puts in the AI.  The graphics look good so far, but the AI and everything else will get messed up because of his delay's.  The program is only set up for 1 player/character, and his delays for his character are going to interfere with everything else, like it already does (swing sword and look at flowers).

I wish i could find a good place for maps, this is the only site i have, that has good sprites for the most part http://www.nes-snes-sprites.com/

    Anyone know where to find map sprites? :?

-----------------------------------
Artimes
Wed Apr 06, 2005 7:14 pm


-----------------------------------
Look up RPG Maker 2000/2003/XP, tonnes of maps and character sets.

-----------------------------------
jamonathin
Wed Apr 06, 2005 8:20 pm


-----------------------------------
Aiight, sounds good mayte!  :flame:

-----------------------------------
Palindine
Thu Apr 07, 2005 3:30 am


-----------------------------------
well i'd definately give this guy bits if i had more then i did, he was able to do more then i ever could with a zelda game, lord knows i've started about 5 different times and kept running into problems. and as to my largest prog writen was around 1 to 3 thousand lines or something like that, i had them posted up here for a while, "Team L337" prog's, they were for a contest.

-----------------------------------
barneyoncrack
Mon Apr 11, 2005 5:21 pm


-----------------------------------
:shock: [/code]

-----------------------------------
jamonathin
Tue Apr 12, 2005 8:49 am


-----------------------------------
:shock: 
What's that?  It doesn't even relate to any of the topics.  Don't juss put meaningless emocotions on random topics to earn yourself bits and posts, you may make someone [a mod] a little annoyed with you.

-----------------------------------
RscMod
Thu Apr 14, 2005 10:38 am


-----------------------------------
yep its cool

-----------------------------------
Legolas
Wed Apr 20, 2005 8:30 pm


-----------------------------------
I finally got around to posting the actual coding of the program.  The new one is gone because i had computer problems, so you will have to settle for the older code, which is not as nice, nor as easy to read.  I cut out all the picture declerations to save space.  First all the procedures and declerations:


type menu :
    record
        picture : int
        item : int
    end record

var pic : array 1 .. 133 of int
var console : array 1 .. 7 of int
var playerpics : array 1 .. 27 of int
var positioning : array 1 .. 6, 1 .. 2 of menu
var watercounter, flowercounter, movementcounter, tempa, tempb, player, weaponmovementcounter, health, healthtotal, shieldmove : int
var swinging : array 1 .. 16 of int

shieldmove := 0
health := 6
healthtotal := 3
for x : 1 .. 6
    for y : 1 .. 2
        positioning (x, y).item := 0
        positioning (x, y).picture := Pic.FileNew ("Pictures/Console/Start Menu/Empty1.bmp")
    end for
end for
positioning (1, 1).picture := Pic.FileNew ("Pictures/Console/Start Menu/Shield1.bmp")
positioning (1, 1).item := 1
positioning (1, 2).item := 2
positioning (1, 2).picture := Pic.FileNew ("Pictures/Console/Start Menu/Sword.bmp")

watercounter := 0
flowercounter := 0
movementcounter := 0


procedure movement (var current, num1, num2 : int)
    if current ~= num1 and current ~= num2 then
        current := num1
        lastpicture := num1
    end if
    if movementcounter > 10 then
        if current = num1 then
            current := num2
            lastpicture := num2
        elsif player = num2 then
            current := num1
            lastpicture := num1
        end if
    end if
    if movementcounter > 10 then
        movementcounter := 0
    end if
end movement

procedure drawbackground
    Draw.FillBox (0, 0, 500, 500, white)
    j := 256
    for x : 1 .. 8
        i := 0
        for y : 1 .. 10
            if watercounter > 30 then
                if background (x, y) = 77 then
                    background (x, y) := 78
                elsif background (x, y) = 78 then
                    background (x, y) := 79
                elsif background (x, y) = 79 then
                    background (x, y) := 77
                end if
                if background (x, y) = 116 then
                    background (x, y) := 117
                elsif background (x, y) = 117 then
                    background (x, y) := 118
                elsif background (x, y) = 118 then
                    background (x, y) := 119
                elsif background (x, y) = 119 then
                    background (x, y) := 116
                end if
                if background (x, y) = 120 then
                    background (x, y) := 121
                elsif background (x, y) = 121 then
                    background (x, y) := 122
                elsif background (x, y) = 122 then
                    background (x, y) := 123
                elsif background (x, y) = 123 then
                    background (x, y) := 120
                end if
            end if
            if flowercounter > 20 then
                if background (x, y) = 36 then
                    background (x, y) := 102
                elsif background (x, y) = 102 then
                    background (x, y) := 103
                elsif background (x, y) = 103 then
                    background (x, y) := 128
                elsif background (x, y) = 128 then
                    background (x, y) := 36
                end if
            end if
            Pic.Draw (pic (background (x, y)), i, j, picCopy)
            i += 32
        end for
        j -= 32
    end for
    if watercounter > 30 then
        watercounter := 0
    else
        watercounter += 1
    end if
    if flowercounter > 20 then
        flowercounter := 0
    else
        flowercounter += 1
    end if
end drawbackground


procedure barrier
    j := 256
    for x : 1 .. 8
        i := 0
        for y : 1 .. 10
            if background (x, y) = 13 or background (x, y) = 14 or background (x, y) = 30 or background (x, y) = 31 or background (x, y) = 32 or background (x, y) = 51 or
                    background (x, y) = 52 or background (x, y) = 61 or background (x, y) = 62 or background (x, y) = 63 or background (x, y) = 64 or background (x, y) = 65 or
                    background (x, y) = 66 or background (x, y) = 67 or background (x, y) = 68 or background (x, y) = 69 or background (x, y) = 70 or background (x, y) = 71
                    or background (x, y) = 74 or background (x, y) = 75 or background (x, y) = 15 or background (x, y) = 16 or background (x, y) = 17 or background (x, y) = 106
                    or background (x, y) = 22 or background (x, y) = 23 or background (x, y) = 24 or background (x, y) = 25 or background (x, y) = 26 or background (x, y) = 27
                    or background (x, y) = 28 or background (x, y) = 29 or background (x, y) = 37 or background (x, y) = 38 or background (x, y) = 40 or background (x, y) = 41
                    or background (x, y) = 43 or background (x, y) = 44 or background (x, y) = 45 or background (x, y) = 46 or background (x, y) = 47 or background (x, y) = 48
                    or background (x, y) = 49 or background (x, y) = 53 or background (x, y) = 54 or background (x, y) = 55 or background (x, y) = 56 or background (x, y) = 57
                    or background (x, y) = 58 or background (x, y) = 73 or background (x, y) = 76 or background (x, y) = 18 or background (x, y) = 19 or background (x, y) = 20
                    or background (x, y) = 21 or background (x, y) = 59 or background (x, y) = 60 or background (x, y) = 80 or background (x, y) = 81 or background (x, y) = 82
                    or background (x, y) = 83 or background (x, y) = 84 or background (x, y) = 85 or background (x, y) = 86 or background (x, y) = 87 or background (x, y) = 88
                    or background (x, y) = 89 or background (x, y) = 90 or background (x, y) = 91 or background (x, y) = 92 or background (x, y) = 94 or background (x, y) = 108
                    or background (x, y) = 96 or background (x, y) = 96 or background (x, y) = 99 or background (x, y) = 100 or background (x, y) = 101 or background (x, y) = 107
                    or background (x, y) = 98 or background (x, y) = 109 or background (x, y) = 104 or background (x, y) = 114 or background (x, y) = 115 or background (x, y) = 113
                    or background (x, y) = 112 or background (x, y) = 120 or background (x, y) = 121 or background (x, y) = 122 or background (x, y) = 123 or background (x, y) = 124
                    or background (x, y) = 127 then
                Draw.FillBox (i, j, i + 32, j + 32, 245)
            end if
            if background (x, y) = 14 or background (x, y) = 104 then
                Draw.FillBox (i, j, i + 32, j + 32, 230)
            end if
            if background (x, y) = 42 then
                Draw.FillBox (i + 16, j, i + 32, j + 32, 245)
            end if
            if background (x, y) = 72 or background (x, y) = 93 then
                Draw.FillBox (i, j, i + 32, j + 16, 240)
            end if
            if background (x, y) = 95 then
                if y ~= 10 then
                    if background (x, y + 1) = 95 then
                        Draw.FillBox (i + 8, j + 8, i + 32, j + 24, 235)
                    end if
                else
                    Draw.FillBox (i + 8, j + 8, i + 24, j + 24, 235)
                end if
                if y ~= 1 then
                    if background (x, y - 1) = 95 then
                        Draw.FillBox (i, j + 8, i + 32, j + 24, 235)
                    else
                        Draw.FillBox (i + 8, j + 8, i + 24, j + 24, 235)
                    end if
                end if
            end if
            i += 32
        end for
        j -= 32
    end for
end barrier

procedure receivebackgroundinfo
    file := "Levels/" + intstr (choice) + ".dat"
    open : input, file, get
    for x : 1 .. 8
        for y : 1 .. 10
            get : input, background (x, y)
        end for
    end for
end receivebackgroundinfo

procedure recievesecondaryinfo
    file := "Levels/" + intstr (choice) + ".dat"
    open : input, file, get
    for x : 1 .. 8
        for y : 1 .. 10
            get : input, secondary (x, y)
        end for
    end for
    close (input)
end recievesecondaryinfo

procedure drawconsole
    var displayfull, outputx : int
    Pic.Draw (console (1), 0, 0, picCopy)
    Pic.Draw (positioning (1, 1).picture, 16, 4, picMerge)
    Pic.Draw (positioning (1, 2).picture, 96, 4, picMerge)
    displayfull := health div 2
    outputx := 210
    for b : 1 .. healthtotal
        if b = 228 then
                choice := choice + 16
                recievesecondaryinfo
                switchup
                playery := 2
                secondarytoback
                barrier
            end if
            if playery  10 then
                if player = 21 then
                    player := 22
                elsif player = 22 then
                    player := 23
                else
                    player := 1
                end if
            end if
            if flippingpics > 10 then
                flippingpics := 0
            else
                flippingpics += 1
            end if
            drawbackground
            Pic.Draw (playerpics (player), playerx, playery, picMerge)
            View.Update
            delay (7)
        end loop
    end if
end ledgefalling

procedure beinghurt
    health -= 1
    if health  1 then
            playerx := deathpointx
            playery := deathpointy
        end if
        beinghurt
    end if
end holefall
procedure startmenu
    var choosex, choosey, currentarray1, currentarray2, x1, y1, temp : int
    choosex := 12
    choosey := 210
    drawbackground
    currentarray1 := 2
    currentarray2 := 1
    for x : 1 .. 256 by 3
        drawbackground
        Pic.Draw (console (4), 0, -256 + x, picCopy)
        View.Update
    end for
    delay (20)
    cls
    loop
        Input.KeyDown (press)
        Draw.FillBox (0, 0, 500, 500, white)
        Pic.Draw (console (3), 0, 0, picCopy)
        Pic.Draw (console (2), choosex, choosey, picMerge)
        Pic.Draw (positioning (1, 1).picture, 16, 256, picMerge)
        Pic.Draw (positioning (1, 2).picture, 96, 256, picMerge)
        if press (KEY_UP_ARROW) then
            if currentarray1 > 2 then
                choosey := choosey + 50
                currentarray1 := currentarray1 - 1
            end if
        end if
        if press (KEY_DOWN_ARROW) then
            if currentarray1 < 6 then
                choosey := choosey - 50
                currentarray1 := currentarray1 + 1
            end if
        end if
        if press (KEY_RIGHT_ARROW) then
            if currentarray2 = 1 then
                choosex := choosex + 63
                currentarray2 := currentarray2 + 1
            end if
        end if
        if press (KEY_LEFT_ARROW) then
            if currentarray2 = 2 then
                choosex := choosex - 63
                currentarray2 := currentarray2 - 1
            end if
        end if
        if press (KEY_CTRL) then
            temp := positioning (currentarray1, currentarray2).picture
            positioning (currentarray1, currentarray2).picture := positioning (1, 1).picture
            positioning (1, 1).picture := temp
            temp := positioning (currentarray1, currentarray2).item
            positioning (currentarray1, currentarray2).item := positioning (1, 1).item
            positioning (1, 1).item := temp
            delay (100)
        end if
        if press (KEY_ALT) then
            temp := positioning (currentarray1, currentarray2).picture
            positioning (currentarray1, currentarray2).picture := positioning (1, 2).picture
            positioning (1, 2).picture := temp
            temp := positioning (currentarray1, currentarray2).item
            positioning (currentarray1, currentarray2).item := positioning (1, 2).item
            positioning (1, 2).item := temp
            delay (100)
        end if
        exit when press (KEY_ENTER)
        x1 := 12
        y1 := 260
        for i : 2 .. 6
            y1 -= 50
            x1 := 12
            for j : 1 .. 2
                Pic.Draw (positioning (i, j).picture, x1, y1, picMerge)
                x1 += 63
            end for
        end for
        View.Update
        delay (80)
    end loop
    for x : 1 .. 256 by 3
        drawbackground
        Pic.Draw (console (4), 0, 0 - x, picCopy)
        Pic.Draw (positioning (1, 1).picture, 12, 258 - x, picMerge)
        Pic.Draw (positioning (1, 2).picture, 92, 258 - x, picMerge)
        View.Update
    end for
end startmenu

weaponmovementcounter := 0

procedure buttonpresses (var current, whichbutton : int)
    var number1, number2, bushslash, changepicx, changepicy : int
    if positioning (1, whichbutton).item = 1 then
        shieldmove := 1
    elsif positioning (1, whichbutton).item = 2 then
        barrier
        if current = 1 or current = 5 then
            number1 := 1
            number2 := 4
            if whatdotcolor (playerx + 53, playery + 12) = 230 then
                bushslash := 1
            else
                bushslash := 0
            end if
            if whatdotcolor (playerx + 53, playery + 12) = 230 or whatdotcolor (playerx + 53, playery + 17) = 230 or whatdotcolor (playerx + 53, playery + 23) = 230 then
                bushslash := 1
                j := 256
                for y : 1 .. 8
                    i := 0
                    for x : 1 .. 10
                        if playerx + 53 >= i and playerx + 53 = j - 32 and playery + 12 = j - 32 and playery + 17 = j -
                                32 and playery + 23 = i and playerx + 75 = i and playerx + 70 = i and playerx + 65 = j -
                                32 and playery + 37 = i and playerx + 36 = j - 32 and playery + 80 = j - 32 and playery + 75 = j -
                                32 and playery + 70 = i and playerx + 10 = i and playerx + 15 = i and playerx + 20 = j -
                                32 and playery + 37 = 228 then
            choice := choice + 16
            recievesecondaryinfo
            switchup
            playery := 2
            deathpointx := playerx
            deathpointy := playery
        elsif whatdotcolor (playerx + 35, playery + 50) ~= 245 and whatdotcolor (playerx + 53, playery + 50) ~= 245 and whatdotcolor (playerx + 35, playery + 50) ~= 230 and whatdotcolor (playerx + 
            53, playery + 50) ~= 230 then
            if shieldmove = 1 then
                temp1 := 11
                temp2 := 27
            else
                temp1 := 3
                temp2 := 7
            end if
            playery += 2
            movementcounter += 1
        end if
    end if
    if press (KEY_DOWN_ARROW) then
        if playery = 263 then
            choice := choice + 1
            recievesecondaryinfo
            switchright
            playerx := -30
            deathpointx := playerx + 5
            deathpointy := playery
        elsif whatdotcolor (playerx + 58, playery + 35) ~= 245 and whatdotcolor (playerx + 58, playery + 48) ~= 245 and whatdotcolor (playerx + 58, playery + 35) ~= 230 and whatdotcolor (playerx +
                58, playery + 48) ~= 230 then
            if press (KEY_UP_ARROW) then
            elsif press (KEY_DOWN_ARROW) then
            else
                if shieldmove = 1 then
                    temp1 := 10
                    temp2 := 24
                else
                    temp1 := 2
                    temp2 := 6
                end if
                playerx += 2
                movementcounter += 1
            end if
        end if
    end if
    if press (KEY_LEFT_ARROW) then
        if playerx  10 then
        if current = num1 then
            current := num2
            lastpicture := num2
        elsif player = num2 then
            current := num1
            lastpicture := num1
        end if
    end if
    if movementcounter > 10 then
        movementcounter := 0
    end if
end movement

procedure drawbackground
    Draw.FillBox (0, 0, 500, 500, white)
    j := 256
    for x : 1 .. 8
        i := 0
        for y : 1 .. 10
            if watercounter > 30 then
                if background (x, y) = 77 then
                    background (x, y) := 78
                elsif background (x, y) = 78 then
                    background (x, y) := 79
                elsif background (x, y) = 79 then
                    background (x, y) := 77
                end if
                if background (x, y) = 116 then
                    background (x, y) := 117
                elsif background (x, y) = 117 then
                    background (x, y) := 118
                elsif background (x, y) = 118 then
                    background (x, y) := 119
                elsif background (x, y) = 119 then
                    background (x, y) := 116
                end if
                if background (x, y) = 120 then
                    background (x, y) := 121
                elsif background (x, y) = 121 then
                    background (x, y) := 122
                elsif background (x, y) = 122 then
                    background (x, y) := 123
                elsif background (x, y) = 123 then
                    background (x, y) := 120
                end if
            end if
            if flowercounter > 20 then
                if background (x, y) = 36 then
                    background (x, y) := 102
                elsif background (x, y) = 102 then
                    background (x, y) := 103
                elsif background (x, y) = 103 then
                    background (x, y) := 128
                elsif background (x, y) = 128 then
                    background (x, y) := 36
                end if
            end if
            Pic.Draw (pic (background (x, y)), i, j, picCopy)
            i += 32
        end for
        j -= 32
    end for
    if watercounter > 30 then
        watercounter := 0
    else
        watercounter += 1
    end if
    if flowercounter > 20 then
        flowercounter := 0
    else
        flowercounter += 1
    end if
end drawbackground


procedure barrier
    j := 256
    for x : 1 .. 8
        i := 0
        for y : 1 .. 10
            if background (x, y) = 13 or background (x, y) = 14 or background (x, y) = 30 or background (x, y) = 31 or background (x, y) = 32 or background (x, y) = 51 or
                    background (x, y) = 52 or background (x, y) = 61 or background (x, y) = 62 or background (x, y) = 63 or background (x, y) = 64 or background (x, y) = 65 or
                    background (x, y) = 66 or background (x, y) = 67 or background (x, y) = 68 or background (x, y) = 69 or background (x, y) = 70 or background (x, y) = 71
                    or background (x, y) = 74 or background (x, y) = 75 or background (x, y) = 15 or background (x, y) = 16 or background (x, y) = 17 or background (x, y) = 106
                    or background (x, y) = 22 or background (x, y) = 23 or background (x, y) = 24 or background (x, y) = 25 or background (x, y) = 26 or background (x, y) = 27
                    or background (x, y) = 28 or background (x, y) = 29 or background (x, y) = 37 or background (x, y) = 38 or background (x, y) = 40 or background (x, y) = 41
                    or background (x, y) = 43 or background (x, y) = 44 or background (x, y) = 45 or background (x, y) = 46 or background (x, y) = 47 or background (x, y) = 48
                    or background (x, y) = 49 or background (x, y) = 53 or background (x, y) = 54 or background (x, y) = 55 or background (x, y) = 56 or background (x, y) = 57
                    or background (x, y) = 58 or background (x, y) = 73 or background (x, y) = 76 or background (x, y) = 18 or background (x, y) = 19 or background (x, y) = 20
                    or background (x, y) = 21 or background (x, y) = 59 or background (x, y) = 60 or background (x, y) = 80 or background (x, y) = 81 or background (x, y) = 82
                    or background (x, y) = 83 or background (x, y) = 84 or background (x, y) = 85 or background (x, y) = 86 or background (x, y) = 87 or background (x, y) = 88
                    or background (x, y) = 89 or background (x, y) = 90 or background (x, y) = 91 or background (x, y) = 92 or background (x, y) = 94 or background (x, y) = 108
                    or background (x, y) = 96 or background (x, y) = 96 or background (x, y) = 99 or background (x, y) = 100 or background (x, y) = 101 or background (x, y) = 107
                    or background (x, y) = 98 or background (x, y) = 109 or background (x, y) = 104 or background (x, y) = 114 or background (x, y) = 115 or background (x, y) = 113
                    or background (x, y) = 112 or background (x, y) = 120 or background (x, y) = 121 or background (x, y) = 122 or background (x, y) = 123 or background (x, y) = 124
                    or background (x, y) = 127 then
                Draw.FillBox (i, j, i + 32, j + 32, 245)
            end if
            if background (x, y) = 14 or background (x, y) = 104 then
                Draw.FillBox (i, j, i + 32, j + 32, 230)
            end if
            if background (x, y) = 42 then
                Draw.FillBox (i + 16, j, i + 32, j + 32, 245)
            end if
            if background (x, y) = 72 or background (x, y) = 93 then
                Draw.FillBox (i, j, i + 32, j + 16, 240)
            end if
            if background (x, y) = 95 then
                if y ~= 10 then
                    if background (x, y + 1) = 95 then
                        Draw.FillBox (i + 8, j + 8, i + 32, j + 24, 235)
                    end if
                else
                    Draw.FillBox (i + 8, j + 8, i + 24, j + 24, 235)
                end if
                if y ~= 1 then
                    if background (x, y - 1) = 95 then
                        Draw.FillBox (i, j + 8, i + 32, j + 24, 235)
                    else
                        Draw.FillBox (i + 8, j + 8, i + 24, j + 24, 235)
                    end if
                end if
            end if
            i += 32
        end for
        j -= 32
    end for
end barrier

procedure receivebackgroundinfo
    file := "Levels/" + intstr (choice) + ".dat"
    open : input, file, get
    for x : 1 .. 8
        for y : 1 .. 10
            get : input, background (x, y)
        end for
    end for
end receivebackgroundinfo

procedure recievesecondaryinfo
    file := "Levels/" + intstr (choice) + ".dat"
    open : input, file, get
    for x : 1 .. 8
        for y : 1 .. 10
            get : input, secondary (x, y)
        end for
    end for
    close (input)
end recievesecondaryinfo

procedure drawconsole
    var displayfull, outputx : int
    Pic.Draw (console (1), 0, 0, picCopy)
    Pic.Draw (positioning (1, 1).picture, 16, 4, picMerge)
    Pic.Draw (positioning (1, 2).picture, 96, 4, picMerge)
    displayfull := health div 2
    outputx := 210
    for b : 1 .. healthtotal
        if b = 228 then
                choice := choice + 16
                recievesecondaryinfo
                switchup
                playery := 2
                secondarytoback
                barrier
            end if
            if playery  10 then
                if player = 21 then
                    player := 22
                elsif player = 22 then
                    player := 23
                else
                    player := 1
                end if
            end if
            if flippingpics > 10 then
                flippingpics := 0
            else
                flippingpics += 1
            end if
            drawbackground
            Pic.Draw (playerpics (player), playerx, playery, picMerge)
            View.Update
            delay (7)
        end loop
    end if
end ledgefalling

procedure beinghurt
    health -= 1
    if health  1 then
            playerx := deathpointx
            playery := deathpointy
        end if
        beinghurt
    end if
end holefall
procedure startmenu
    var choosex, choosey, currentarray1, currentarray2, x1, y1, temp : int
    choosex := 12
    choosey := 210
    drawbackground
    currentarray1 := 2
    currentarray2 := 1
    for x : 1 .. 256 by 3
        drawbackground
        Pic.Draw (console (4), 0, -256 + x, picCopy)
        View.Update
    end for
    delay (20)
    cls
    loop
        Input.KeyDown (press)
        Draw.FillBox (0, 0, 500, 500, white)
        Pic.Draw (console (3), 0, 0, picCopy)
        Pic.Draw (console (2), choosex, choosey, picMerge)
        Pic.Draw (positioning (1, 1).picture, 16, 256, picMerge)
        Pic.Draw (positioning (1, 2).picture, 96, 256, picMerge)
        if press (KEY_UP_ARROW) then
            if currentarray1 > 2 then
                choosey := choosey + 50
                currentarray1 := currentarray1 - 1
            end if
        end if
        if press (KEY_DOWN_ARROW) then
            if currentarray1 < 6 then
                choosey := choosey - 50
                currentarray1 := currentarray1 + 1
            end if
        end if
        if press (KEY_RIGHT_ARROW) then
            if currentarray2 = 1 then
                choosex := choosex + 63
                currentarray2 := currentarray2 + 1
            end if
        end if
        if press (KEY_LEFT_ARROW) then
            if currentarray2 = 2 then
                choosex := choosex - 63
                currentarray2 := currentarray2 - 1
            end if
        end if
        if press (KEY_CTRL) then
            temp := positioning (currentarray1, currentarray2).picture
            positioning (currentarray1, currentarray2).picture := positioning (1, 1).picture
            positioning (1, 1).picture := temp
            temp := positioning (currentarray1, currentarray2).item
            positioning (currentarray1, currentarray2).item := positioning (1, 1).item
            positioning (1, 1).item := temp
            delay (100)
        end if
        if press (KEY_ALT) then
            temp := positioning (currentarray1, currentarray2).picture
            positioning (currentarray1, currentarray2).picture := positioning (1, 2).picture
            positioning (1, 2).picture := temp
            temp := positioning (currentarray1, currentarray2).item
            positioning (currentarray1, currentarray2).item := positioning (1, 2).item
            positioning (1, 2).item := temp
            delay (100)
        end if
        exit when press (KEY_ENTER)
        x1 := 12
        y1 := 260
        for i : 2 .. 6
            y1 -= 50
            x1 := 12
            for j : 1 .. 2
                Pic.Draw (positioning (i, j).picture, x1, y1, picMerge)
                x1 += 63
            end for
        end for
        View.Update
        delay (80)
    end loop
    for x : 1 .. 256 by 3
        drawbackground
        Pic.Draw (console (4), 0, 0 - x, picCopy)
        Pic.Draw (positioning (1, 1).picture, 12, 258 - x, picMerge)
        Pic.Draw (positioning (1, 2).picture, 92, 258 - x, picMerge)
        View.Update
    end for
end startmenu

weaponmovementcounter := 0

procedure buttonpresses (var current, whichbutton : int)
    var number1, number2, bushslash, changepicx, changepicy : int
    if positioning (1, whichbutton).item = 1 then
        shieldmove := 1
    elsif positioning (1, whichbutton).item = 2 then
        barrier
        if current = 1 or current = 5 then
            number1 := 1
            number2 := 4
            if whatdotcolor (playerx + 53, playery + 12) = 230 then
                bushslash := 1
            else
                bushslash := 0
            end if
            if whatdotcolor (playerx + 53, playery + 12) = 230 or whatdotcolor (playerx + 53, playery + 17) = 230 or whatdotcolor (playerx + 53, playery + 23) = 230 then
                bushslash := 1
                j := 256
                for y : 1 .. 8
                    i := 0
                    for x : 1 .. 10
                        if playerx + 53 >= i and playerx + 53 = j - 32 and playery + 12 = j - 32 and playery + 17 = j -
                                32 and playery + 23 = i and playerx + 75 = i and playerx + 70 = i and playerx + 65 = j -
                                32 and playery + 37 = i and playerx + 36 = j - 32 and playery + 80 = j - 32 and playery + 75 = j -
                                32 and playery + 70 = i and playerx + 10 = i and playerx + 15 = i and playerx + 20 = j -
                                32 and playery + 37 