Topic:   Roguesoft RPG Engine?   (Read 80132 times)


0 Members and 2 Guests are viewing this topic.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Roguesoft RPG Engine?
« Reply #90 on: April 24, 2010, 05:32:22 PM »
I'm making progress again on the RSRPGE, but the Readme is taking ages to write. I fixed a bug whereby dead NPCs would prevent other NPCs from traversing the grid node they died on until another NPC was spawned in its slot, but now I've discovered an even stranger glitch.

Occasionally the first enemy I attack becomes a ghost on a successful hit, its sprite remaining visible but floating at the coordinates it died at rather than scrolling with the map when the player moves. Furthermore it seems to disappear after a round is completed (after each existing entity makes a move). I've tried to recreate the glitch and capture it on Jing but I haven't been able to as it occurs rarely.

Here's the latest build: link removed

I'd be grateful to hear any feedback on bizarre behaviour such as this glitch or any others you find.
« Last Edit: April 25, 2010, 02:48:14 AM by Silverwind »
I survived the spammage of 2007

WarHampster


  • GMG Extraordinaire

  • ***


  • Posts: 1501

  • The People's Moderator
    • Arcade of the Absurd
Re: Roguesoft RPG Engine?
« Reply #91 on: April 24, 2010, 08:40:26 PM »
Can you compile it for those of us without GM?

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Roguesoft RPG Engine?
« Reply #92 on: April 25, 2010, 02:45:34 AM »
Whoops! Sorry about that: http://www.mediafire.com/?0lmdae1onwz

btw Hammy, you should download the GM demo. It can run source files without any limitations. :)
« Last Edit: April 25, 2010, 02:47:34 AM by Silverwind »
I survived the spammage of 2007

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Roguesoft RPG Engine?
« Reply #93 on: April 28, 2010, 05:21:18 PM »
Just thought I'd post a picture of the inventory engine I'm working on:



btw, did anyone encounter that glitch?
« Last Edit: April 28, 2010, 05:21:54 PM by Silverwind »
I survived the spammage of 2007

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: Roguesoft RPG Engine?
« Reply #94 on: April 28, 2010, 06:10:50 PM »
Oooh!!! This is lookin good. :)



-Gan

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Roguesoft RPG Engine?
« Reply #95 on: April 28, 2010, 06:31:36 PM »
Thanks. :) I originally thought it would look well to the right of the room area, but PICT stretches the image to fit the canvas after GETPICTURE. I could load the sprites into position again, but it's unpleasantly noticeable so I think I'll stick with the current workaround.
« Last Edit: April 28, 2010, 06:34:04 PM by Silverwind »
I survived the spammage of 2007

Charlo


  • GMG-er

  • **


  • Posts: 451
Re: Roguesoft RPG Engine?
« Reply #96 on: April 28, 2010, 10:23:25 PM »
Quote
Just thought I'd post a picture of the inventory engine I'm working on:



btw, did anyone encounter that glitch?
That looks really cool Silver.  I haven't downloaded the source, are you just drawing sprites to the screen, using GETPICT/PICT, and then drawing more to the screen?  I can't think of any other way to use that many sprites.

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Roguesoft RPG Engine?
« Reply #97 on: April 29, 2010, 03:26:17 AM »
Yup, I'm using sprites for the room background and entities and IMAGEFILE for the items and the item window. Because the inventory screen is on another card I thought there'd be some kind of noticeable transition, but I've got it working seamlessly gong to the card now. Coming back causes the sprites to blink.
« Last Edit: April 29, 2010, 03:26:50 AM by Silverwind »
I survived the spammage of 2007

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Roguesoft RPG Engine?
« Reply #98 on: April 29, 2010, 06:38:35 PM »
Here's a sneak peek: http://screencast.com/t/MDFhMWViYW

It's monstrously heavy on the code due to the amount of times I need to repeat things, but I reckon I can squeeze it all in. So far only the Move and Drop buttons work, and not on equipment.

I'm really pleased with the engine now. It's by far my greatest work yet! :D
I survived the spammage of 2007

Gan


  • Administrator

  • ^ This guy is amazing.

  • *****


  • Posts: 4411
Re: Roguesoft RPG Engine?
« Reply #99 on: April 29, 2010, 06:49:45 PM »
Ahahahah! At what the Doppelganger said...

This is fantastic! I love how it's set up. Inventory is great, the sound effects are great...  wow. It's looking more advanced than the iRpg with it's world, talking characters, and sound.


-Gan

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Roguesoft RPG Engine?
« Reply #100 on: April 29, 2010, 07:19:14 PM »
;D Hehehe... yeah, I like Sid the Singing Slime King too. Gandolf the Grey also makes an appearance:



EDIT:

I originally wanted to bring back King Brenith, but his role in the story has been filled by another character so now I'm not sure whether I will or not. I'm borrowing the storyline from one of my earliest ever paper RPGs involving three friends and a wishing star, so there'll be three playable characters. I want to wrap up the RSRPGE before resuming work on the game though.
« Last Edit: April 29, 2010, 07:30:08 PM by Silverwind »
I survived the spammage of 2007

Mystor


  • GMG-er

  • **


  • Posts: 696

  • I am the myst that consumes us all.
Re: Roguesoft RPG Engine?
« Reply #101 on: April 29, 2010, 09:09:36 PM »
Damn, I like this.
Can you copy me the code? or do I have to find a mac and open it up.
I want to adapt this MUAHAHAHA (what?)

EDIT: Y'see I have been trying to make a good RPG engine for a while now. I have just never really tried hard enough.
Now I get a shortcut and I can write the real story :D
« Last Edit: April 29, 2010, 09:10:36 PM by mistron »
"I'll lie to him."
"And if that doesn't work?"
"Then I'll tell the truth. We're allowed to do that, in emergencies. We can't plan for everything, you know."
   -Colonel Graff, Ender&

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Roguesoft RPG Engine?
« Reply #102 on: April 30, 2010, 04:18:17 AM »
Hurrah, hurray!
Callooh! Callay!
A brand new RPG to play!
Now take my code,
(there's quite a load)
And get it finished by today!

I cant post it all because the engine is massive, but here's the two primary routines:

Main Keydown
Code: [Select]
ON KEYDOWN
 Â SPRITE -20
 Â keydownASC = ASC keydown$
 Â IF gameState$ = "Player's Turn" THEN
 Â   checkHP = 0

 Â   '--- Change Sprite
 Â   IF keydown$ = "z" THEN
 Â     IF playerSprite$ = "humanM1.gif" THEN
 Â        playerSprite$ = "humanM0.gif"
 Â     ELSE
 Â        playerSprite$ = "humanM1.gif"
 Â     END IF
 Â     SPRITE playerSpriteNumber playerSpriteX playerSpriteY $playerSprite$$
 Â   END IF

 Â   '--- Display Menu (ESC key)
 Â   IF keydownASC = 27 THEN
 Â     GETPICTURE
 Â     GOTOCARD 245
 Â   END IF

 Â   '--- Display Stats
 Â   IF keydown$ = "s" THEN checkHP = 1

 Â   '--- Drink Potion
 Â   IF keydown$ = "d" THEN
 Â     checkHP = 1
 Â     playerHP = playerHP + 135
 Â     IF playerHP > playerMaxHP THEN playerHP = playerMaxHP
 Â   END IF

 Â   IF checkHP = 1 THEN
 Â     '--- Display HP.
 Â     tenPercent = playerMaxHP / 10
 Â     entityHPSprite$ = "HP-90%.gif"
 Â     percentCheck = tenPercent * 9
 Â     IF playerHP < percentCheck THEN entityHPSprite$ = "HP-80%.gif"
 Â     percentCheck = tenPercent * 8
 Â     IF playerHP < percentCheck THEN entityHPSprite$ = "HP-70%.gif"
 Â     percentCheck = tenPercent * 7
 Â     IF playerHP < percentCheck THEN entityHPSprite$ = "HP-60%.gif"
 Â     percentCheck = tenPercent * 6
 Â     IF playerHP < percentCheck THEN entityHPSprite$ = "HP-50%.gif"
 Â     percentCheck = tenPercent * 5
 Â     IF playerHP < percentCheck THEN entityHPSprite$ = "HP-40%.gif"
 Â     percentCheck = tenPercent * 4
 Â     IF playerHP < percentCheck THEN entityHPSprite$ = "HP-30%.gif"
 Â     percentCheck = tenPercent * 3
 Â     IF playerHP < percentCheck THEN entityHPSprite$ = "HP-20%.gif"
 Â     percentCheck = tenPercent * 2
 Â     IF playerHP < percentCheck THEN entityHPSprite$ = "HP-10%.gif"
 Â     percentCheck = tenPercent * 1
 Â     IF playerHP < percentCheck THEN entityHPSprite$ = "HP-0%.gif"
 Â     IF playerHP => playerMaxHP THEN entityHPSprite$ = "HP-100%.gif"
 Â     IF playerHP =< 0 THEN entityHPSprite$ = "HP-None%.gif"
 Â   END IF

 Â   '--- Display Stats (continued)
 Â   IF keydown$ = "s" THEN
 Â     CLEAR TEXT
 Â     PRINT $playerName$$
 Â     PRINT
 Â     PRINT Lvl: $playerLvl$
 Â     PRINT Experience needed to level up: $playerExp$
 Â     PRINT Gold: $playerGold$
 Â     PRINT Attribute Points: $playerAttributePoints$
 Â     PRINT
 Â     PRINT Weapon: $playerWeapon$$
 Â     PRINT Armor: $playerArmor$$
 Â     PRINT Trinket: $playerTrinket$$
 Â     PRINT
 Â     PRINT Strength: $playerStrength$
 Â     PRINT Endurance: $playerEndurance$
 Â     PRINT Dexterity: $playerDexterity$
 Â     PRINT
 Â     PRINT Attack: $playerAttack$
 Â     PRINT Defence: $playerDefence$
 Â     PRINT Accuracy: $playerAccuracy$
 Â     PRINT Evasion: $playerEvasion$
 Â     SPRITE entityHpSpriteNumber playerSpriteX playerSpriteY $entityHPSprite$$
 Â     DELAY attackHitDisplayTime
 Â     SPRITE entityHpSpriteNumber -1000 -1000
 Â   END IF

 Â   '--- Drink Potion (continued)
 Â   IF keydown$ = "d" THEN
 Â     SOUND Drink Potion
 Â     spriteX = playerSpriteX
 Â     spriteY = playerSpriteY - 44
 Â     SPRITE -actionEffectSpriteNumber playerSpriteX playerSpriteY Heal-Icon.gif
 Â     SPRITE entityHpSpriteNumber playerSpriteX playerSpriteY $entityHPSprite$$
 Â     SPRITEPATH actionEffectSpriteNumber spriteX spriteY 8
 Â     SPRITE -actionEffectSpriteNumber -1000 -1000
 Â     SPRITE entityHpSpriteNumber -1000 -1000
 Â     gameState$ = "NPC's Turn"
 Â   END IF

 Â   '--- Pass Turn
 Â   IF keydown$ = " " THEN gameState$ = "NPC's Turn"

 Â   '---ITEMS-------------------------------------------------------------------------------------
 Â   itemKeys$ = "123456789"
 Â   IF itemKeys$ CONTAINS keydown$ THEN ALERT Item Test Successful!
 Â   '----------------------------------------------------------------------------------------------
« Last Edit: April 30, 2010, 04:39:59 AM by Silverwind »
I survived the spammage of 2007

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Roguesoft RPG Engine?
« Reply #103 on: April 30, 2010, 04:21:28 AM »
Main Keydown (continued)
Code: [Select]
    playerTile$ = "Empty"
 Â   playerNewGridX = playerGridX
 Â   playerNewGridY = playerGridY
 Â   IF keydown$ = "UPARROW" THEN playerNewGridY = playerGridY - 1
 Â   IF keydown$ = "DOWNARROW" THEN playerNewGridY = playerGridY + 1
 Â   IF keydown$ = "LEFTARROW" THEN playerNewGridX = playerGridX - 1
 Â   IF keydown$ = "RIGHTARROW" THEN playerNewGridX = playerGridX + 1
 Â   
 Â   '--- Get collision classes of Y row.
 Â   IF playerNewGridY = 1 THEN gridRow$ = gridRow1$
 Â   IF playerNewGridY = 2 THEN gridRow$ = gridRow2$
 Â   IF playerNewGridY = 3 THEN gridRow$ = gridRow3$
 Â   IF playerNewGridY = 4 THEN gridRow$ = gridRow4$
 Â   IF playerNewGridY = 5 THEN gridRow$ = gridRow5$
 Â   IF playerNewGridY = 6 THEN gridRow$ = gridRow6$
 Â   IF playerNewGridY = 7 THEN gridRow$ = gridRow7$
 Â   IF playerNewGridY = 8 THEN gridRow$ = gridRow8$
 Â   IF playerNewGridY = 9 THEN gridRow$ = gridRow9$
 Â   IF playerNewGridY = 10 THEN gridRow$ = gridRow10$
 Â   IF playerNewGridY = 11 THEN gridRow$ = gridRow11$
 Â   IF playerNewGridY = 12 THEN gridRow$ = gridRow12$
 Â   IF playerNewGridY = 13 THEN gridRow$ = gridRow13$
 Â   IF playerNewGridY = 14 THEN gridRow$ = gridRow14$
 Â   IF playerNewGridY = 15 THEN gridRow$ = gridRow15$
 Â   IF playerNewGridY = 16 THEN gridRow$ = gridRow16$
 Â   IF playerNewGridY = 17 THEN gridRow$ = gridRow17$
 Â   IF playerNewGridY = 18 THEN gridRow$ = gridRow18$
 Â   IF playerNewGridY = 19 THEN gridRow$ = gridRow19$
 Â   IF playerNewGridY = 20 THEN gridRow$ = gridRow20$
 Â   IF playerNewGridY = 21 THEN gridRow$ = gridRow21$
 Â   IF playerNewGridY = 22 THEN gridRow$ = gridRow22$
 Â   IF playerNewGridY = 23 THEN gridRow$ = gridRow23$
 Â   IF playerNewGridY = 24 THEN gridRow$ = gridRow24$
 Â   IF playerNewGridY = 25 THEN gridRow$ = gridRow25$

 Â   '--- Get collision class of new tile.
 Â   playerTile$ = MID$ gridRow$ playerNewGridX 1
 Â   IF playerTile$ = "" THEN playerTile$ = "Empty"
 Â   IF playerTile$ = " " THEN playerTile$ = "Empty"
 Â   IF playerTile$ = "0" THEN playerTile$ = "Empty"
 Â   IF playerTile$ = "1" THEN playerTile$ = "Wall"
 Â   IF playerTile$ = "2" THEN playerTile$ = "Signpost"
 Â   IF playerTile$ = "3" THEN playerTile$ = "Treasure Chest"
 Â   IF playerTile$ = "9" THEN playerTile$ = "Empty"

 Â   '--- This checks for collision with other entities.
 Â   IF npc1Alive = 1 THEN
 Â     IF playerNewGridX = npc1GridX THEN
 Â       IF playerNewGridY = npc1GridY THEN
 Â         playerTile$ = "Wall"
 Â         enterBattle = 1
 Â         activeNpc = 1
 Â         npc0Name$ = npc1Name$
 Â         npc0GridX = npc1GridX
 Â         npc0GridY = npc1GridY
 Â         npc0SpriteX = npc1SpriteX
 Â         npc0SpriteY = npc1SpriteY
 Â         npc0HP = npc1HP
 Â         npc0MaxHP = npc1MaxHP
 Â         npc0Attack = npc1Attack
 Â         npc0Defence = npc1Defence
 Â         npc0Accuracy = npc1Accuracy
 Â         npc0Evasion = npc1Evasion
 Â       END IF
 Â     END IF
 Â   END IF
 Â   IF npc2Alive = 1 THEN
 Â     IF playerNewGridX = npc2GridX THEN
 Â       IF playerNewGridY = npc2GridY THEN
 Â         playerTile$ = "Wall"
 Â         enterBattle = 1
 Â         activeNpc = 2
 Â         npc0Name$ = npc2Name$
 Â         npc0GridX = npc2GridX
 Â         npc0GridY = npc2GridY
 Â         npc0SpriteX = npc2SpriteX
 Â         npc0SpriteY = npc2SpriteY
 Â         npc0HP = npc2HP
 Â         npc0MaxHP = npc2MaxHP
 Â         npc0Attack = npc2Attack
 Â         npc0Defence = npc2Defence
 Â         npc0Accuracy = npc2Accuracy
 Â         npc0Evasion = npc2Evasion
 Â       END IF
 Â     END IF
 Â   END IF
 Â   IF npc3Alive = 1 THEN
 Â     IF playerNewGridX = npc3GridX THEN
 Â       IF playerNewGridY = npc3GridY THEN
 Â         playerTile$ = "Wall"
 Â         enterBattle = 1
 Â         activeNpc = 3
 Â         npc0Name$ = npc3Name$
 Â         npc0GridX = npc3GridX
 Â         npc0GridY = npc3GridY
 Â         npc0SpriteX = npc3SpriteX
 Â         npc0SpriteY = npc3SpriteY
 Â         npc0HP = npc3HP
 Â         npc0MaxHP = npc3MaxHP
 Â         npc0Attack = npc3Attack
 Â         npc0Defence = npc3Defence
 Â         npc0Accuracy = npc3Accuracy
 Â         npc0Evasion = npc3Evasion
 Â       END IF
 Â     END IF
 Â   END IF
 Â   
 Â   '--- Check if the player is trying to leave the room.
 Â   IF playerNewGridY < 1 THEN
 Â     npc1Alive = 0
 Â     npc2Alive = 0
 Â     npc3Alive = 0
 Â     playerGridY = roomSize
 Â     GOTOCARD northCard
 Â   END IF
 Â   IF playerNewGridY > roomSize THEN
 Â     npc1Alive = 0
 Â     npc2Alive = 0
 Â     npc3Alive = 0
 Â     playerGridY = 1
 Â     GOTOCARD southCard
 Â   END IF
 Â   IF playerNewGridX < 1 THEN
 Â     npc1Alive = 0
 Â     npc2Alive = 0
 Â     npc3Alive = 0
 Â     playerGridX = roomSize
 Â     GOTOCARD westCard
 Â   END IF
 Â   IF playerNewGridX > roomSize THEN
 Â     npc1Alive = 0
 Â     npc2Alive = 0
 Â     npc3Alive = 0
 Â     playerGridX = 1
 Â     GOTOCARD eastCard
 Â   END IF
« Last Edit: April 30, 2010, 04:25:20 AM by Silverwind »
I survived the spammage of 2007

Silverwind


  • ^ This guy is amazing.

  • ****


  • Posts: 2805

  • For the glory of my maker
Re: Roguesoft RPG Engine?
« Reply #104 on: April 30, 2010, 04:24:25 AM »
Main Keydown (continued)
Code: [Select]
    IF playerTile$ = "Signpost" THEN
      '--- Determine the player's XY coordinates.
      playerNewGridX$ = STR$ playerNewGridX
      playerNewGridY$ = STR$ playerNewGridY
      playerNewGridXY$ = playerNewGridX$ + " x"
      playerNewGridXY$ = playerNewGridXY$ + playerNewGridY$
      IF playerNewGridXY$ = signpost1XY$ THEN signpostText$ = signpost1Text$
      IF playerNewGridXY$ = signpost2XY$ THEN signpostText$ = signpost2Text$
      IF playerNewGridXY$ = signpost3XY$ THEN signpostText$ = signpost3Text$
      IF playerNewGridXY$ = signpost4XY$ THEN signpostText$ = signpost4Text$
      IF playerNewGridXY$ = signpost5XY$ THEN signpostText$ = signpost5Text$
      IF playerNewGridXY$ = signpost6XY$ THEN signpostText$ = signpost6Text$
      IF playerNewGridXY$ = signpost7XY$ THEN signpostText$ = signpost7Text$
      IF playerNewGridXY$ = signpost8XY$ THEN signpostText$ = signpost8Text$
      IF playerNewGridXY$ = signpost9XY$ THEN signpostText$ = signpost9Text$
      IF playerNewGridXY$ = signpost10XY$ THEN signpostText$ = signpost10Text$
      IF playerNewGridXY$ = signpost1XY$ THEN signpostSound$ = signpost1Sound$
      IF playerNewGridXY$ = signpost2XY$ THEN signpostSound$ = signpost2Sound$
      IF playerNewGridXY$ = signpost3XY$ THEN signpostSound$ = signpost3Sound$
      IF playerNewGridXY$ = signpost4XY$ THEN signpostSound$ = signpost4Sound$
      IF playerNewGridXY$ = signpost5XY$ THEN signpostSound$ = signpost5Sound$
      IF playerNewGridXY$ = signpost6XY$ THEN signpostSound$ = signpost6Sound$
      IF playerNewGridXY$ = signpost7XY$ THEN signpostSound$ = signpost7Sound$
      IF playerNewGridXY$ = signpost8XY$ THEN signpostSound$ = signpost8Sound$
      IF playerNewGridXY$ = signpost9XY$ THEN signpostSound$ = signpost9Sound$
      IF playerNewGridXY$ = signpost10XY$ THEN signpostSound$ = signpost10Sound$
      IF signpostSound$ <> "" THEN SOUND $signpostSound$$
      CLEAR TEXT
      PRINT $signpostText$$
      playerTile$ = "Wall"
    END IF

    IF playerTile$ = "Treasure Chest" THEN
      SOUND Treasure Chest
      '--- Determine the player's XY coordinates.
      playerNewGridX$ = STR$ playerNewGridX
      playerNewGridY$ = STR$ playerNewGridY
      playerNewGridXY$ = playerNewGridX$ + " x"
      playerNewGridXY$ = playerNewGridXY$ + playerNewGridY$
      '--- Determine the treasure chest's ID.
      prefix = roomNumber * 10
      prefix = prefix - 10
      treasureChest1ID = prefix + 1
      treasureChest2ID = prefix + 2
      treasureChest3ID = prefix + 3
      treasureChest4ID = prefix + 4
      treasureChest5ID = prefix + 5
      treasureChest6ID = prefix + 6
      treasureChest7ID = prefix + 7
      treasureChest8ID = prefix + 8
      treasureChest9ID = prefix + 9
      treasureChest10ID = prefix + 10
      IF playerNewGridXY$ = treasureChest1XY$ THEN treasureChestID = treasureChest1ID
      IF playerNewGridXY$ = treasureChest2XY$ THEN treasureChestID = treasureChest2ID
      IF playerNewGridXY$ = treasureChest3XY$ THEN treasureChestID = treasureChest3ID
      IF playerNewGridXY$ = treasureChest4XY$ THEN treasureChestID = treasureChest4ID
      IF playerNewGridXY$ = treasureChest5XY$ THEN treasureChestID = treasureChest5ID
      IF playerNewGridXY$ = treasureChest6XY$ THEN treasureChestID = treasureChest6ID
      IF playerNewGridXY$ = treasureChest7XY$ THEN treasureChestID = treasureChest7ID
      IF playerNewGridXY$ = treasureChest8XY$ THEN treasureChestID = treasureChest8ID
      IF playerNewGridXY$ = treasureChest9XY$ THEN treasureChestID = treasureChest9ID
      IF playerNewGridXY$ = treasureChest10XY$ THEN treasureChestID = treasureChest10ID
      '--- Check whether or not the chest has been opened.
      itemValue$ = mid$ treasureChests$ treasureChestID 1
      IF itemValue$ = "1" THEN
        CLEAR TEXT
        PRINT This chest is empty.
      ELSE
        '--- If the chest is full, set its value empty.
        itemToLeft = treasureChestID - 1
        itemToRight = treasureChestID + 1
        itemsToLeft$ = left$ treasureChests$ itemToLeft
        IF treasureChestID =< 1 THEN itemsToLeft$ = ""
        itemsToLeft$ = itemsToLeft$ + "1"
        itemsToRight$ = mid$ treasureChests$ itemToRight
        newArrayValue$ = itemsToLeft$ + itemsToRight$
        treasureChests$ = newArrayValue$
        '--- Award gold.
        treasureChestGold$ = WORD$ goldTable$ roomLVL
        treasureChestGold = VAL treasureChestGold$
        treasureChestGoldPlus = RANDOM treasureChestGold
        treasureChestGold = treasureChestGold * 4
        treasureChestGold = treasureChestGold + treasureChestGoldPlus
        playerGold = playerGold + treasureChestGold
        if playerGold > maxGold THEN playerGold = maxGold
        CLEAR TEXT
        PRINT This treasure chest contains $treasureChestGold$ gold!
      END IF
      playerTile$ = "Wall"
    END IF
I survived the spammage of 2007