A Developer Diary in Pictures for Gem Quest, a ZX81 RPG


Capturing my progress in developing Gem Quest in images and movies on Flickr.

If youíve been following me the last couple of months, you know Iíve been revisiting Gem Quest. Intended to be an Ultima style game for the ZX81, outside of a few demoís I really hadnít gotten far. That isnít the case now. Iíve spent the last month learning z80 assembly code and hacking my way through the game. Tracking my progress, Iíve been capturing that journey in pictures and movies, which Iíve uploaded into a Flickr album.

Getting everything organized and working.

A good part of my early journey was learning z80 assembler and finding a way to compile it. I ended up landing on a pretty rapid development workflow. I started by downloading Visual Studio Code, and a few add-ins, as my editor. I figured out that I could use JSZeddy to quickly compile code and see the results. Although not great for debugging, I use z80asm and ZXSP for that, it is nice having the debugger and emulator together. By the middle of February, I was ready to start coding again.

Screen Shot 2021-02-12 at 10.39.58 PMGem Quest Development, Screen Shot 2021-02-12 at 10.39.58 PM, Steven Reid, 2021

To get started, I managed to get my first attempt at creating the Gem Quest screen working. JSZeddy is picky, preferring everything to be lowercase. Once I figured that out, I found I could just copy the code from my editor into JSZeddy, then assemble and run it. With my development environment figured out, I was ready to start building the game.

Beginning to make progress.

Another advantage of using JSZeddy is that I could keep all my documentation open next to it. I have the online version of ďMastering Machine Code on Your ZX81,Ē by Toni Baker. I use the annotated version by Thunor. I also keep a copy of the ďSinclair ZX81 BASIC Programming,Ē by Steven Vickers, up for character code and some memory references.

Screen Shot 2021-02-13 at 9.11.26 AMGem Quest Development, Screen Shot 2021-02-13 at 9.11.26 AM, Steven Reid, 2021

Given I was learning z80 assembler at the same time Iím trying to develop a game, I started slow. My first goal was to poke a tile into the display. Once I got that working, I then poked a screenful of the same tiles. I then got them to animate, using some variables.

Screen Shot 2021-02-13 at 9.42.54 AMGem Quest Development, Screen Shot 2021-02-13 at 9.42.54 AM, Steven Reid, 2021

My first thought, when I started, was add in the functionality from my previous attempts. I was thinking baby steps, trying to get my mind to think in assembler. I envisioned another tech demo, not sure how far Iíd get in the project. After a few days, I had the world map working, having a lot of fun figuring things out.

Screen Shot 2021-02-13 at 10.16.55 PMGem Quest Development, Screen Shot 2021-02-13 at 10.16.55 PM, Steven Reid, 2021

Development was progressing smoothly.

My next focus was on movement. I had to figure out how to read the keyboard and then act on it. That took a bit of trial and error on my part. Once I figured it out, though, I was rapidly iterating. At this point, I got the message window working, including scrolling. I added in some stats, even if just fake. Movement was working, along with some place holders for other commands.

Screen Shot 2021-02-14 at 10.16.27 PMGem Quest Development, Screen Shot 2021-02-14 at 10.16.27 PM, Steven Reid, 2021

At this point, Gem Quest started to look like a game. And, at this point, I started to move away from just creating a tech demo to making something you could play. I dug out my old game notes and started adding new ideas to them. My mind started to fill with game ideas beyond what I had originally planned. And, looking at my memory consumption, I was pretty sure I had room for them.

I had been using Excel to build out the graphics. I know youíre probably asking why. To be honest, it was convenient and I could use the cells as a graph paper. I could also copy sheets into tabs, keeping all my ideas in one file. I should look for a better program, but it has been working for me. I started to clean up old tiles and build new graphics.

Screen Shot 2021-02-18 at 11.39.51 PMGem Quest Development, Screen Shot 2021-02-18 at 11.39.51 PM, Steven Reid, 2021

Going for something new: monsters, people and more.

At this point, development was going much faster. I was finishing up adding in the features from my first Gem Quest. I figured out how to add in statistics, with health and food now changing as you moved. It was at this point that I began moving beyond what Iíd coding in my original games. I now had monsters!

Screen Shot 2021-02-21 at 1.35.14 AMGem Quest Development, Screen Shot 2021-02-21 at 1.35.14 AM, Steven Reid, 2021

They werenít super exciting yet, but it was fun seeing different items now in the world. I started to add more graphics, such as the royal castle and chests. Ah, chests! You could now open them. But beware, they could be trapped and cause you pain. I also started to add in game elements such as the shrine and gems. Those will become a key part of the game play in the future.

Screen Shot 2021-02-22 at 12.06.04 AMGem Quest Development, Screen Shot 2021-02-22 at 12.06.04 AM, Steven Reid, 2021

From the end of February until this weekend, but development was full of fits and spurts. I didnít have a huge amount of time to work on the game, but it filled my thoughts. I spent a lot of time thinking about how the game will progress. Iíll really should capture some of that in my developer diary.

But the bigger challenge was thinking through more difficult challenges. Getting the NPCs added to the world was iterative. I created and refactored ways to add them into the game. I worked on combat, which to my surprise was pretty easy. The cool factor for me was when I got a chest to drop. I was so excited! Gem Quest was starting to play like a real game.

Screen Shot 2021-02-22 at 12.06.26 AMGem Quest Development, Screen Shot 2021-02-22 at 12.06.26 AM, Steven Reid, 2021

The biggest challenge was trying to get the NPCs to move. I found that random movement was easy, but getting them to follow was a pain. I couldnít quite get the math right. And then, it hit me! I figured out how to clear the current row using an AND. The algorithm just fell into place, and was much shorter than I had envisioned.

Screen Shot 2021-03-05 at 10.59.28 PMGem Quest Development, Screen Shot 2021-03-05 at 10.59.28 PM, Steven Reid, 2021

Dynamic graphics engine and the future.

Emboldened by my accomplishments, I started to add in more advanced functions. I wanted a more dynamic world, one that would give it an Ultima feeling. I really wanted to add darkness to the game. Reworking my the original graphic engine, I took a different approach to building the screen. Not only was I able to add in line of sight code, but I tightened it up quite a bit.

Screen Shot 2021-03-07 at 1.49.14 AMGem Quest Development, Screen Shot 2021-03-07 at 1.49.14 AM, Steven Reid, 2021

That brings us to the present where I have most of the game mechanics in place. I have a functional and fast graphics engine. My next task is to start building in the game locations such as castles and dungeons. In my notes, I have most of the story laid out. But I need to finish the final couple of game elements before I can piece it together.

Screen Shot 2021-03-07 at 7.38.44 AMGem Quest Development, Screen Shot 2021-03-07 at 7.38.44 AM, Steven Reid, 2021

I expect it will take me most this month to get that done. If all goes well, I might have the fist draft of the game by this Spring. For now, Iíll leave you with some game play video. Let me know what you think!



2 Comments on this article:

Congratulations

Written on Mar 10 by Phil

Hi Steven. Just dropping in to say hello, and to say Well Done! I stumbled upon your blog by accident while looking for details on MCODER II for the ZX81, and 2 hours flew past as I read stories & played games. It was great fun, took me right back in time. I was happy to see you're still updating things here, and as I spent many many years programming starting in '81, I can honestly understand your enthusiasm & comments on it all. I'm going to send this before I type too much & it suddenly erases it all LOL.....back soon, thanks for sharing your story here!

re: Congratulations

Written on Mar 23 by Steven

Hi Phil! Thanks for stopping by and your kind comments. I sure hope you enjoyed the trip. I never thought I'd still be learning about the ZX81 all these years later. I'm sure my friends think I'm nuts when I excitedly share what old program I worked on last week.

Reach out if you want to talk MCODER more. I enjoyed converting a few programs and have some tips.


Write a comment:

Type The Letters You See.
[captcha image][captcha image][captcha image][captcha image][captcha image][captcha image]
not case sensitive