You (the 'A') must run away from the Snakes ('S') and Kobolds ('k'), and collect the pink stars ('*'). |
ASCII Bombman is a simple ASCII-based maze game I wrote in 2012. Pretty soon all the boys were editing the levels. I've compiled some of them into a single file and presented them here. Some of them changed the story line, as well, and even changed the sprites and other parameters.
I am becoming more convinced that the way to introduce programming to children is to give them pre-written code and ask the to 'hack it'. Sure, they make a lot of mistakes along the way, very often breaking the code - but no matter - it is a learning experience to just fix it!
Download the Windows executable and source code. (works with BBC BASIC for Windows).
Here, a chain-reaction has started. |
#programmingforkids
#learningtocode
Here is the source code if you don't want to download.
REM Bomb Man
REM version 1
REM by T Street
REM 7/6/2012
_VERSION$ = "2.0a"
MODE 10 : OFF
MOUSE OFF
*escape off
REMon error cls:error 0, "Ooops! An error occurred : "+report$
REM setup the colours
COLOUR 1, 200,190,180 : REM white
COLOUR 2, 60,60,60 : REM grey
COLOUR 3, 30,200,60 : REM green
COLOUR 4, 200,80,40 : REM red
COLOUR 5, 200,10,200 : REM Kobold
COLOUR 6, 00,100,200 : REM ghost
COLOUR 7, 200, 0 ,0 : REM dynamite
COLOUR 8, 200,200,0 : REM yellow
COLOUR 9, 0,200,180 : REM cyan
REM data about the game
REM the total number of levels
REM make sure you change this number if you add new levels!
LEVELS% = 13
REM -------------------------------------------------------
ROOM_DEPTH% = 17 : REM number of lines on each level
ROOM_WIDTH% = 30 : REM the width of the level in number of characters
MAX_MONSTERS% = 20 : REM the maximum snakes that can be on a level
MAX_KOBOLDS% = 10 : REM the maximum kobolds that can be on a level
MAX_GHOSTS% = 3 : REM the maximum ghosts that can be on each level
REM -------------------------------------------------------
REM scores values
KOBOLD_SCORE% = 5
SNAKE_SCORE% = 3
RUBBLE_SCORE% = 1
GOLD_SCORE% = 2
REM size of 'items'
AMMO_SIZE% = 6
HEALTH_SIZE% = 5
ARMOUR_SIZE% = 10
REM sprites used
AMMO$ = "!"
ARMOUR$ = "@"
HEALTH$ = "+"
GOLD$ = "*"
BLANK$ = " "
REM the number of BOMBS the game can handle
REM 'dynamite' and 'bombs' are used synonymously throughout this program!
MAX_BOMBS% = 6
REM messages
PAUSED_MESSAGE$ = "PAUSED"
REM a template holds all the level information
DIM template{ name$( LEVELS% ), \ list of names
\ map$( LEVELS%, ROOM_DEPTH% ), \ list of maps
\ text$( LEVELS%), \
\ startx%(LEVELS%), starty%(LEVELS%), \ start positions
\ noMonsters%( LEVELS% ), \ number of monsters
\ monsterx%(LEVELS%, MAX_MONSTERS%), \
\ monstery%(LEVELS%, MAX_MONSTERS%), \
\ noKobolds%( LEVELS%), \ number of kobolds
\ koboldx%( LEVELS%, MAX_KOBOLDS%), \
\ koboldy%( LEVELS%, MAX_KOBOLDS%), \
\ noGhosts%( LEVELS%), \ number of ghosts
\ ghostx%( LEVELS%, MAX_KOBOLDS%), \
\ ghosty%( LEVELS%, MAX_KOBOLDS%) \
\ }
REM a level is a copy of the template used at runtime
DIM level{} = template{}
REM a player is the dude that runs around the screen
DIM player{ x%, y%, \
\ health%, armour%, score%, \
\ sprite$, \ character used for character
\ dynamite%, \ number of sticks of dynamite
\ dynamiteTimer%(MAX_BOMBS%-1), \ number of ticks left on dynamite clock
\ dynamiteLevel%(MAX_BOMBS%-1), \ the current level for this stick of dynamite
\ dynamitex%(MAX_BOMBS%-1), dynamitey%(MAX_BOMBS%-1) \
\}
REM read data in
PROC_readMapData( template{} )
PROC_copyLevelData( template{}, level{} )
REM set up the initial conditions
player.score% = 0
level% = 1 : REM player's starting level
player.dynamite% = 0
player.health% = 30
player.armour% = 0
player.sprite$ = "A"
paused% = FALSE
currentStick% = 0
REM main loop
REPEAT
PROC_title
PROC_menu
PROC_nextLevelScreen( level% )
REPEAT
player.x% = level.startx%( level% )
player.y% = level.starty%( level% )
:
REM each 'turn'
REPEAT
gold% = FN_howManyGold( level{}, level%)
:
PROC_displayMap( level{}, level% )
PROC_displayStats( player{} )
PROC_displayPlayer( player{} )
PROC_transformWalls( level{}, level% )
PROC_displayDynamite( level{}, player{}, level%)
PROC_moveMonsters( level{}, level%)
PROC_displayMonsters( level{}, level% )
PROC_moveKobolds( level{}, player{}, level% )
PROC_displayKobolds( level{}, level% )
PROC_moveGhosts( level{},player{}, level% )
PROC_displayGhosts( level{}, level% )
PROC_checkMonstersHit( level{}, player{}, level% )
PROC_checkKoboldsHit( level{}, player{}, level% )
PROC_checkGhostsHit( level{}, player{}, level% )
PROC_checkForItems( level{}, player{}, level%, player.x%, player.y% )
REM reduce timer on dynamite
PROC_dynamiteTimer( level{}, player{}, level% )
:
TIME = 0
REM get user input
g% = INKEY(10)
WAIT (10-TIME)
REPEAT UNTIL INKEY(0) =-1
REM process user input
CASE g% OF
WHEN 136 : REM left
IF FN_canMove(level{}, level%, player.x%,player.y%, 3) THEN
player.x% -=1
ENDIF
WHEN 137 : REM right
IF FN_canMove(level{}, level%, player.x%,player.y%, 1) THEN
player.x% += 1
ENDIF
WHEN 138 : REM down
IF FN_canMove(level{}, level%, player.x%,player.y%, 2) THEN
player.y% += 1
ENDIF
WHEN 139 : REM up
IF FN_canMove(level{}, level%, player.x%,player.y%, 0) THEN
player.y% -= 1
ENDIF
WHEN 32 : REM space
IF player.dynamite% AND NOTplayer.dynamiteTimer%(currentStick%) AND player.dynamiteLevel%(currentStick%)<> level% THEN
player.dynamiteTimer%(currentStick%) = 12
player.dynamiteLevel%(currentStick%) = level%
player.dynamitex%(currentStick%) = player.x%
player.dynamitey%(currentStick%) = player.y%
player.dynamite% -= 1
currentStick% +=1
IF currentStick% >= MAX_BOMBS% THEN
currentStick% = 0
ENDIF
ENDIF
WHEN 112,80 : REM pause 'p'
IF NOTpaused% THEN
paused% = TRUE
COLOUR 3
PRINTTAB(16,9)PAUSED_MESSAGE$
ENDIF
WHEN 115,83 : REM suicide
PROC_animateExplosion(level{}, level%, player.x%, player.y% )
PROC_animateExplosion(level{}, level%, player.x%, player.y% )
PROC_animateExplosion(level{}, level%, player.x%, player.y% )
RUN
ENDCASE
REM pause?
WHILE paused%
g$ = GET$
IF g$ = "P" OR g$ ="p" THEN
paused% = FALSE
ENDIF
ENDWHILE
UNTIL gold% = 0 OR player.health% <=0 OR level%>LEVELS%
REM check for end of level
IF gold%<=0 THEN
level%+=1
REM check for end of game
IF level% > LEVELS% THEN
CLS:PRINT''" That's all folks!"
WAIT 300
RUN
ENDIF
REM cancel the last stick of dynamite
FOR n% = 0 TO MAX_BOMBS%-1
IF player.dynamiteTimer%(n%) THEN
player.dynamiteTimer%(n%) = 0
player.dynamiteLevel%(n%) = 0
player.dynamitex%(n%) = -1
player.dynamitey%(n%) = -1
currentStick% = 0
ENDIF
NEXT
PROC_nextLevelScreen(level%)
ENDIF
REM check for player death
IF player.health% <= 0 THEN
CLS:PRINT''" GAME OVER!"
WAIT 300
RUN
ENDIF
UNTIL FALSE
UNTIL FALSE
END
REM --------------------------------------------------------------
DEFPROC_checkForItems( level{}, player{}, level%, x%, y% )
REM looks for items at the location passed in x%, y%
REM eg items that the player can pick up
REM and updates the score accordingly
IF MID$( level.map$(level%, y%),x%,1) = GOLD$ THEN
MID$( level.map$(level%, y%),x%,1) = BLANK$
PROC_sound(1,-15,1200,4)
player.score% += GOLD_SCORE%
ENDIF
REM look for armour
IF MID$( level.map$(level%, y%),x%,1) = ARMOUR$ THEN
MID$( level.map$(level%, y%),x%,1) = BLANK$
PROC_sound(1,-15,300,4)
player.armour% += ARMOUR_SIZE%
ENDIF
REM look for AMMO BOX
IF MID$( level.map$(level%, y%),x%,1) = AMMO$ THEN
MID$( level.map$(level%, y%),x%,1) = BLANK$
PROC_sound(1,-15,300,2)
player.dynamite% += AMMO_SIZE%
ENDIF
REM look for health pack
IF MID$( level.map$(level%, y%),x%,1) = HEALTH$ THEN
MID$( level.map$(level%, y%),x%,1) = BLANK$
PROC_sound(1,-15,600,4)
player.health% += HEALTH_SIZE%
ENDIF
ENDPROC
DEFFN_howManyGold( level{}, level% )
REM counts the amount of gold on a level
LOCAL m%, n%, c% : REM iterators and counters
FOR m% = 1 TO ROOM_DEPTH%
FOR n% = 1 TO ROOM_WIDTH%
IF MID$( level.map$(level%, m%), n%, 1) = "*" c%+=1
NEXT
NEXT
= c%
DEFPROC_transformWalls( level{}, level% )
REM changes the characters used for boulders based on the current time
LOCAL n%, m% , target$
CASE TIME MOD 3 OF
WHEN 1 target$ = "0"
WHEN 2 target$ = "O"
OTHERWISE target$ = "o"
ENDCASE
FOR n% = 1 TO ROOM_DEPTH%
FOR m% = 1 TO LEN(level.map$(level%, n% ))
IF INSTR("0Oo", MID$(level.map$(level%,n%),m%,1)) AND MID$(level.map$(level%,n%),m%,1)<>target$ THEN
MID$(level.map$(level%,n%),m%,1) = target$
ENDIF
NEXT
NEXT
ENDPROC
DEFPROC_moveMonsters( level{}, level%)
REM move the monsters
REM the monsters (snakes move randomly)
LOCAL m%, ok% , heading%
FOR m% = 1 TO level.noMonsters%(level%)
IF level.monsterx%(level%, m%)<>-1 AND level.monstery%(level%, m%) <> -1 AND RND(18) <3 THEN
ok% = FALSE
REPEAT
heading% = RND(4) -1
IF FN_canMove( level{}, level%, level.monsterx%(level%,m%), level.monstery%(level%,m%), heading%) THEN
CASE heading% OF
WHEN 0 level.monstery%(level%,m%) -=1
WHEN 1 level.monsterx%(level%,m%) +=1
WHEN 2 level.monstery%(level%,m%) +=1
WHEN 3 level.monsterx%(level%,m%) -=1
ENDCASE
ok% = TRUE
ENDIF
UNTIL ok%
ENDIF
NEXT
ENDPROC
DEFPROC_checkExplodedMonsters( level{}, player{}, level%, x%, y%)
REM checks whether any monsters were caught in the explosions
LOCAL m%
FOR m% = 1 TO level.noMonsters%(level%)
hit% = FALSE
IF level.monsterx%(level%, m% ) = x% AND level.monstery%(level%, m% ) = y% THEN
hit% = TRUE
ENDIF
IF level.monsterx%(level%, m% )-1 = x% AND level.monstery%(level%, m% ) = y% THEN
hit% = TRUE
ENDIF
IF level.monsterx%(level%, m% )+1 = x% AND level.monstery%(level%, m% ) = y% THEN
hit% = TRUE
ENDIF
IF level.monsterx%(level%, m% ) = x% AND level.monstery%(level%, m% )+1 = y% THEN
hit% = TRUE
ENDIF
IF level.monsterx%(level%, m% ) = x% AND level.monstery%(level%, m% )-1 = y% THEN
hit% = TRUE
ENDIF
IF hit% THEN
level.monsterx%(level%, m% ) = -1
level.monstery%(level%, m% ) = -1
player.score% += SNAKE_SCORE%
ENDIF
NEXT
ENDPROC
DEFPROC_checkMonstersHit( level{}, player{}, level% )
REM checks whether the monsters (snakes) have hit the player
LOCAL m%
FOR m% = 1 TO level.noMonsters%(level%)
IF level.monsterx%(level%,m%)<>-1 AND level.monstery%(level%,m%)<>-1 THEN
IF level.monsterx%(level%,m%)= player.x% AND level.monstery%(level%,m%)= player.y% THEN
PROC_hurt(player{},1)
ENDIF
ENDIF
NEXT
ENDPROC
DEFPROC_checkKoboldsHit( level{}, player{}, level% )
REM checks whether the kobolds have hit the player
LOCAL m%
FOR m% = 1 TO level.noKobolds%(level%)
IF level.koboldx%(level%,m%)<>-1 AND level.koboldy%(level%,m%)<>-1 THEN
IF level.koboldx%(level%,m%)= player.x% AND level.koboldy%(level%,m%)= player.y% THEN
PROC_hurt(player{},2)
ENDIF
ENDIF
NEXT
ENDPROC
DEFPROC_checkGhostsHit( level{}, player{}, level% )
REM checks whether the Ghosts have hit the player
LOCAL m%
FOR m% = 1 TO level.noGhosts%(level%)
IF level.ghostx%(level%,m%)<>-1 AND level.ghosty%(level%,m%)<>-1 THEN
IF level.ghostx%(level%,m%)= player.x% AND level.ghosty%(level%,m%)= player.y% THEN
PROC_hurtByGhost(player{},2)
ENDIF
ENDIF
NEXT
ENDPROC
DEFPROC_hurtByGhost( player{}, amount% )
REM reduces players life by an amount
REM his damage is caused by ghosts
REM and dynamite
REM it cannot be prevented using armour
player.health% -= amount%
PROC_sound(0, -15, 52, 2)
ENDPROC
DEFPROC_hurt( player{}, amount%)
REM deals and amount of damage to player
REM armour is spent before health
LOCAL n%
PROC_sound(0, -15, 52, 2)
FOR n% = 1 TO amount%
IF player.armour% THEN
player.armour% -=1
ELSE
player.health% -=1
ENDIF
NEXT
ENDPROC
DEFPROC_moveKobolds( level{}, player{}, level% )
REM move the kobolds towards the player
LOCAL m%, ok%, heading%, n%, s%, e%, w%, tries%, same%
FOR m% = 1 TO level.noKobolds%(level%)
IF level.koboldx%(level%, m%) <> -1 AND level.koboldy%(level%, m%) <>-1 THEN
same% = FALSE
IF level.koboldx%(level%, m%) = player.x% AND level.koboldy%(level%, m%) = player.y% THEN
same% = TRUE
ENDIF
IF RND(4) = 1 AND NOTsame% THEN
e% = FALSE: n% = FALSE:w% = FALSE : s% = FALSE
REM find direction to player
IF level.koboldx%( level%, m%) < player.x% THEN
e% = TRUE
ELSE
w% = TRUE
ENDIF
IF level.koboldy%( level%, m%) < player.y% THEN
s% = TRUE
ELSE
n% = TRUE
ENDIF
REM now have preferred directions to player
ok% = FALSE
IF n% AND FN_canMove( level{}, level%, level.koboldx%( level%, m%), level.koboldy%( level%, m%), 0) THEN
heading% = 0
ok% = TRUE
ENDIF
IF s% AND FN_canMove( level{}, level%, level.koboldx%( level%, m%), level.koboldy%( level%, m%), 2) THEN
heading% = 2
ok% = TRUE
ENDIF
IF e% AND FN_canMove( level{}, level%, level.koboldx%( level%, m%), level.koboldy%( level%, m%), 1) THEN
heading% = 1
ok% = TRUE
IF n% AND FN_canMove( level{}, level%, level.koboldx%( level%, m%), level.koboldy%( level%, m%), 0) AND RND(2) = 1 THEN
heading% = 0
ok% = TRUE
ENDIF
IF s% AND FN_canMove( level{}, level%, level.koboldx%( level%, m%), level.koboldy%( level%, m%), 2) AND RND(2) = 1 THEN
heading% = 2
ok% = TRUE
ENDIF
ENDIF
IF w% AND FN_canMove( level{}, level%, level.koboldx%( level%, m%), level.koboldy%( level%, m%), 3) THEN
heading% = 3
ok% = TRUE
IF n% AND FN_canMove( level{}, level%, level.koboldx%( level%, m%), level.koboldy%( level%, m%), 0) AND RND(2) = 1 THEN
heading% = 0
ok% = TRUE
ENDIF
IF s% AND FN_canMove( level{}, level%, level.koboldx%( level%, m%), level.koboldy%( level%, m%), 2) AND RND(2) = 1 THEN
heading% = 2
ok% = TRUE
ENDIF
ENDIF
REM ok to move kobold
IF ok% THEN
CASE heading% OF
WHEN 0 level.koboldy%(level%,m%) -=1
WHEN 1 level.koboldx%(level%,m%) +=1
WHEN 2 level.koboldy%(level%,m%) +=1
WHEN 3 level.koboldx%(level%,m%) -=1
ENDCASE
ELSE
REM move it in a random direction
tries% = 0
REPEAT
heading% = RND(4)-1
tries% +=1
IF FN_canMove( level{}, level%, level.koboldx%( level%, m%), level.koboldy%( level%, m%), heading%) THEN
ok% = TRUE
ENDIF
UNTIL ok% OR tries% > 8
IF ok% THEN
CASE heading% OF
WHEN 0 level.koboldy%(level%,m%) -=1
WHEN 1 level.koboldx%(level%,m%) +=1
WHEN 2 level.koboldy%(level%,m%) +=1
WHEN 3 level.koboldx%(level%,m%) -=1
ENDCASE
ENDIF
ENDIF
ENDIF
ENDIF
NEXT m%
ENDPROC
DEFPROC_checkExplodedKobolds( level{}, player{}, level%, x%, y%)
REM checks whether kobolds have been caught in the explosions
LOCAL m%
FOR m% = 1 TO level.noKobolds%(level%)
hit% = FALSE
IF level.koboldx%(level%, m% ) = x% AND level.koboldy%(level%, m% ) = y% THEN
hit% = TRUE
ENDIF
IF level.koboldx%(level%, m% )-1 = x% AND level.koboldy%(level%, m% ) = y% THEN
hit% = TRUE
ENDIF
IF level.koboldx%(level%, m% )+1 = x% AND level.koboldy%(level%, m% ) = y% THEN
hit% = TRUE
ENDIF
IF level.koboldx%(level%, m% ) = x% AND level.koboldy%(level%, m% )+1 = y% THEN
hit% = TRUE
ENDIF
IF level.koboldx%(level%, m% ) = x% AND level.koboldy%(level%, m% )-1 = y% THEN
hit% = TRUE
ENDIF
IF hit% THEN
level.koboldx%(level%, m% ) = -1
level.koboldy%(level%, m% ) = -1
player.score% += KOBOLD_SCORE%
ENDIF
NEXT
ENDPROC
DEFPROC_checkExplodedSelf( level{}, player{}, level%, x%, y%)
REM checks whether the player has been caught in an explosion
LOCAL hit%
REM look at all the spaces caught by the explosion
IF player.x% = x% AND player.y% = y% THEN
hit% = TRUE
ENDIF
IF player.x%-1 = x% AND player.y% = y% THEN
hit% = TRUE
ENDIF
IF player.x%+1 = x% AND player.y% = y% THEN
hit% = TRUE
ENDIF
IF player.x% = x% AND player.y%+1 = y% THEN
hit% = TRUE
ENDIF
IF player.x% = x% AND player.y%-1 = y% THEN
hit% = TRUE
ENDIF
REM have you been hit?
IF hit% THEN
PROC_hurtByGhost(player{}, 10)
ENDIF
ENDPROC
DEFPROC_checkExplodedWalls( level{}, player{}, level%, x%, y%)
REM checks whether any of the wall sections have been destroyed
IF INSTR("0Oo",MID$(level.map$( level%, y%-1),x%,1)) THEN
MID$(level.map$( level%, y%-1),x%,1) = " "
player.score% += RUBBLE_SCORE%
ENDIF
IF INSTR("0Oo",MID$(level.map$( level%, y%+1),x%,1)) THEN
MID$(level.map$( level%, y%+1),x%,1) = " "
player.score% += RUBBLE_SCORE%
ENDIF
IF INSTR("0Oo",MID$(level.map$( level%, y%),x%+1,1)) THEN
MID$(level.map$( level%, y%),x%+1,1) = " "
player.score% += RUBBLE_SCORE%
ENDIF
IF INSTR("0Oo",MID$(level.map$( level%, y%),x%-1,1)) THEN
MID$(level.map$( level%, y%),x%-1,1) = " "
player.score% += RUBBLE_SCORE%
ENDIF
ENDPROC
DEFPROC_checkExplodedAmmoCrates( level{}, player{}, level%, x%, y% )
REM checks whether any ammo crates have been destroyed in the explosion
IF INSTR(AMMO$,MID$(level.map$( level%, y%-1),x%,1)) THEN
PROC_explode( level{}, player{}, level%, x%, y%-1)
ENDIF
IF INSTR(AMMO$,MID$(level.map$( level%, y%+1),x%,1)) THEN
PROC_explode( level{}, player{}, level%, x%, y%+1)
ENDIF
IF INSTR(AMMO$,MID$(level.map$( level%, y%),x%+1,1)) THEN
PROC_explode( level{}, player{}, level%, x%+1, y%)
ENDIF
IF INSTR(AMMO$,MID$(level.map$( level%, y%),x%-1,1)) THEN
PROC_explode( level{}, player{}, level%, x%-1, y%)
ENDIF
ENDPROC
DEFPROC_explode( level{}, player{}, level%, x%, y%)
REM deals with an explosion at coords x%, y%
MID$(level.map$( level%, y%),x%,1) = " "
PROC_animateExplosion(level{}, level%, x%, y% )
PROC_displayMap( level{}, level% )
PROC_displayMonsters( level{}, level% )
PROC_displayKobolds( level{}, level% )
PROC_displayGhosts( level{}, level% )
PROC_displayStats( player{} )
PROC_checkExplodedMonsters( level{}, player{}, level%, x%, y%)
PROC_checkExplodedKobolds( level{}, player{}, level%, x%, y%)
PROC_checkExplodedSelf( level{}, player{}, level%, x%, y%)
PROC_checkExplodedWalls( level{}, player{}, level%, x%, y%)
PROC_checkExplodedAmmoCrates( level{}, player{}, level%, x%, y% )
ENDPROC
DEFPROC_moveGhosts( level{}, player{}, level% )
REM move ghosts
REM ghosts move towards the player and can pass through all obstacles
LOCAL m%, ok%, heading%, n%, s%, e%, w%, tries%, same%
FOR m% = 1 TO level.noGhosts%(level%)
same% = FALSE
IF level.ghostx%(level%, m%) = player.x% AND level.ghosty%(level%, m%) = player.y% THEN
same% = TRUE
ENDIF
IF RND(6 )= 1 AND NOTsame% THEN
e% = FALSE: n% = FALSE:w% = FALSE : s% = FALSE
REM find direction to player
IF level.ghostx%( level%, m%) < player.x% THEN
e% = TRUE
ELSE
w% = TRUE
ENDIF
IF level.ghosty%( level%, m%) < player.y% THEN
s% = TRUE
ELSE
n% = TRUE
ENDIF
REM now have preferred directions to player
ok% = FALSE
IF n% AND FN_canGhostMove( level{}, level%, level.ghostx%( level%, m%), level.ghosty%( level%, m%), 0) THEN
heading% = 0
ok% = TRUE
ENDIF
IF s% AND FN_canGhostMove( level{}, level%, level.ghostx%( level%, m%), level.ghosty%( level%, m%), 2) THEN
heading% = 2
ok% = TRUE
ENDIF
IF e% AND FN_canGhostMove( level{}, level%, level.ghostx%( level%, m%), level.ghosty%( level%, m%), 1) THEN
heading% = 1
ok% = TRUE
IF n% AND FN_canGhostMove( level{}, level%, level.ghostx%( level%, m%), level.ghosty%( level%, m%), 0) AND RND(2) = 1 THEN
heading% = 0
ok% = TRUE
ENDIF
IF s% AND FN_canGhostMove( level{}, level%, level.ghostx%( level%, m%), level.ghosty%( level%, m%), 2) AND RND(2) = 1 THEN
heading% = 2
ok% = TRUE
ENDIF
ENDIF
IF w% AND FN_canGhostMove( level{}, level%, level.ghostx%( level%, m%), level.ghosty%( level%, m%), 3) THEN
heading% = 3
ok% = TRUE
IF n% AND FN_canGhostMove( level{}, level%, level.ghostx%( level%, m%), level.ghosty%( level%, m%), 0) AND RND(2) = 1 THEN
heading% = 0
ok% = TRUE
ENDIF
IF s% AND FN_canGhostMove( level{}, level%, level.ghostx%( level%, m%), level.ghosty%( level%, m%), 2) AND RND(2) = 1 THEN
heading% = 2
ok% = TRUE
ENDIF
ENDIF
REM ok to move ghost
IF ok% THEN
CASE heading% OF
WHEN 0 level.ghosty%(level%,m%) -=1
WHEN 1 level.ghostx%(level%,m%) +=1
WHEN 2 level.ghosty%(level%,m%) +=1
WHEN 3 level.ghostx%(level%,m%) -=1
ENDCASE
ELSE
REM move it in a random direction
tries% = 0
REPEAT
heading% = RND(4)-1
tries% +=1
IF FN_canGhostMove( level{}, level%, level.ghostx%( level%, m%), level.ghosty%( level%, m%), heading%) THEN
ok% = TRUE
ENDIF
UNTIL ok% OR tries% > 8
IF ok% THEN
CASE heading% OF
WHEN 0 level.ghosty%(level%,m%) -=1
WHEN 1 level.ghostx%(level%,m%) +=1
WHEN 2 level.ghosty%(level%,m%) +=1
WHEN 3 level.ghostx%(level%,m%) -=1
ENDCASE
ENDIF
ENDIF
ENDIF
NEXT m%
ENDPROC
DEFFN_canMove( level{}, level%, x%, y%, direction% )
REM can the player move in the direction indicated
REM 0 north, 1 east, 2 south, 3 west
REM look for walls
LOCAL xp%, yp%
LOCAL row$
CASE direction% OF
WHEN 0
yp% = -1
WHEN 1
xp% = 1
WHEN 2
yp% = 1
WHEN 3
xp% = -1
ENDCASE
REM check boundary conditions
IF y%+yp% <=0 THEN
=FALSE
ENDIF
IF y%+yp% > ROOM_DEPTH% THEN
=FALSE
ENDIF
IF x%+xp% <=0 THEN
=FALSE
ENDIF
IF x%+xp% > ROOM_WIDTH% THEN
=FALSE
ENDIF
REM look for impasible walls
row$ = level.map$( level%, y%+yp% )
IF INSTR("X0Oo",MID$( row$, x% + xp%, 1 )) THEN
= FALSE
ENDIF
= TRUE
DEFFN_canGhostMove( level{}, level%, x%, y%, direction% )
REM can the player move in the direction indicated
REM 0 north, 1 east, 2 south, 3 west
REM look for walls
LOCAL xp%, yp%
LOCAL row$
CASE direction% OF
WHEN 0
yp% = -1
WHEN 1
xp% = 1
WHEN 2
yp% = 1
WHEN 3
xp% = -1
ENDCASE
REM check boundary conditions
IF y%+yp% <=0 THEN
=FALSE
ENDIF
IF y%+yp% > ROOM_DEPTH% THEN
=FALSE
ENDIF
IF x%+xp% <=0 THEN
=FALSE
ENDIF
IF x%+xp% > ROOM_WIDTH% THEN
=FALSE
ENDIF
= TRUE
DEFPROC_title
REM title screen
LOCAL g
CLS
COLOUR 1
*font Courier new, 50bu
COLOUR 8
PRINTTAB(5,1)"Bomb Man"
*font Courier new, 20
COLOUR 1
PRINTTAB(16)"version "_VERSION$
COLOUR 3
PRINTTAB(13)"Superdecade games"
COLOUR 1
PRINTTAB(15)"7th June 2012"
WAIT 50
*font Courier new, 14
PRINT''
ENDPROC
DEFPROC_menu
REM displays and runs a menu
LOCAL g$
PRINTTAB(18)"Press 'i' for instructions, or"
PRINTTAB(17)"any other key to start the game!"
g$ = GET$
IF g$ = "i" OR g$ = "I" THEN
PROC_instructions
ENDIF
ENDPROC
DEFPROC_instructions
LOCAL g
CLS
COLOUR 1
*font Courier new, 50bu
COLOUR 8
PRINTTAB(4,1)"Bomb Man"
*font Courier new, 14
COLOUR 1
PRINTTAB(18)"Press arrow keys to move"
PRINTTAB(16)"Press <space> to drop bomb"
PRINTTAB(18)"Press <p> to pause game"
PRINTTAB(19)"Press <s> for suicide"
COLOUR 2:PRINTTAB(2)"X",;:COLOUR1:PRINT"Impassable wall";
COLOUR 2:PRINTTAB(40)"O",;:COLOUR1:PRINT"Rubble"
COLOUR 7:PRINTTAB(2)"i",;:COLOUR1:PRINT"Dynamite";
COLOUR 3:PRINTTAB(40)player.sprite$,;:COLOUR1:PRINT"You"
COLOUR 8:PRINTTAB(2)GOLD$,;:COLOUR1:PRINT"Gold";
COLOUR 7:PRINTTAB(40)HEALTH$,;:COLOUR1:PRINT"First-aid kit"
COLOUR 9:PRINTTAB(2)ARMOUR$,;:COLOUR1:PRINT"Armour";
COLOUR 9:PRINTTAB(40)AMMO$,;:COLOUR1:PRINT"Ammo crate";
PRINT '
COLOUR 4:PRINTTAB(2)"S",;:COLOUR1:PRINT"Snake - avoid or blow them up with dynamite!"
COLOUR 5:PRINTTAB(2)"k",;:COLOUR1:PRINT"Kobold - run away, or blow them up with dynamite!"
COLOUR 6:PRINTTAB(2)"W",;:COLOUR1:PRINT"Ghost - can pass through walls and armour;"
PRINTTAB(18)"indestructible."
g = GET
WAIT 20
ENDPROC
DEFPROC_nextLevelScreen( level% )
REM displays a screen telling the player about the next screen
LOCAL g
CLS
COLOUR 4
*font Courier new, 50b
PRINTTAB(4,1) "Level "STR$(level%)
*font courier new, 12
COLOUR 1
PROC_ww(level.text$(level%),72)
REPEAT UNTIL INKEY(0) =-1
g = GET
WAIT 100
CLS
ENDPROC
DEFPROC_displayMap( level{}, level% )
REM displays the map passed as a parameter
LOCAL row%, n%
*font courier new, 18
PRINTTAB(0,0)level.name$( level% )
FOR row% = 1 TO ROOM_DEPTH%
PRINTTAB(3,row%+1);
FOR n%= 1 TO LEN(level.map$( level%, row% ))
COLOUR 2 : REM default
REM colour gold
IF MID$(level.map$( level%, row% ), n%, 1) = "*" THEN
COLOUR 8
ENDIF
REM colour armour
IF MID$(level.map$( level%, row% ), n%, 1) = "@" THEN
COLOUR 9
ENDIF
REM colour ammo box
IF MID$(level.map$( level%, row% ), n%, 1) = "!" THEN
COLOUR 9
ENDIF
REM colour health pack
IF MID$(level.map$( level%, row% ), n%, 1) = "+" THEN
COLOUR 7
ENDIF
REM display the current character in the current colour
PRINT MID$(level.map$( level%, row% ), n%, 1);
NEXT
NEXT
ENDPROC
DEFPROC_displayStats( player{} )
REM display the players stats on the right hand side of the screen
*font courier new, 18
COLOUR 1
PRINTTAB(34,6)"Health : ";:COLOUR3:PRINTSTR$(player.health%)" "
COLOUR1:PRINTTAB(34,7)"Armour : "STR$(player.armour% )" "
PRINTTAB(34,8)"Bombs : "STR$(player.dynamite%)" "
PRINTTAB(34,10)"Score : ";:COLOUR5:PRINTSTR$(player.score%)" "
ENDPROC
DEFPROC_displayPlayer( player{} )
REM display the character
COLOUR 3
*font courier new, 18
PRINTTAB(2+player.x%, 1 + player.y% )player.sprite$
ENDPROC
DEFPROC_displayDynamite( level{}, player{}, level% )
REM draw the dynamite on the map
LOCAL n%
FOR n% = 0 TO MAX_BOMBS%-1
REM is the dynamite on this level?
IF player.dynamiteLevel%(n%) = level% THEN
REM is the dynamite currently ticking?
IF player.dynamiteTimer%(n%) THEN
COLOUR 7
REM display dynamite
PRINTTAB(2+player.dynamitex%(n%),1+player.dynamitey%(n%))"i"
ENDIF
ENDIF
NEXT
ENDPROC
DEFPROC_dynamiteTimer(level{}, player{}, level% )
REM handles the timer on the dynamite
LOCAL n%
FOR n% = 0 TO MAX_BOMBS%-1
REM checks whether the timer is currently set
IF player.dynamiteTimer%(n%) THEN
REM it is set, so reduce it by one
player.dynamiteTimer%(n%) -=1
REM is it ready to explode?
IF player.dynamiteTimer%(n%) = 0 THEN
PROC_animateExplosion(level{}, level%, player.dynamitex%(n%), player.dynamitey%(n%) )
REM check the effects of the explosion
PROC_checkExplodedMonsters( level{}, player{}, level%, player.dynamitex%(n%), player.dynamitey%(n%) )
PROC_checkExplodedKobolds( level{}, player{}, level%, player.dynamitex%(n%), player.dynamitey%(n%) )
PROC_checkExplodedSelf( level{}, player{}, level%, player.dynamitex%(n%), player.dynamitey%(n%) )
PROC_checkExplodedWalls( level{}, player{}, level%, player.dynamitex%(n%), player.dynamitey%(n%) )
PROC_checkExplodedAmmoCrates(level{}, player{}, level%, player.dynamitex%(n%), player.dynamitey%(n%) )
REM remove the dynamite from this level
player.dynamiteLevel%(n%) = 0
player.dynamitex%(n%) = -1
player.dynamitey%(n%) = -1
ENDIF
ENDIF
NEXT
ENDPROC
DEFPROC_animateExplosion(level{}, level%, x%, y% )
REM animate an explosion
LOCAL m%
PROC_sound(0, -15, 52, 4)
FOR m% = 1 TO 400
REM display a random coloured character on the space x% and y%
COLOUR RND(7):PRINT TAB(2+x%,y% +1)CHR$(RND(100)+64)
REM display a random coloured character on the spaces (that are not 'X') to the
REM north, east, south and west
IF MID$(level.map$(level%, y%),x%+1,1)<>"X" COLOUR RND(7):PRINT TAB(2+x%+1,y% +1)CHR$(RND(100)+64)
IF MID$(level.map$(level%, y%),x%-1,1)<>"X" COLOUR RND(7):PRINT TAB(2+x%-1,y% +1)CHR$(RND(100)+64)
IF MID$(level.map$(level%, y%+1),x%,1)<>"X" COLOUR RND(7):PRINT TAB(2+x%,y% +1+1)CHR$(RND(100)+64)
IF MID$(level.map$(level%, y%-1),x%,1)<>"X" COLOUR RND(7):PRINT TAB(2+x%,y% +1-1)CHR$(RND(100)+64)
NEXT
ENDPROC
DEFPROC_displayMonsters( level{}, level% )
REM displays the monsters (snakes)
REM snakes have two states 'S' and 's'
LOCAL m%, monsterChar$
CASE TIME MOD 2 OF
WHEN 1 monsterChar$ = "S"
WHEN 0 monsterChar$ = "s"
ENDCASE
*font courier new, 18
FOR m% = 1 TO level.noMonsters%(level%)
IF level.monsterx%(level%, m% ) <>-1 AND level.monstery%(level%, m% ) <>-1 THEN
COLOUR 4 : PRINTTAB(2+level.monsterx%(level%,m%),1+level.monstery%(level%,m%))monsterChar$
ENDIF
NEXT
ENDPROC
DEFPROC_displayKobolds( level{}, level% )
REM display the kobolds for this level
REM the kobold alternates between the 'K' and 'k' character
LOCAL m%, monsterChar$
CASE TIME MOD 2 OF
WHEN 1 monsterChar$ = "K"
WHEN 0 monsterChar$ = "k"
ENDCASE
*font courier new, 18
FOR m% = 1 TO level.noKobolds%(level%)
IF level.koboldx%(level%, m% ) <>-1 AND level.koboldy%(level%, m% ) <>-1 THEN
COLOUR 5 : PRINTTAB(2+level.koboldx%(level%,m%),1+level.koboldy%(level%,m%))monsterChar$
ENDIF
NEXT
ENDPROC
DEFPROC_displayGhosts( level{}, level% )
REM display the ghosts on this level
LOCAL m%, monsterChar$
monsterChar$ = "W"
*font courier new, 18
FOR m% = 1 TO level.noGhosts%(level%)
IF level.ghostx%(level%, m% ) <>-1 AND level.ghosty%(level%, m% ) <>-1 THEN
REM there are two ghost characters
REM 'W' for a ghost in a corridor
REM 'w' for a ghost passing through a wall
IF INSTR("oO0X",MID$( level.map$(level%, level.ghosty%(level%, m%)), level.ghostx%(level%,m%), 1)) THEN
monsterChar$ = "w"
ELSE
monsterChars$ = "W"
ENDIF
REM now print the character
COLOUR 6 : PRINTTAB(2+level.ghostx%(level%,m%),1+level.ghosty%(level%,m%))monsterChar$
ENDIF
NEXT
ENDPROC
DEFPROC_copyLevelData( from{}, dest{} )
REM copies contents of one structure into another
REM this is so we can make changes to the maps
REM and level data at runtime without changing the template
LOCAL n%,m% : REM iterators
FOR n% = 1 TO LEVELS%
dest.name$(n%) = from.name$(n%)
FOR m% = 1 TO ROOM_DEPTH%
dest.map$(n%, m% ) = from.map$(n%, m%)
NEXT
dest.text$(n%) = from.text$(n%)
dest.startx%(n%) = from.startx%(n%)
dest.starty%(n%) = from.starty%(n%)
dest.noMonsters%(n%) = from.noMonsters%(n%)
FOR m% = 1 TO MAX_MONSTERS%
dest.monsterx%(n%, m%) = from.monsterx%(n%,m%)
dest.monstery%(n%, m%) = from.monstery%(n%,m%)
NEXT
dest.noKobolds%(n%) = from.noKobolds%(n%)
FOR m% = 1 TO MAX_KOBOLDS%
dest.koboldx%(n%, m%) = from.koboldx%(n%,m%)
dest.koboldy%(n%, m%) = from.koboldy%(n%,m%)
NEXT
dest.noGhosts%(n%) = from.noGhosts%(n%)
FOR m% = 1 TO MAX_GHOSTS%
dest.ghostx%(n%, m%) = from.ghostx%(n%,m%)
dest.ghosty%(n%, m%) = from.ghosty%(n%,m%)
NEXT
NEXT
ENDPROC
REM Split a string at specified delimiter:
REM A$ is the string to be split
REM d$ is the delimiter at which to split
REM a$() is an array to receive the parts (created if necessary)
REM The returned value is the number of array elements written
DEF FN_split(A$, d$, RETURN a$())
LOCAL C%, I%, N%, P%, Q%, R%
IF !^a$() N% = DIM(a$(),1)+1
FOR P% = 0 TO 1
I% = 0
R% = 0
REPEAT
Q% = R%
REPEAT
C% = INSTR(A$, d$, Q%+1)
Q% = INSTR(A$, """", Q%+1)
IF Q% IF C% > Q% THEN
Q% = INSTR(A$, """", Q%+1)
IF Q%=0 ERROR 100, "Mismatched quotes"
ELSE
Q% = 0
ENDIF
UNTIL Q% = 0
IF C% = 0 THEN C% = LEN(A$)+1
IF P% a$(I%) = MID$(A$, R%+1, C%-R%-1)
R% = C%+LEN(d$)-1
I% += 1
UNTIL R% >= LEN(A$)
IF P% = 0 IF N% < I% THEN
IF N% a$() = ""
!^a$() = 0
DIM a$(I%-1)
ENDIF
NEXT P%
= I%
;
REM Join array elements using specified delimiter:
DEF FN_join(a$(), d$, N%)
LOCAL I%,A$
FOR I% = 0 TO N%-1
IF I%=N%-1 d$=""
A$ += a$(I%) + d$
NEXT
= A$
DEF FN_noLeadingSpaces(nam$)
REM returns the string passed as a parameter with leading spaces removed
nam$=" "+nam$
REPEAT nam$=MID$(nam$,2)
UNTIL LEFT$(nam$,1)<>" "
=nam$
DEFPROC_sound(c%,l%,p%,d%)
ON ERROR LOCAL : ENDPROC
SOUND c%,l%,p%,d%
ENDPROC
DEFPROC_ww( s$, w% )
REM word-wraps a string around the given screen width
REM parameters:
REM s$ - the string to word wrap
REM w% - the width of the string
:
LOCAL out$ : REM output string
LOCAL crlf$ : crlf$ = CHR$(13) + CHR$(10)
LOCAL c% : REM line counter
LOCAL t$ : REM a copy of the string to play with
LOCAL foundSpace% : REM boolean, has a space been found on this line?
LOCAL l%
LOCAL lf% : REM linefeed position
LOCAL n% : REM iteration
LOCAL parts%
LOCAL a$() : DIM a$(1) : REM array used to split output into lines
:
t$ = s$
:
WHILE LEN(t$)>w%
REM deal with carriage returns
WHILE INSTR(LEFT$(t$,w%),crlf$)
REM while this width of text contain any crlf characters?
out$ = out$ + LEFT$(t$,INSTR(t$,crlf$))+crlf$
t$ = RIGHT$(t$,LEN(t$)-INSTR(t$,crlf$)-1)
ENDWHILE
REM
foundSpace% = FALSE
l% = w% : REM look at the last character first
REPEAT
IF MID$(t$,l%,1)=" " THEN
foundSpace% = TRUE
out$ = out$ + LEFT$(t$,l%) + crlf$
t$ = RIGHT$(t$,LEN(t$)-l%)
c% += 1
ELSE
l% -=1 : REM look at the next letter down
IF l% = 0 THEN
REM i didn't find a space so I am just going to write it all
foundSpace% = TRUE
out$ = out$ + LEFT$(t$,w%) + crlf$
t$ = RIGHT$(t$,LEN(t$)-w%)
c% += 1
ENDIF
ENDIF
UNTIL foundSpace%
REM
ENDWHILE
REM the last bit doesn't need word-wrapping
out$ = out$ + t$
REM now print all the lines out
parts% = FN_split(out$, crlf$, a$())
FOR n% = 0 TO parts% -1
PRINTFN_noLeadingSpaces( a$(n%))
NEXT
REM
ENDPROC
DEFPROC_readMapData( level{} )
LOCAL row%, m%
REM reads the map data into
FOR level% = 1 TO LEVELS%
READ level.name$( level% )
FOR row% = 1 TO ROOM_DEPTH%
READ level.map$( level%, row% )
NEXT
READ level.text$( level% )
READ level.startx%( level% )
READ level.starty%( level% )
READ level.noMonsters%( level% )
FOR m% = 1 TO MAX_MONSTERS%
READ level.monsterx%(level%, m% )
READ level.monstery%(level%, m% )
NEXT
READ level.noKobolds%( level% )
FOR m% = 1 TO MAX_KOBOLDS%
READ level.koboldx%(level%, m% )
READ level.koboldy%(level%, m% )
NEXT
READ level.noGhosts%( level% )
FOR m% = 1 TO MAX_GHOSTS%
READ level.ghostx%(level%, m% )
READ level.ghosty%(level%, m% )
NEXT
NEXT
(_LEVEL_DATA_)
REM X - impassable wall
REM 0 - (zero) Boulder (destroyed by dynamite)
REM * - gold
REM @ - armour
REM + - heath/first-aid kit
REM ! - ammo crate
REM important
REM There must be AT LEAST ONE GOLD on each level!
REM each map should follow this format:
REM data map name
REM data 17 strings, of 30 characters each
REM IMPORTANT! The border character of the players movement MUST be an X
REM data string of text to be displayed before the level starts
REM data x,y starting position
REM data the number of snakes in the level (0 - 20)
REM IMPORTANT. If you want zero snakes in a level, the position of the first snake MUST be (-1,-1)
REM data 20 pairs of coordinates
REM IMPORTANT. The coordinates must NOT be an 'X' or '0' on the map
REM leave coords as -1,-1 for 'no snake'
REM you MUST specify 20 coordinates for each level (-1,-1) for 'no snake'
REM
REM data the number of kobolds in the level (0-10)
REM IMPORTANT. If you want zero kobolds, the position of the first kobold MUST be (-1,-1)
REM data 10 pairs of coordinates for the kobold starting position
REM IMPORTANT. The coordinates must NOT be an 'X' or '0' on the map
REM leave coords as -1,-1 for 'no kobold'
REM you MUST specify 10 coordinates for each level (-1,-1) for 'no kobold'
REM
REM data the number of ghosts in the level
REM IMPORTANT. If you want zero ghosts, the position of the first ghost MUST be (-1,-1)
REM data 3 pairs of coordinates for the ghost starting positions
REM IMPORTANT. The coordinates can be an 'X' or '0' on the map (ghosts can walk through walls)
REM leave coords as -1,-1 for 'no ghost'
REM you MUST specify 10 coordinates for each level (-1,-1) for 'no ghost'
DATA "Humble beginnings"
DATA " "
DATA " "
DATA " "
DATA " "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " XXXXXXXXXXXXXXXXXX "
DATA " X ! XXXXXXXX XXX "
DATA " X0000 XXX * XX "
DATA " XX * xx "
DATA " XXXXXXX 00 * XX "
DATA " XXXXXXXXXXXXXX XXX "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " "
DATA " "
DATA " "
DATA " "
DATA "Pick up the ammo crate (!). Use the bombs (i) to blow a path through the rubble. Collect all the gold (*) to win the level! Oh yeah, and dont stand too close to the explosions!"
DATA 13,9
DATA 0
DATA -1,-1
DATA 17,12
DATA 12,12
DATA 14,15
DATA 7,8
DATA 8,7
DATA 3,12
DATA 9,10
DATA 26,12
DATA 26,8
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0 : REM number of kobolds
DATA -1,-1
DATA 18,9
DATA 5,4
DATA 3,4
DATA 2,5
DATA 18,12
DATA 19,9
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0: rem number of ghosts
DATA -1,-1
DATA 5,8
DATA 13,13
DATA "Introducing Snakes"
DATA " "
DATA " "
DATA " "
DATA " "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " ! 000 XX0000XXXXX "
DATA " X000000 0XX0 0XX0 X "
DATA " X XXXX00000xx x "
DATA " XXXX0 00 0 0XX*X "
DATA " XXX 0XX 0XX X *X "
DATA " X0 x 0XX x0XX0X "
DATA " X !!XXXX 0 000000XX "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " "
DATA " "
DATA " "
DATA " "
DATA "Snakes move in a random direction and are slow enough for you to place a bomb next to them."
DATA 6,6
DATA 2
DATA 12,6
DATA 17,11
DATA 12,12
DATA 14,15
DATA 7,8
DATA 8,7
DATA 3,12
DATA 9,10
DATA 26,12
DATA 26,8
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0 : REM number of kobolds
DATA -1,-1
DATA 18,9
DATA 5,4
DATA 3,4
DATA 2,5
DATA 18,12
DATA 19,9
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0: rem number of ghosts
DATA -1,-1
DATA 5,8
DATA 13,13
DATA "Prepreparation prevents..."
DATA " "
DATA " "
DATA " "
DATA " "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " X !!!!XXXX00 00XX "
DATA " X 0 0XX "
DATA " X 0XXXXX @@ 0X "
DATA " XXXXX0!!0XXXXXX0 0X "
DATA " XXX 00XXXX X "
DATA " X0 0X "
DATA " X * * * @@ XX "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " "
DATA " "
DATA " "
DATA " "
DATA "Collect as many of the goodies you can from this level."
DATA 6,6
DATA 2
DATA 10,11
DATA 17,9
DATA 12,12
DATA 14,15
DATA 7,8
DATA 8,7
DATA 3,12
DATA 9,10
DATA 26,12
DATA 26,8
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0 : REM number of kobolds
DATA -1,-1
DATA 18,9
DATA 5,4
DATA 3,4
DATA 2,5
DATA 18,12
DATA 19,9
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0: rem number of ghosts
DATA -1,-1
DATA 5,8
DATA 13,13
DATA "How to bomb like a boss"
DATA " "
DATA " "
DATA " "
DATA " "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " X XXXXXXXXXXXXXXXXXX "
DATA " X ! XXXXXXXX XXX "
DATA " X XXX * XX "
DATA " XXXXXXX 0000 * XX "
DATA " XXXXXXX 0XX * XX "
DATA " XXXXXXXXXXXXXX XXX "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " "
DATA " "
DATA " "
DATA " "
DATA "Collect some bombs, and breach the barrier. Don't be worried by the non-MLG snake camping outside"
DATA 13,9
DATA 1
DATA 5,3
DATA 17,12
DATA 12,12
DATA 14,15
DATA 7,8
DATA 8,7
DATA 3,12
DATA 9,10
DATA 26,12
DATA 26,8
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0 : REM number of kobolds
DATA -1,-1
DATA 18,9
DATA 5,4
DATA 3,4
DATA 2,5
DATA 18,12
DATA 19,9
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0: rem number of ghosts
DATA -1,-1
DATA 5,8
DATA 13,13
DATA "MLG Snake Kills"
DATA " "
DATA " "
DATA " "
DATA " "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " X 000 XX00*00XXXXX "
DATA " X XX0 0XX 000 000X "
DATA " X XX 00000 00X "
DATA " XX 0 0XX 0X "
DATA " XXX 0XX 0XX * X "
DATA " X0 XX 0XX0 0X "
DATA " X !! 0 0 00000XX "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " "
DATA " "
DATA " "
DATA " "
DATA "Those snakes are noobs that camp to get kills. Bomb them all and get the gold."
DATA 6,6
DATA 3
DATA 8,6
DATA 13,5
DATA 16,10
DATA 14,15
DATA 7,8
DATA 8,7
DATA 3,12
DATA 9,10
DATA 26,12
DATA 26,8
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0 : REM number of kobolds
DATA -1,-1
DATA 18,9
DATA 5,4
DATA 3,4
DATA 2,5
DATA 18,12
DATA 19,9
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0: rem number of ghosts
DATA -1,-1
DATA 5,8
DATA 13,13
(_PART_TWO_)
DATA "Wake up call"
DATA " "
DATA " XXXX "
DATA " 0**0 "
DATA " 0000 "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " X XXXXXXXXXXX "
DATA " X ! XX *0 0 "
DATA " X XX000 X "
DATA " XX0XXXX XX XX "
DATA " XX0XXXXXXXXXX000 00XX "
DATA " XX0XXX!0 * XXX*0 0*XXX "
DATA " XX0XXX X * XXXXXXXXXXX "
DATA " XX XXX XXXXXXXXXXXXXXX "
DATA " "
DATA " "
DATA " "
DATA " "
DATA "You wake up in a dark room with two monsters trying to kill you. you must get out of there and collect the stars!"
DATA 13,9
DATA 1
DATA 6,8
DATA 6,9
DATA 12,12
DATA 14,15
DATA 7,8
DATA 8,7
DATA 3,12
DATA 9,10
DATA 26,12
DATA 26,8
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0 : REM number of kobolds
DATA 7,6
DATA 7,8
DATA 5,4
DATA 3,4
DATA 2,5
DATA 18,12
DATA 19,9
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0: rem number of ghosts
DATA -1,-1
DATA 5,8
DATA 13,13
DATA "The snake pit"
DATA " "
DATA " "
DATA " "
DATA " "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " X*X 0*X "
DATA " X0X XXX "
DATA " X X "
DATA " X ! X "
DATA " X X "
DATA " X0X XXX "
DATA " X*X 0*X "
DATA " XXXXXXXXXXXXXXXXXXXXXX "
DATA " "
DATA " "
DATA " "
DATA " "
DATA "You arrive in a pit full of snakes and find more stars. You must collect them and move on to escape! Don't forget to save up your bombs"
DATA 8,7
DATA 10
DATA 11,10
DATA 9,9
DATA 15,8
DATA 7,7
DATA 12,6
DATA 7,5
DATA 8,6
DATA 9,6
DATA 8,6
DATA 10,7
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0 : REM number of kobolds
DATA -1,-1
DATA 18,9
DATA 5,4
DATA 3,4
DATA 2,5
DATA 18,12
DATA 19,9
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0: rem number of ghosts
DATA -1,-1
DATA 5,8
DATA 13,13
DATA "Clear the rubble!"
DATA " "
DATA " "
DATA " XXXXXXXXXXXXXXXXXXXXXXXXXX "
DATA " XXX X*00 00000*** X "
DATA " X*0 !X*00 000000000X "
DATA " XXX X*00 00000000XX "
DATA " X X*00 000000000X "
DATA " XXXX0XXXXXXX 00000000XX "
DATA " X X !X 00000000XX "
DATA " X X 0 XX "
DATA " XXXX0XXXXXXXXXXXX0XXXXXXXXX "
DATA " X X X XX "
DATA " X X 0 XX "
DATA " X 0 X X "
DATA " XXXXXXXXXXXXXXXXXXXXXXXXXX "
DATA " "
DATA " "
DATA "There is a room full of rubble and a limited supply of bombs. Avoid the snake and obtain the stars to learn more about why you're here!"
DATA 6,6
DATA 0 : rem number of monsters
DATA 19,6
DATA 13,12
DATA 12,12
DATA 14,15
DATA 7,8
DATA 8,7
DATA 3,12
DATA 9,10
DATA 26,12
DATA 26,8
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0 : REM number of kobolds
DATA -1,-1
DATA 18,9
DATA 5,4
DATA 3,4
DATA 2,5
DATA 18,12
DATA 19,9
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0: rem number of ghosts
DATA -1,-1
DATA 5,8
DATA 13,13
DATA "Here are some supplies"
DATA "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DATA "X*@@@@@@@@@@@@@@@@@@@@@@@@@@@X"
DATA "X@@@@@@@@@@@@@@@@@@@@@@@@@@@@X"
DATA "X@@@@@@@@@@@@@@@@@@@@@@@@@@@@X"
DATA "X@@@@@@@@@@@@@@@@@@@@@@@@@@@@X"
DATA "X@@@@@@@@@@@@@@@@@@@@@@@@@@@@X"
DATA "X@@@@@@@@@@@@@@@@@@@@@@@@@@@@X"
DATA "X0000000000000000000000000000X"
DATA "X!!!!!!!!!!!!!!!!!!!!!!!!!!!!X"
DATA "X!!!!!!!!!!!!!!!!!!!!!!!!!!!!X"
DATA "X!!!!!!!!!!!!!!!!!!!!!!!!!!!!X"
DATA "X!!!!!!!!!!!!!!!!!!!!!!!!!!!!X"
DATA "X!!!!!!!!!!!!!!!!!!!!!!!!!!!!X"
DATA "X!!!!!!!!!!!!!!!!!!!!!!!!!!!!X"
DATA "X!!!!!!!!!!!!!!!!!!!!!!!!!!!!X"
DATA "X!!!!!!!!!!!!!!!!!!!!!!!!!!!!X"
DATA "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DATA "Remember ammo crates will blow when exploded and so you can create a chain of bombs!"
DATA 13,9
DATA 0
DATA -1,-1
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 0 : REM number of kobolds
DATA -1,-1
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 0: rem number of ghosts
DATA -1,-1
DATA 2,2
DATA 2,2
DATA "Blow it up!"
DATA "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DATA "X*00000000 PAWN 0000000000X"
DATA "X0000000000000000000000000000X"
DATA "X0000000000000000000000000000X"
DATA "X0000000000000000000000000000X"
DATA "X0000000000000000000000000000X"
DATA "X0000000000000000000000000000X"
DATA "X0000000000000000000000000000X"
DATA "X0000000000000000000000000000X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DATA "Don't Waste bombs!"
DATA 10,2
DATA 1
DATA 13,2
DATA -1,-1
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 0 : REM number of kobolds
DATA -1,-1
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 1: rem number of ghosts
DATA 2,2
DATA 2,2
DATA 2,2
DATA "CAVE IN! "
DATA " "
DATA " "
DATA " XXXXXXXXXXXXXXXXXXXXXXXXXX "
DATA " XX!!!!!!!!!!!!!!!!!!!!!!!X "
DATA " XX!!!!!! !!X!! XXXXXXX "
DATA " XXXXXXXXXXXXXXXXXXX0XXXXXX "
DATA " X !!!!!!!!!000XXXXX "
DATA " X XX!!!!!!!!!!!000X00XXX "
DATA " X ! !!!XXXXX XX "
DATA " X XX XXX !0000000 X "
DATA " X XX XX XXX000 0 "
DATA " X XX XX 0XXX0 X "
DATA " X XXX 0XXX0 X "
DATA " X X000 X "
DATA " XXXXXXXXXXXXXXXXXXXXXXXXXX "
DATA " * "
DATA " "
DATA "UH OH THE CAVE FELL IN!. IF THE KOBOLD TRIES TO EXIT THE WORLD YOU DIE!!!"
DATA 2,5
DATA 0 : rem number of monsters
DATA 19,6
DATA 13,12
DATA 12,12
DATA 14,15
DATA 7,8
DATA 8,7
DATA 3,12
DATA 9,10
DATA 26,12
DATA 26,8
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 1 : REM number of kobolds
DATA 3,8
DATA 18,9
DATA 5,4
DATA 3,4
DATA 2,5
DATA 18,12
DATA 19,9
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 1: rem number of ghosts
DATA 2,2
DATA 5,8
DATA 13,13
DATA "BETTER RUN"
DATA "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DATA "X++++++++++++++++++++++++++++X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X@@@@@@@@@@@@@@@@@@@@@@@@@@@@X"
DATA "X0000000000000000000000000000X"
DATA "X!!!!!!!!!!!!!!!!!!!!!!!!!!!!X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DATA "THE MONSTERS HAVE OVERRUN YOUR SUPPLY BASE!"
DATA 13,9
DATA 20
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 10 : REM number of kobolds
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 3: rem number of ghosts
DATA 2,2
DATA 2,2
DATA 2,2
DATA "NO MORE EDITED LEVELS"
DATA "*XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DATA "X++++++++++++++++++++++++++++X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "XTHIS IS THE END OF EDITED X"
DATA "XLEVELS X"
DATA "X!!!!!!!!!!!!!!!!!!!!!!!!!!!!X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "X****************************X"
DATA "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
DATA "END OF MY LEVELS"
DATA 13,9
DATA 0
DATA -1,-1
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 2,2
DATA 0: REM number of kobolds
DATA -1,-1
DATA 18,9
DATA 5,4
DATA 3,4
DATA 2,5
DATA 18,12
DATA 19,9
DATA -1,-1
DATA -1,-1
DATA -1,-1
DATA 0: rem number of ghosts
DATA -1,-1
DATA 5,8
DATA 13,13
ENDPROC