Tower And Dragon 3.0 Has Been Released!
Over the course of several months, as a hobby I found ways to optimize code and memory in Tower And Dragon(T&D). At one point I had over 300 bytes of free memory. I had not seen over 300 bytes of free memory since prior to adding audio version 0.9 beta. Programming Version 3.0 then began.
Teaser Video:
#^https://www.youtube.com/watch?v=Cvzx7q3nFNcTeaser VideoWhile I recommend simply replaying, version 3 is compatible with the version 2 save files.
New:- Almost all monsters are animated.
- Armor and weapons have names.
- There is finally a use for gold. There is now a village with a vendor up north in the outdoor area.
- While there are a few other items available at the vendor, You can now purchase a heal enchant. The enchant activates once per purchase and is expensive. I didn't want to change the "feel" of the game too much. To heal you press H.
- There are a total of 3 new zones to explore in the game. I say zones as they are not ruin levels. The village is accessible from the outdoor area. The other two zones are accessible from the ruin.
- A few boss mobs have been added.
- If coming from version 2, The stairs down on level 1 are worth visiting.
- Level 3 has been mostly restored to about 85% (possibly more) to its original state as I made it as a boy 40 years ago. Not that it is an awesome area or anything, but still neat. If coming from V2: Going to the stairs down on this level is significant.
- There are better weapons available in the game than previously available. If coming from version 2, simply killing monsters on level 3 and 4 should upgrade.
- The end is tougher if coming from v2. Let me know if you can beat it without any upgrades or leveling.
- Completely enclosing character's avatar in any stairs/boat tile temporarily changes your spawn point to that location until you change zones or reload.
- While there is only so much you can do with text graphics, the dragon animation is worth viewing.
- Added more help option on title screens.
- When you have won, be sure to check out what is cooking on the stove. I used almost all available memory on the level to add some polish.
- Rebalanced all the zones, painful. This required me exploring every room, and looting every gold on every level.
I can't tell you the number of times I had to clear every mob from the new zones to thoroughly test. - A few Easter eggs have been added. Hint: A few things change based off of your progression.
- Support for quests has been added.
- Much thanks to the die-hard testers!
@Marshall Sutherland (Posting with Hubzilla)
Frederic Bezies
Kimberly Cook
TechnicalOne critical goal that I have upheld is insurance that this game can be played easily from tape cassette. While the game is fun to play from disk drive and any PET system, tape cassette places some additional restrictions. If I removed the cassette restriction and playing only from disk drive, I could constantly load and unload code. Using this method, I could make T&D do anything and everything that a much later game like Secret of Mana does.
The reason I adhere to playing from tape cassette is the goal of this game is to allow play on a stock 2001-8 (8K) system with a tape cassette. This system was released prior to disk drives and most people never purchased a disk drive as it was too expensive and unnecessary since 8K programs load quickly from cassette.
This also means that the game plays fairly linear in order, as I don't want cassette players to constantly have to rewind and fast forward the tape cassette for non-linear progression. That said, you can go to the village to purchase upgrades. This requires a second cassette for the "village" so you can go there at any time.
Tape Buffer ReclaimTape buffer #1 (used for tape 1) has always been used for temporary variable storage and tape buffer #2 (used for tape 2) is used for ROM1 systems to patch the diskio so it actually works, allowing original systems to play T&D on a disk drive. However, Tape buffer #2 could be used if not on a ROM1 system and it could also be used if on a ROM1 system but playing from tape cassette. I could actually use the space for more permanent storage provided I used the opposite buffer from the tape cassette being used, so that is exactly what I did.
Code optimizationBetween tape buffer memory reclaim and code optimization (more subroutines, finding small optimizations like jsr/rts to jmp, using yet even more bit operations), that placed me at over 300 bytes free. This occurred in late November and it was finally time to write some code.
During the entire process, I had to step away from it quite a bit due to tedium of no memory.
ProgrammingThe first task was rewriting the animation code to use a simple form of compression. I then had to "rewire" the tile animations to use the new compression. I then painstakingly went through every level and animated about 90% of the creatures. Most have a combination of idle and an attack animation. I ran out of memory about 80% through this task and had to perform more code optimizations.
I had pretty lofty goals for this expansion. the original goals were as follows:
- Animated monsters.
- Named weapons. While the names are boring as there is only 7 characters to display, it does make an impact on gameplay. This sounds simple but was a painful process as I had no bytes free at the time. Constant work to optimize. Once complete I realized that I had to name Armor as it looked funny.
- A shop to purchase upgrades and possibly a heal (very tall requirement!). I was hoping I could create a village and have the shop keeper there, but my backup plan was to have the shop keeper between zones as then the level map data is not necessary. While extremely painful, I was able to create the small village, keeping true to my original plan.
- Some form of heal.
- Play from tape cassette and disk drive.
- Not implemented: Ranged weapons such as a bow. Unfortunately, this did not make it into version 3.
- Not implemented: Confirmation before using save. This did not make it either. I could not spare the few bytes of code to put it in there.
A little math and silliness: I have over 500 blocks free on a standard diskette. Each cutscene and level takes an average of 10 blocks.... So in theory I could add possibly 50 more zones. I'm not going there, and it would get boring without ranged weapons and magic, but this does mean I could realistically add my entire D&D campaign into the game...
My daughter and I play this game with the toothpaste, and who it runs out on is the loser and must throw it away. Seeing it in the garbage by the other is admission of defeat. By the time we're done with the toothpaste, it looks like it is machine pressed. My wife related the toothpaste to my search for memory and I loved it! T&D is getting really close to machine pressed.
I currently have 2 bytes free. I do know of a few optimizations I could make to free maybe 30 or 40 bytes, but to implement anyting major like ranged weapons would take several hundred bytes. There is a possibility I could shrink each zone in order to have more space to code, but I currently did not want to break up the levels I designed as a boy.
I believe my major motivator for this expansion was strictly enjoyment of doing things in small space and doing something never done before. I hope you enjoy.