*** Treasure Seeker ***
Developed in October and November of 2021. Released 9th November 2021.
(c) with a Attribution-NonCommercial 4.0 International creative commons license.
'Treasure Seeker' is a game for the Vic-20 retro-computer with a 3K memory-expansion.
Game created by Don McPherson 'Mystic Sword'. Contact email: mystixxx@protonmail.com 

Some of my pages you can check-out:
* This will be for some of my games or other various projects: mysticsword.itch.io
* My YouTube channel, 'Mystic Sword Gaming': youtube.com/mysticsword or youtube.com/c/mysticsword 
* Some of my safe / 'sfw' art and where one could help support my efforts: buymeacoffee.com/mystix 
* More of my art (though some 'NSFW' / for 18+. Links on my profile or in the art descriptions there for even more of my art): deviantart.com/lonewolfdon 

~ Game Story:
Adventurer? Treasure-Hunter? Hero? Yes! You can be all of the above. :)
The brave adventurer finds some treasure maps to Captain Blarg's hidden-away and all but forgotten pirate-haven of Ye-Land-o-Plenty!
Captain Blarg was a pirate that loved his rum and loved his gold (aye, but don't all pirates?). 
Everywhere he and his crew went, they gathered what gold they could manage to get their hands on. And hey, more gold meant being able to buy more barrels-o-rum!
Rumor has it that one hot day rum was running low on Ye-Land-o-Plenty and a mutiny occurred. During the furious fight that ensued between Captain Blarg (along with his handful of still loyal men) and the rest of the crew that wanted to mutiny so they could steal the horde of collected gold (that the Captain kept in his house for safe-keeping) so they could do a run to a nearby island to buy more barrels-o-rum (heck, the Captain was planning to do that anyways, but an unruly bunch of pirates being unruly pirates and all... And well, so things go.), that many gold coins got scattered about the whole place. Though the Captain was taken by surprise and defeated that day, he managed to put a voodoo curse upon the mutinous crew to forever shamble about on Ye-Land-o-Plenty. And thus, though there be lots of gold-coins to be found for a brave Treasure-Seeker on Ye-Land-o-Plenty, there are many unruly (and perhaps drunken) skeletons (what's left of the crew after a couple of hundred years later) that wander about in their never-ending search for gold. 

~ Some info about my developing this game:
The good 'ol Vic-20 was the first computer I owned (many years ago now, decades even). It helped to ignite and grow my life-long interest and passion for computers, games / gaming and technology. Way back then, I taught myself how to program BASIC on it and even developed several home-brew games for it (though that old Vic-20, along with all my collection of stuff for it, games, hardware, etc.. are all long since gone). Anyways, watching some retro-gaming and retro-tech vids on YouTube (which I still do some retro-gaming via emulator software and occasionally put some retro-gaming vids I make on my YouTube channel) re-awoke, my interest and nostaligic feelings for the Vic-20. Seeing that there's still an active community for the Vic-20, and even some new home-brew games being made for it, I felt inspired to perhaps 'relive some of my youth' and decided to try my hand to make a new game for the Vic-20 system. So, though I needed to re-learn much of it (programming in Vic-20 BASIC), I dove right in and much of it has since come back to me. 

This game was developed and tested with VICE emulator ,using Vic-20 with 3K memory-expansion settings (and I pretty much used almost every available byte of that very limited memory).
I programmed this game in Vic-20 BASIC. Anyone interest is welcome to look at the code or use parts or ideas of it as they like for their own programs (just not to claim or sell this Treasure Seeker game as their own works). 

Included towards the bottom of this read-me I'll include some rough details of the variables I used. This was for my own reference when developing this game, so it might not be the best organized or detailed. I'll also include the full BASIC code for the game. I figured I'll include it for those that might be interested. 

Creating this game has been a good learning experience and it was a fun challenge for myself to do. 
Overall I'm quite pleased with how this game turned-out (especially considering the limitations of a Vic-20, but for me that's part of the appeal of developing a game for it). 
Oh yeah, a shout-out to the community of Vic-20 enthusiasts on the Vic-20 Denial forums (they 'deny' to let the Vic-20 to be forgotten) for helping to keep interest going for that magical friendly computer :)
http://sleepingelephant.com/ipw-web/bulletin/bb/index.php
My profile, 'MysticSword', there:
http://sleepingelephant.com/ipw-web/bulletin/bb/memberlist.php?mode=viewprofile&u=14210  

~ Requirements:
     *The VICE emulator software, vice-emu.sourceforge.io ,with a Vic-20 with 3K memory-expansion setting (seems to work fine in either NTSC or PAL mode). 
 ...OR... 
If having a real Vic-20 with 3K memory-expansion, it could be tried on that (though as I programmed this game, I did not have a real Vic-20 computer to test this game on. However, since release of this game, 'Grondinm' (a Member on the Vic-20 Denial forums) who owns a real Vic-20 with a 3K memory-expansion, has played this game with good success on his Vic-20 computer).

     *Requires a joystick to play (if use VICE emulator, in the joystick settings one can choose to use their own game-controller plugged into their computer, or set keys that would emulate using a joystick).  

~ How to play:
If using the VICE emulator software, upon having the settings for a Vic-20 with 3K memory-expansion and joystick options setup (I'd suggest that within the VICE software, after selecting the according settings to then do a 'reset' from the menu's File options to ensure the settings takes place), one could then simply drag-and-drop the Treasure Seeker PRG file into the main VICE windows (which is the way I do it) and it should then automatically load and run. 
     If using a real Vic-20, then I'm guessing it would be the normal process you would normally load and run such a file (and entering a RUN command to start the game).
*Update: A .d64 format of this game has now been included for those that might prefer to use that file-format version instead.

On the sparse title / start screen (I didn't have any more available memory to spare for anything fancy there), you'll be prompted to enter a number, 1, 2 or 3, for the Challenge Level. 
1 = exit 3 maps. 
2 = exit 5 maps.
3 = exit 10 maps.
The skeleton-key-holder will be increased per map #, so for example; On map # 1, the 1st skeleton appearing will be the key-holder, on map #2 the 2nd skeleton will be the key holder, on map #3 the 3rd skeleton, etc... Up to as high as map #10 would be the 10th skeleton being the key-holder. The according skeleton-key-holder of a map needs to be defeated and then it will drop the key. 
After entering in a Challenge Level number,  the game will then proceed to set-up a map to play on.

The upper two-lines of the game screen has a status-bar that shows the numbers and items for some things, or occasionally to give a brief message / instructions to the player.

The normal status shows as: M = Map number currently on. Health (the heart symbols, 3 max). Dynamite / TNT (4 max).
G = Gold currently in possession. SK = Skeletons defeated. 

The player will start in a location towards the upper-left of the map. (I've programmed it so that when the Player first appears on a new map that a couple of coins will always be close by in case of low health and/or dynamite and Player's gold was low or out). 

To move the Player, push in the desired direction on the joystick (as long as that direction isn't blocked with something, then the Player will move). 

Pressing the fire-button anywhere on the map (when not using the camp) will give an option to place a stick of dynamite (well, that is if the Player is still holding dynamite, otherwise an 'EMPTY' message will flash). A message will appear, "DIRECTION TO PLACE. FIRE TO CANCEL.". To cancel the action of placing dynamite, press the fire-button. Otherwise press up, down, left or right to place a stick of dynamite at that according spot. 
     When dynamite is set, the location will become a purple-color to indicate where it's set. Then a brief counter will begin (with a message showing of "3"... "2"... "1"... And "BOOM!" accordingly) with about 3 seconds before it explodes. 
     The counter gives the Player a chance to get out of the explosion's blast range, which is a 3 by 3 grid/area (think of a number-keypad, which is a 3 by 3 square; 5 would be the center, where the dynamite was placed, and then numbers 1 through 9 is the full blast-area of the explosion). When the dynamite explodes, the sound of the explosion can be heard and an explosion-fire is represented (of course, some imagination is required). Anything within the explosion's 3x3 blast area will be blown-up; rocks, ground, skeletons or the Player-character (if the Player-character is caught in the explosion, then 1 health / heart is lost. If all health is lost, then that would result in a game-over). 
    The skeletons temporarily won't move or attack when dynamite is placed and until the resulting explosion occurs. Perhaps they are beguiled and entranced by the sparkling and smell of the burning-fuse, reminding them of the good'ol'days of cannons about to fire in battle (though in actuality it was programming limitations and choice as to why the skeletons don't move or attack while the countdown occurs. I also wanted to give the Player a chance to actually defeat a skeleton enemy when placing a stick of dynamite and wanting to get the skeleton within the 3x3 blast area, rather than having the skeleton perhaps randomly move out of the blast-zone).  

The spade looking symbol, at the upper-left of the map, represents a camp that the player can use to buy either health or dynamite / TNT. When next to the camp, press towards the direction of the camp to access it. If the Player has at least 1 gold, then the status message will show; "UP HEALTH. DOWN TNT. FIRE CANCEL". If health or dynamite is already full, then the Player won't be able to buy any more of those beyond the max allowed (3 health and 4 dynamite / TNT). 
Each item, either health or dynamite (TNT), costs 1 gold. Press in up direction to buy a health. Press in the down direction to buy a stick of dynamite (TNT). Pressing the fire-button would cancel and exit the camp. Due to the limitations of the memory and the way I needed to program things to help keep the program as small and tight as possible, only one item at a time can be bought (so if wanting to buy multiple items, then you would need to re-access the camp again). 

At the upper-right of the map there is an X looking symbol. This represents the map's exit door, but it requires a key. To use, simply have the Player character next to the door and push in the directions towards it (though without a key, the door remains locked and the Player can't go in). 

There are some gold-coins (the treasure) scattered throughout the map. Simply walk onto a gold-coin to get it (it will be added to the Gold number, 'G', in the status bar).
Buried /or hidden gold-coins are sometimes revealed when using dynamite to explode an area or when dynamite is used on a skeleton enemy.

There is one skeleton enemy at a time on the map (in-part due to various limitations, plus more than one at a time would cause significant slow-down in this programmed-in-Vic-20-BASIC game). On a new-map the Player will appear in the upper-left area of the map (just under the camp). The first skeleton will appear towards the lower-right of the map. This first skeleton will have the key for the map-door, so the Player will need to defeat it if wanting to be able to get the key. Each time a skeleton enemy is defeated, then a new one appears (If the Player is more towards the bottom portion of the map, then the new skeleton would appear towards the upper-left. If the player is more towards the upper portion of the map, then the new skeleton would appear towards the lower-right. I did it this way in order to hopefully give the Player a bit of 'breathing-space' between their location and a newly appearing skeleton).
     Skeleton's movements includes some mix of random directions (though they will of course be blocked by rocks in their way), but generally will move towards the Player. When a skeleton is next to the Player, then there is a chance the skeleton might attack and hit the Player, so be careful. If a skeleton does land a hit on the Player (and thus causing the Player to lose 1 health / heart), then there is a brief 'escape time' that occurs (in which the skeleton pauses moving or attacking) that gives the Player a couple of seconds to try and get out of attack-range or perhaps to set a stick of dynamite in place if they wanted (to perhaps to try to defeat the skeleton with an explosion). 

Aside from the first skeleton of a map that drops a key when defeated, the following skeletons appearing on a map will drop treasure (gold-coins) when they are defeated. Typically they will drop 3 gold-coins, but occasionally they might drop more. So, trying to get close enough to set dynamite in place to defeat an enemy can be a risk, but it can also give a good reward. 

There can be a bit of strategy involved in playing this game; the Player can use the rocks / boulders as a barrier between them and a skeleton, so in that way when / if a skeleton moves towards the Player, if a rock is between the skeleton and Player, then it won't be close enough to attack the Player, however the Player might still be close enough to the skeleton to be able to place a stick of dynamite to then be able to catch the skeleton within the 3x3 explosion area. 

Also, the Player can think, if they are getting low on dynamite, if might it be better to then go back to camp to re-stock, or to take a chance to continue with low or no amount of dynamite (thus perhaps leaving the Player more at risk). 

There is a fence / border around the top, bottom, left and right edges of the map (which magically repairs itself if caught in the blast-area of an explosion) that prevents the Player, or skeletons, from wandering off the map along the top or bottom or left or right sides. 

Where to place a stick of dynamite can have some strategy too of course; trying to defeat a skeleton enemy, in clearing a certain area and to make a new path to where the Player wants to go and trying not to place in a spot so that an explosion blast might blow-away some already revealed gold-coins. 

~Goals of the game
The goals of the game can be varied and according to what the Player wants;
How many maps (determined by the Challenge Level) does the Player want to explore?
Maybe try to fully clear all rocks from a map?
Perhaps to see how much gold one can be carrying after playing through a designated number of maps?
Or seeing how many skeletons can be defeated for however many maps the Player decides.
Maybe a friend can be challenged; "How much gold and/or skeletons defeated for a determined number of maps?"
It's not really a specific set goal for 'winning' the game, but for whatever a Player decides upon when playing.
Though for me, I think it comes down to having some enjoyment and fun when playing the game.

~ Saving
* Due to limitations (and my current lack of knowledge of how to implement), I haven't included any save option into this game.
However, if playing on the VICE emulator software, one could easily make a save-state 'snapshot' at any time.
Anyways, the game is more of a casual type.

~ THANKS! :)
Thanks for playing my game and for your kind interest.
If you enjoyed this game, I'd be happy for any feedback. 
Making this game took me a lot of time and work, but I enjoyed doing it. If there seems to be some interest and support for it, I may consider to make more games for the Vic-20 and/or PC.
And though I offer this game for free, if you wanted to donate a little something (though there's no such obligation and there no worries if unable to), you can do so on my pages at either: mysticsword.itch.io or buymeacoffee.com/mystix 
,it's greatly appreciated! 

Best wishes, - Don.
PS: If wanting to contact me, can do so at my pages / links I mentioned, 
or feel welcome to email me at: mystixxx@protonmail.com
~

~Some extra stuff (such as my variables notes to myself as I developed this game):

VARIABLES:
bm= boom / dynamite set,
bt= boom timer
ca = camp
cr = crash / collision
cu = color-for-graphic-addition-number-for-screen-poke
dc = dynamite cancel
do = door message 'need key' if 1
dl = dynamite-location
dy = dynamite amount (max 4)
e1 = after explosion or new map, if value set to 1 for status-update to draw left and right side borders.
ea = east (right direction)
g = exploshin graphic number
gp = gold-pieces
hc= hit counter : after skeleton hits, gives player a brief chance to evade / move away out of hit range
hk = have key
ht = skeleton hits players (when player beside them)
hp = hit-points  (max 3)
js= joystick status of fire-button, direction or null
ky = key location
m = 8 or 9 character graphic variable for skeleton
ma = map
n = number sometimes used with FOR statements
n1 = number of total maps, from 1 to 10 / used as Challenge Level input initally.
nm = new map
nr = north (up direction)
fi = fire-button
pc = player-character-graphic-number
pl = player-location
r= random number sometimes
r= also for random skeleton hit check if next to player
r= random move check for skeleton 
r= also used temporarily for explosion fire characters 233 and 223
sc = skeleton collision check
sd = skeleton dead
sh = skeleton holder-of-key ; sh=ma 
sk = skeleton (enemy) location
so = south (down direction)
su = status update
tc = treasure counter / amount for setting up gold coins on a new map
tr= treasure
we = west (left direction)
q = skeletons kill count
Sound Variables: V=36878 (Volume): S1=36874 (Sound channel 1):
S2=36875 (Sound channel 2) :S3=36876 (Sound Channel 3) :NO=36877 (Noise) 

~ Full game code in Vic-20 BASIC (and as I used the CMB prog Studio software, ajordison.co.uk ,to help me program this game and how the code appeared in that):

2 POKE36879,236:GOTO800
8 V=36878:S1=36874:S2=36875:S3=36876:NO=36877:GOTO710
18 FI=.:BM=.:BT=.
20 SYS829:IFNM=1THENE1=1:GOTO2016
26 IFBM=1THENBT=BT-1:GOTO38
28 IFBM=0ANDSD=0THEN3010
30 IFPEEK(250)=32ANDPEEK(253)=156THEN500
32 IFPEEK(250)=0THENFI=1
35 IFFI=1ANDDY>0THEN4000
36 IFFI=1THEN392
38 JS=(PEEK(253)):IFJS=156THEN500
50 IFPEEK(250)=32THENFI=.
70 IFJS=152THENNR=1:PC=2:GOTO400
80 IFJS=28THENEA=1:PC=0:GOTO425
90 IFJS=148THENSO=1:PC=3:GOTO440
95 IFJS=140THENWE=1:PC=1:GOTO470
390 GOTO20
392 FORN=1TO10:PRINT"{home}{reverse on}{right*9}{white}empty":FORI=1TO9:NEXT:PRINT"{home}{reverse on}{right*9}{purple}empty":FORI=1TO20:NEXT:NEXT:GOTO18
400 IFNR=1THENCR=(PEEK(PL-22)):IFPL=7747THENCA=1:GOTO6010
402 IFNR=1ANDPL=7766THENDO=1:GOTO6014
415 IFCR=4THEN500
420 IFNR=1ANDCR=7THENPOKEPL,7:POKEPL+CU,5:PL=PL-22:GOTO685
422 IFNR=1ANDCR=6THENPOKEPL,7:POKEPL+CU,5:PL=PL-22:TR=1:GOTO685
425 IFEA=1THENCR=(PEEK(PL+1))
430 IFCR=4THEN500
435 IFEA=1ANDCR=7THENPOKEPL,7:POKEPL+CU,5:PL=PL+1:GOTO685
438 IFEA=1ANDCR=6THENPOKEPL,7:POKEPL+CU,5:PL=PL+1:TR=1:GOTO685
440 IFSO=1THENCR=(PEEK(PL+22))
450 IFCR=4THEN500
460 IFSO=1ANDCR=7THENPOKEPL,7:POKEPL+CU,5:PL=PL+22:GOTO685
465 IFSO=1ANDCR=6THENPOKEPL,7:POKEPL+CU,5:PL=PL+22:TR=1:GOTO685
470 IFWE=1THENCR=(PEEK(PL-1))
475 IFCR=4THENGOTO500
480 IFWE=1ANDCR=7THENPOKEPL,7:POKEPL+CU,5:PL=PL-1:GOTO685
490 IFWE=1ANDCR=6THENPOKEPL,7:POKEPL+CU,5:PL=PL-1:TR=1:GOTO685
500 IFBM=0THEN20
623 IFBM=1THENPOKEDL+CU,4
628 IFBT=20THENPRINT"{home}{reverse on}{right*10}2"
638 IFBT=10THENPRINT"{home}{reverse on}{right*10}1"
648 IFBT=<2THENPRINT"{home}{reverse on}{right*8}boom!":E1=1:GOTO7000
660 GOTO20
685 POKEV,230:FORN=122TO124:POKENO,N:NEXT:POKEV,0:POKENO,0:IFHK>0ANDTR=0THEN710
690 IFHK<1THENIFPL-1=KYORPL-22=KYORPL+1=KYORPL+22=KYTHENHK=1
702 IFHK=1THENPOKEKY,7:POKEKY+CU,5:KY=7721
704 IFTR=1THEN:GP=GP+1:PRINT"{home}{reverse on}{right*15}g";GP
708 IFTR=1ORHK=1THENGOSUB9550:TR=.
709 IFHK=1THENHK=2:SD=0:GOTO2008
710 POKEPL,PC:POKEPL+CU,6:GOTO500
800 POKE55,0:POKE56,29:CLR:HP=3:DY=4
814 PL=7747:CU=30720:NM=1:sh=0:SK=8140:CR=.:PC=2:M=8:HK=0:IFMA>0THEN1500
820 MA=1:FORL=7168TO7247:READV:POKEL,V:NEXT:FORL=7424TO7432:POKEL,0:NEXT
830 PRINT"{clear}treasure seeker -v2.0":PRINT"by don mcpherson":PRINT"'mystic sword'":PRINT"(c)2021"
836 PRINT"{down}challenge level":print"1 = 3 maps":print"2 = 5 maps":print"3 = 10 maps{down}"
844 print"skeleton-key-holder":print"increased per map #{down}":INPUT"1, 2 or 3";N1:IFN1<1ORN1>3THEN830
848 ifn1=3thenn1=10
858 ifn1=2thenn1=5
868 ifn1=1thenn1=3
900 POKE36869,255:DATA12,12,56,44,8,24,40,44,48,48,28,52,16,24,20,52,12,12,8,28,42,28,20,54,48,48,16,56,84,56,40,108
940 DATA56,102,210,109,21,247,126,56,30,24,28,16,16,24,40,56,0,0,24,60,60,24,0,0,170,84,237,54,91,180,90,40
980 DATA24,136,80,106,20,40,68,194,24,17,10,86,40,20,34,67
992 LETB=829:FORK=0TO34:READC:POKEB+K,C:NEXT:DATA169,127,141,34,145,173,32,145,41,128
995 DATA133,253,169,255,141,34,145,173,31,145,41,28,24,101,253,133,253,173,31,145,41,32,133,250,96
1500 FORI=7680TO8185:POKEI,7:POKEI+CU,5:NEXT:FORI=7724TO8185:R=INT(RND(X)*4):IFNOT(R=1)THENPOKEI,4:POKEI+CU,0
1516 NEXT:GOSUB9000
1528 IFTC<22THENR=INT(RND(X)*400):TC=TC+1:N=7769+R:POKEN,6:POKEN+CU,7:POKEN+1,7:POKEN+CU+1,5:IFTC<22THEN1528
1625 TC=0:PRINT"{home}{green}{down*2}ggggg{home}{down*4}ggggg{home}{down*3}gg{yellow}ffff{blue}":GOSUB9000
1642 FORI=8158TO8162:POKEI,7:POKEI+CU,5:NEXT:IFSD=0THENPOKESK,8:POKESK+CU,1:GOTO8
1710 IFBM=1THEN20
1711 IFGP<1THENPRINT"{home}{reverse on}need gold":FORI=1TO960:NEXT:GOTO2016
1720 BY=1:PRINT"{home}{reverse on}up health, down tnt{home}{down}fire cancel":GOTO3600
2000 IFBM=0THEN18
2005 IFSU=0THEN20
2008 POKEPL,PC:POKEPL+CU,6:IFBM=1THENBM=0:R=INT(RND(X)*6):IFR=3THENFORI=0TO2:POKEDL+I,6:POKEDL+I+CU,7:NEXT
2016 GOSUB9000:POKE7725,193:POKE7725+CU,6:POKE7744,214:POKE7744+CU,6
2018 POKE7726,230:POKE7726+CU,0:POKE7743,230:POKE7743+CU,0:PRINT"{home}{reverse on}{purple}m";MA"{home}{down}sk";Q:NM=.
2020 IFHP=3THENPRINT"{home}{reverse on}{right*5}SSS"
2030 IFHP=2THENPRINT"{home}{reverse on}{right*5}SS "
2040 IFHP=1THENPRINT"{home}{reverse on}{right*5}S{space*2}"
2060 IFDY=4THENPRINT"{home}{reverse on}{right*9}BBBB"
2070 IFDY=3THENPRINT"{home}{reverse on}{right*9}BBB "
2080 IFDY=2THENPRINT"{home}{reverse on}{right*9}BB{space*2}"
2090 IFDY=1THENPRINT"{home}{reverse on}{right*9}B{space*3}"
2100 IFDY=0THENPRINT"{home}{reverse on}{right*9}empty"
2110 PRINT"{home}{reverse on}{right*15}g";GP:IFHK>0THENPRINT"{home}{down}{reverse off}{right*20}{yellow}e{purple}"
2120 SU=.:IFCA=1THENCA=.
3000 GOTO18
3010 IFHC>=3THENHC=HC-1:GOTO30
3012 IFHC=<2THENHC=.
3015 R=INT(RND(X)*8):IFR=2ANDPL=SK-1THENHT=1:HC=16
3022 IFR=2ANDPL=SK-22THENHT=1:HC=16
3024 IFR=2ANDPL=SK+1THENHT=1:HC=16
3026 IFR=2ANDPL=SK+22THENHT=1:HC=16
3028 IFHT=1THEN3220
3040 IFSD>0THEN30
3042 SC=(PEEK(SK-1)):IFSC=7ANDR=4THENM=8:POKESK,7:POKESK+CU,5:SK=SK-1:GOTO3200
3045 SC=(PEEK(SK-22)):IFSC=7ANDR=1THENPOKESK,7:POKESK+CU,5:SK=SK-22:GOTO3200
3050 SC=(PEEK(SK+1)):IFSC=7ANDR=2THENM=9:POKESK,7:POKESK+CU,5:SK=SK+1:GOTO3200
3060 SC=(PEEK(SK+22)):IFSC=7ANDR=3THEN:POKESK,7:POKESK+CU,5:SK=SK+22:GOTO3200
3200 R=INT(RND(X)*5):IFR=2THEN3202
3201 GOTO3210
3202 SC=(PEEK(SK-1)):IFSC=7ANDPL<SKTHENM=8:POKESK,7:POKESK+CU,5:SK=SK-1
3204 SC=(PEEK(SK+1)):IFSC=7ANDPL>SKTHENM=9:POKESK,7:POKESK+CU,5:SK=SK+1
3206 SC=(PEEK(SK-22)):IFSC=7ANDPL<SKTHENPOKESK,7:POKESK+CU,5:SK=SK-22
3208 SC=(PEEK(SK+22)):IFSC=7ANDPL>SKTHENPOKESK,7:POKESK+CU,5:SK=SK+22
3210 POKESK,M:POKESK+CU,1
3220 IFHT=1THEN7900
3500 GOTO30
3600 SYS829:JS=(PEEK(253)):IFBY=0THEN2016
3602 IFPEEK(250)=0THENBY=.
3612 IFJS=152ANDHP<3THENHP=HP+1:GP=GP-1:BY=0
3622 IFJS=148ANDDY<4THENDY=DY+1:GP=GP-1:BY=0
3700 GOTO3600
4000 SU=1:PRINT"{home}{reverse on}direction to place{space*4}{home}{down}fire cancel":FORI=1TO140:NEXT
4220 SYS829:JS=(PEEK(253)):IFPEEK(250)=0THEN2016
4280 IFJS=148THENDL=PL+22:POKEDL+CU,4:GOTO6000
4285 IFJS=152THENDL=PL-22:POKEDL+CU,4:GOTO6000
4295 IFJS=28THENDL=PL+1:POKEDL+CU,4:GOTO6000
4305 IFJS=140THENDL=PL-1:POKEDL+CU,4:GOTO6000
4460 GOTO4220
4480 GOSUB9000
6000 BM=1:BT=30:DY=DY-1
6010 GOSUB9000:IFCA=1THEN1710
6012 PRINT"{home}{reverse on}{right*10}3":FORI=1TO199:NEXT:GOTO20
6014 IFHK>0ANDMA=N1THEN8020
6016 IFHK>0THENMA=MA+1:SD=0:PRINT"{home}{down}{blue}{right*7}@{reverse on}good job!":GOSUB9500:FORI=1TO2500:NEXT:E1=1:GOTO814
6018 IFDO=1ANDHK=0THENGOSUB9000:PRINT"{home}{reverse on}{right*6}need key":FORI=1TO999:NEXT
6025 GOTO2016
7000 BT=0:R=0:H=4:G=233:Y=DL-23:FORN=10TO0STEP-1:POKENO,200:FORI=YTOY+2:POKEI,G:POKEI+CU,H:NEXT:Y=Y+22
7004 FORI=YTOY+2:POKEI,G:POKEI+CU,H:NEXT:Y=Y+22:FORI=YTOY+2:POKEI,G:POKEI+CU,H:NEXT:Y=Y-44
7008 IFG=233THENG=223:GOTO7020
7010 IFG=223THENG=233
7020 R=R+1:IFR>8THENG=7:H=5
7030 POKENO,0:POKEV,N:NEXT:IFSK=DL ORSK=DL-1ORSK=DL+1ORSK=DL-23ORSK=DL-22ORSK=DL-21THENSD=1:Q=Q+1:sh=sh+1
7134 IFSK=DL+23ORSK=DL+22ORSK=DL+21THENSD=1:Q=Q+1:sh=sh+1
7135 IFSD=1ANDHK=0andma=shTHENKY=SK:SD=2
7144 IFNOT(SD>0)THEN7160
7148 POKESK,6:POKESK+CU,7:POKESK+22,6:POKESK+22+CU,7:POKESK-22,6:POKESK-22+CU,7:SD=0
7150 SK=8140:IFPL>7921THENSK=7747
7160 IFPL=DLORPL=DL-1ORPL=DL+1ORPL=DL-23ORPL=DL-22ORPL=DL-21THEN7900
7170 IFPL=DL+23ORPL=DL+22ORPL=DL+21THEN7900
7500 GOTO2008
7900 PRINT"{home}{down}{reverse on}{right*8}ouch!":POKEV,10:FORN=1TO20:POKES1,210-N:NEXT:POKES1,0:FORI=1TO600:NEXT
7910 IFHT=1THENHT=0
8000 HP=HP-1:IFHP<1THEN8020
8010 GOTO2008
8020 GOSUB9500:POKE36869,240:PRINT"{clear}map";MA:PRINT"gold";GP:PRINT"skeletons";Q:END
9000 IFHK=0THENPOKEKY,5:POKEKY+CU,7
9002 PRINT"{home}{black}{reverse on}{cm +*22}{home}{down}{cm +*22}{purple}":IFE1=0THENRETURN
9004 R=7702:N=7723:FORI=1TO21:POKER+22,230:POKEN+22,230:POKER+22+CU,0:POKEN+22+CU,0:R=R+22:N=N+22:NEXT
9018 FORI=8164TO8185:POKEI,230:POKEI+CU,0:NEXT:E1=.:RETURN
9500 POKEV,15:R=0:FORI=128TO255STEP11:POKES1,I:FORM=1TO10:NEXTM:R=R+1:IFR=3THENR=0:POKES1,0
9505 NEXT:POKES1,0:POKEV,0:RETURN
9550 POKEV,200:FORN=234TO238:IFTR=1THENPOKE7695+CU,1
9555 FORY=1TO5:POKES3,16+N-Y:POKE7695+CU,4:NEXT:NEXT:POKES3,0:POKEV,0:RETURN


~~~~~~~~~~~~
If interested and wanted to more know about specific parts of the code and what-did-what, feel welcome to ask.
Enjoy the game! :) - Don 'Mystic Sword'.