cartoon pic of site's author
Blog  |  D&D Stuff  |  About  |  Other Places  |  rss logo

Idle thoughts about writing games

My first computer was a Commodore Vic-20, followed a couple years later by a Commodore 64. I'd actually asked for an Atari 2600 for Christmas, but after very brief disappointment of seeing the Vic-20, I learned it also could play games. And if you were at all fascinated by the computers of the day (I was), you perused the spiral-bound manuals that game with them and discovered the Basic programming language. Honestly, I was still much more interested in playing games than Basic or programming, but nevertheless I was soon writing little programs. I wish I'd been more precocious though. I remember the C64 manual had chapters on sprite graphics, which I messed around with and did some simple animations, but back then I never fully grokked what was going on.

Basic

Nevertheless, I mucked around with a Basic a bunch. Like lots of nascent programmers, I was intrigued how you could give the computer commands and it would do the things I asked it do. How cool! I remember making little programs that would ask your name and say hello, painstakingly making an ASCII animation of a stickman throwing a ball through a basketball hoop. (The C64's ASCII variant was pretty robust) Those are highlights that stick out in mind, but I made lots of dumb little programs.

10 PRINT "MY SISTER IS GROSS!"
20 GOTO 10

I typed in so many programs from magazines like Ahoy! and Compute! Gazette, sometimes modifying them a bit and messing around. But Basic was a toy language for baby, toy stuff, or so I thought. Real programs were written in 6502 assembly, and assembly was Mysterious and Difficult and For Adults. I learned much later on that a bunch of commercial adventure games were in fact written in Basic!

By the way, 50 Years of Text Games is a very cool read if you are into this genre, and the history of computer games in general.

I remember the C64 manual had chapters on sprite graphics, which I messed around with and did some simple animations, but I never fully grokked what was going on with them at the time.

All this to say that I mucked around with Basic but programming didn't become a more serious hobby for me until much later on.

I played a lot of text adventures back then and did attempt to make my own little games. My first efforts were just question/answer things. Like:

You are in a cave. There is an orc here.

Attack the orc? (y/n)

Come to think of it, the popular Choose Your Own Adventure books and the Steve Jackson Fighting Fantasy books were probably also an influence/inspiration.

However, those 'games' where extremely simplistic and never felt like real games to me.

I'm not sure if I ever played any Infocom games on my C64, but I remember playing one about a pirate and another about a vampire, which I think must have been made by Adventure International.

Those were much cooler than my question/answer games because you typed in instructions to the game and the (sometimes snarky) narrator responded as though you were having a conversation with it.

You are in a cave. There is an angry troll sharpening his axe.

> attack troll

How do you attack the troll?

> throw rock at rock

You throw a rock at the troll. He yelps and runs away deeper into the cavern.

In fact the first Interactive Fiction game, Colossal Cave Adventure, was an attemp to replicate playing D&D on computers. Same goal as the original Rogue and other early computer games, but a completely different approach.

At some point I figured out how to parse strings – this is such a trivial bit of code but at the time it felt like a major level up to me. I was so stoked! I was able to make a very simple two-word parser. It could handle commands like:

> west

You walk to the west. There is a lantern here.

> get lantern

More complicated parsing like the Infocom games did was beyond me. In my defense, Zork was written by a bunch of PhD and grad students working at MIT's AI lab...

But I had made a teeny, tiny world!

So once I got basic parsing working, I made a teeny little game. Well, maybe game is a strong word since there was nothing to do in it. A tech demo? But I scribbled down a little map of my 'world' on graph paper (my first game design!). It was a 4x4 grid or 5x5 grid of locations. I wrote descriptions for each location and wrote up a little text adventure-esque thing where you could walk around and look at stuff.

You are in a field. To the south you see mountains and to the east a forest.

> west

Tall mountains loom overhead.

But let me tell you, actually being able to WALK AROUND this little world I had created felt amazing. My own teeny little pocket universe.

After that, I wrote a few small text adventures where you had a goal and things to do, items and an inventory. They weren't very good but were fun to make.

Sort of graphics

One neat feature of the C64 was that a program could replace the default in-memory font. I've forgotten the details of how it worked, but I remember learning this and setting out to make a 'graphical' RPG. Something along the lines of Phantasie, I think the first crpg I ever played. Possibly my very first exposure to rpgs of any kind! A family friend briefly introduced me to D&D around the same time, but I can't actually remember which happened first.

So, I created my own font that had little 8x8 pixel art glyphs for trees, mountains, monsters, the player, etc. IIRC, I implemented basic character creation, a town, a small wilderness area you could explore, and the first dungeon. This wasn't a roguelike. The wilderness and dungeon were all hand-coded and didn't change game to game. There was a port of Rogue for the C64 but I don't think I ever played it.

Once again, it was absolutely thrilling having my own little, kind-of graphical world to walk around it with a monster or two to fight and some gold to pick up.

I wish I still had the source code for that one! In my dim memories, I kind of simulated having functions via GOTO statements. I was careful to have a 'main' program and you'd GOTO the combat code for fights, etc. Commodore Basic had only global variables so you had to be careful about everything and you wanted to avoid dreaded spaghetti code where you GOTO everywhere and your program becomes a mess to debug. There wasn't even a real code editor. You'd just type lines of Basic on the C64's command line and they'd be added to whatever Basic program you had in memory. It was a pretty painstaking way to develop and when I later discovered Pascal on our high school's Mac it was a real revelation.

Ultima IV

A hugely influential game was Ultima IV. I'll level with you: my copy was pirated. It was just part of the C64 culture that you had boxes and boxes of copied 5 1/4" floppy disks. If your friend had a game you didn't, OF COURSE they'd make a copy for you. What 13 year old had money for games?? I looked it up and upon release in 1985 Ultima IV cost $59.95 USD :O Pretty wild how the cost of games has barely changed numerically in 40 years. I'll need to remember this when I feel sticker shock at $90 (Canadian) prices these days...

I'm sorry Lord British, I have bought Ultima IV more than once since then and Ultima VI was one of the first games I ever saved up for and purchased...

That said, one side effect of playing a pirated copy was that I did not have the map a legal copy of the game came with. I just wandered around the game world exploring, eventually getting the lay of the land and discovering routes between the towns. Eventually you got a ship and could sail around to get a better sense of how the world was shaped.

Importantly, the act of simply exploring the world and slowly learning about it was as fascinating to me at the plot of the game. I'd do entire sessions just walking around, fighting random monsters and seeing the sights. What's on the other side of those mountains? If I sail my boat up the river will I find some new secret?

Another 80s game I absolutely loved back then was Seven Cities of Gold. It had procedurally generated worlds and I had the same fascination with sailing around and uncovering its geography. "What's over here? Does this river go anywhere cool?" Of course, in Seven Cities of Gold you were playing a Spanish conquistador and these days it should be regarded as rather problematic. Apparently the main designer intended the game to encourage friendly contact over war with the indigenous villages you met but...I don't remember that reflected at all in the gameplay...

I <3 Exploration

The colour scheme I've picked for Delve's overworld is, I'm pretty sure, an echo of Ultima IV's wilderness. Or at least trying to recreate the feeling and texture of it. What I'd would really love to recreate is that feeling I had of a world you could explore, that sense that there might be secrets just up the road, around the bend.

I don't think that game is Delve since I think I've settled on its somewhat narrow scope. But for a different game I wonder how far you could get with procedural generation without running into the 10,000 bowls of oatmeal problem. I'm imaging a game with a larger wilderness, several villages you could travel between and little dungeons and ruined towers and such. Games like Qud and Dwarf Fortress show you can generate histories, but I haven't played enough to know if they overcome the oatmeal situation.

But can you generate a dungeon that has things like So-and-so's Blade of Blading in it and then seed rumours among the nearby villagers? Create micro-plots like goblins or bandits attacking the nearby village and the player can help out? Will that stuff feel meaningful after you've played the game many times.

When I start up a new run in Delve I'm still enthralled just walking around with my little guy, exploring around the little world created by my code. I wonder if proc-gen techniques are sufficient to create interesting enough worlds for other people? (I think my impressions of my own games will always be a little coloured by "Woah! I made this!")

Assuming your intent is simply to generate a game world that's fun just to explore, a sandbox instead of having a fixed goal like most roguelikes, I wonder if you can sustain that feeling of discovery over repeated runs? It's a project I'd love to take on.

That's for the future, once Delve is post 1.0 and I don't feel guilty for not focusing my main efforts on that. I'd need to spend so much more time on design and planning and prototyping various systems than I ever did for Delve.

This was another ramble but I wanted to put into words how motivating and fun just making your own little world is, even if it is tiny (like 16 locations in a not-quite-a-game text adventure). And also record a reminder for Future Dana that exploring and discovering a fresh new world is an aspect of computer games that really appeals to me.