Wow, it’s been awhile. I apologize to anyone who visited the page and it wouldn’t load; it was offline nearly a month due to an Amazon update that rebooted the server.
So it’s been nine months, and I haven’t gotten a lot done on any projects. My roguelike is still in a design phase. Part of what is fun about developing games is when you can make it your own, and I’m still kind of seeking how to do that.
I also ran into an unexpected problem which was when I started playing various Roguelikes to get a feel for them I… wasn’t really having fun with them. Some were TOO random and others the sameiness of every iteration wore me down. It’s possible I’m just playing the wrong ones, but it made it difficult to imagine the kind of game I’d want to play. Maybe I’m just NOT a fan of roguelikes?
So as a result, a few months back, I got distracted by another project idea. I fired up my TI emulator and played a full 10-level game of Tunnels of Doom. As I played, I noticed flaws that always irked me. A mistaken keystroke causes you to lose your turn. Canceling a ranged attack ends your turn, rather than letting you do something else. When monsters try and fail to attack or use special attacks and they still “flinch” on screen or you briefly see the description of the attack despite it not happening. And worst, the incredibly slow generation of the 3D view, with visible “building” going on.
Then I found a guide on the file structure for Tunnels of Doom, written by Michael Vepraukas. This proved to be a gold mine, showing exactly how the game file (which is really just a 12k database) was structured. And it got me thinking, what if I could write a new engine that could replicate the original game engine but with refinements and corrections?
The trick with this is that Tunnels of Doom is not, in fact, written in TMS9900 assembly.
The TI-99/4a was originally envisioned as a console game machine. So to protect their cartridges, Texas Instruments decided to develop their own 8-bit proprietary language called GPL. (Graphics Programming Language)
No actual documentation on it was ever released to the public but 99’ers backward-engineered it awhile ago. The language is much more compact since it’s built for the specific hardware in the TI, namely the video chip. For an example, there’s a literal two-byte command that will fill the screen with the character of your choice. But it runs much slower than assembly.
So I started work on a new cartridge, which would require the 32K expansion, and with my own interpretation of the engine. (My forum post on AtariAge shows the progress.) I got the opening title screen and music playing, loading the game file into memory, and basic menu construction. But then I got bogged down…
It turned out that for memory reasons, the game file stores all potential ten levels of the dungeon but with no actual corridors, only room locations. Each time you go up or down a level, the corridors for the map are procedurally generated. This is cleverly concealed by playing the title music’s 2nd voice by itself as you transition levels so the long pause seems more like a dramatic scene change.
Kevin Kinney spoke with someone on a blog about the algorithm awhile back. He used empty set logic to try and ensure every room was connected to another room, but the exact algorithm is unknown. Vertical aligned rooms are always connected but how horizontal were determined was a mystery. While it wasn’t necessary to perfectly implement it, I didn’t want it to be so significantly different as to alter the look of the game.
I managed to come up with a decent algorithm (better than the one in the shot!) but my interest waned. I do want to pick this one back up again but I find trying to interpret other’s work to not be as fun as making your own.
I did do some experimentation on a full-screen scrolling view, with 16×16 pixel size blocks. If I ever do a sequel for Realms of Antiquity, I’d like to have bigger characters to align with the classic Ultimas as well as give me better graphic resolution. This is a bit of a challenge on the TI-99/4a’s video architecture.
To add a bitmap mode to their existing video chip, TI engineers basically just expanded what was already there; the ASCII character table was expanded to three, and a matching set of three color tables is in the top half of video memory. The screen table still exists, but each of the three table’s 256 characters are only applicable in their section of the screen.
So that means a full screen bitmap scroll is VERY hard to do. Because video memory is only written to/read from a single byte port, you can’t keep the screen static and only update the tables. Pushing 12K in two separate sequences would be visually terrible. (All video RAM on the TI is only accessed by the CPU through a port.)
So I came up with a method. First I shrunk the window to 26×18, using border characters and space around it, which means I would have enough spare characters per section to use the ones NOT on screen as buffer characters to put the new character patterns into. That way it would be a clean transition. So besides an initial screen build, the only updated tiles are those on the edge of the direction you move. The screen characters are also updated since an existing character also moves accordingly.
The result? Pretty good! The fact it’s only moving one character and not two at first I thought a problem, but I realized it looks smoother to do that, and you could even do a 2-step move every time you move. Without any time delays it moves pretty fast as well, although vertically a bit slower.
There are still issues to solve though. How to do animation? What about moving objects like NPC’s? Line of sight? Lighting? The prototype works well enough but there’s a lot of work to get it right. Like other projects, this one fell by the wayside.
So, basically, Ive been gaming rather than making games. Fallout 76 is a favorite, and every new season gets better. The recent surge of popularity thanks to the TV show was also good to see. And after Rings of Power season 2 I got the urge to play Lord of the Rings Online again. I had purchased a lifetime account almost twenty years ago, and quit when they went free-to-play. After resurrecting my account and downloading the client, I found my VIP status was intact and I had received 500 store points a month for over a decade. So I had over 80k points! So been playing that again as well.
But, I recently discovered a new C64 CRPG in the works, by Sarah Jane Avory. She’s posting updates on Twitter about it frequently, and I’m amazed at how quickly things are moving along. It inspired me to get thinking again about coding games and making things.
So stay tuned!
Well darn if when I started to look at the Roguelike again, I got some ideas… Stay tuned!