Profiling

The SRPG engine doesn’t have much built-in profiling (performance, memory usage, etc), and to be honest I don’t know much about profiling in Javascript. It’s one of the many low-priority items I need to research, so I’m making note of it here.

The engine doesn’t currently prune unused/inactive objects, leading to some concern that it will scale poorly once more of the game is built (e.g. running NPC ticks for characters across the world, consuming memory by keeping locations that can no longer be accessed, etc).

On the other hand, I don’t want to optimize prematurely. It’s possible the total size of the game won’t be big enough to cause problems on a decent computer.

StupidRPG: Putting the Prelude Together

The Black Box is getting close to complete, so I want to review my goals and make sure what I’ve built (am building) is right. This list is not exhaustive, but it’s a start.

At the beginning of the prelude/prologue:

  • Don’t assume the player knows how to play interactive fiction. Conventions may not be clear, some hand-holding may be required.
  • The player has one or two utility items (wand, boots, notebook, etc).
  • The player knows nothing about the story, the world, the tone, or the game mechanics.

In the middle:

  • The player is proficient at moving around the world, interacting with objects, and speaking to NPCs.
  • The player has acquired additional items, such as the Rainbow Sword.
  • The player has started one or more quests, and may have completed a side quest already.
  • The tone of the game and the core mechanics are established. A small amount of worldbuilding has been done.

At the end:

  • The player has completed multiple quests and received rewards for them.
  • The player has a general idea of what the overall story is about.
  • The tone of the game is firmly established, but there will still be surprises.
  • The player has interacted with multiple NPCs, who may be friends or enemies now based on the player’s actions.
  • The player has had an opportunity to use at least one of their class/race traits.

Weekly Update #7

Slow week. Haven’t had much free time.

Changelog:

  • Simplified and expanded some of the Prelude plot points
  • Planned out a new character and some quest changes

Known Issues:

  • Nothing new

Next Up:

  • Fill out Ranger Bob’s dialogue tree.
  • Add The Twins.
  • Wrap up litterbug quest
  • Fill in new character

Reading List Update

I finished reading two books recently, one about the making of Karateka (a game I’ve never played, but by the developer of the original Prince of Persia, which I’ve also never played), and the other about game design in general.

Karateka

This book was the inspiration for this dev journal, as it’s less of a “how I made a game” book and more of a “here is everything I wrote down as a teenager while making a game” book. A lot of it doesn’t have broader applicability to game development, but certain portions resonated with me. Especially the sections about motivation. It’s easy (sometimes) to know what you should do. It’s often harder to do it, for reasons that are both mystifying and frustrating.

Motivation isn’t quite the right word. There seems to be a difference between being motivated and actually doing something. The latter is an ongoing challenge for me. Sometimes I find myself simply doing nothing, paralyzed not with indecision but with…? I’m working on it.

The Art of Game Design: A Book of Lenses

I just finished reading this, and I already feel like I need to re-read it. If a book can make you a better game designer, it’s this one. It doesn’t have all the answers, but it has a glut of food for thought. “A Book of Lenses” is a very apt description/subtitle: it provides many, many different ways of analyzing game design, based on psychology, storytelling conventions, logic, and dozens of other facets.

This dev journal is mostly focused on the creation of StupidRPG (a game), but many of the lenses from The Art of Game Design are applicable to general software development. Understanding your audience, how they will use your product, and what you’re trying to accomplish are incredibly important. I wouldn’t hesitate to recommend this book to colleagues who have no interest in game development, but are involved in product development in some capacity.

Next Up

I’ve started reading Gödel, Escher, Bach: An Eternal Golden Braid, by Douglas R. Hofstadter. The existence of this sentence makes me feel pretentious somehow. I don’t understand this book yet, beyond the shared concept of ‘loops’ in fields of mathematics, music, logic, etc. The book (a reprint) contains a lengthy forward which addresses (sort of) the intent and meaning of the work. The gist seems to be that most people misinterpret what it’s about. This seems reasonable; a piece of literature that took decades to produce is unlikely to be fully comprehended on first reading.

On the plus side, it has a lot of interesting information about fugues, fractals, and other things starting with F.

StupidRPG: Always Two, There Are

Spoilers inbound. In recent reading, I came across a reference to an interesting rule of twos in scriptwriting: everything in the script should serve two purposes. While this is probably best applied with care, it got me thinking about some of the story/gameplay elements of StupidRPG, and how I could tie things together in a more elegant way.

For example:

In the starting area of the game, Ranger Bob makes reference to a litter problem, which he suspects is the fault of local youths. If the player ever encounters the litterbugs (which is not something I considered guaranteed), it would probably be in town during Act III.

The more I thought about it, however, the more unnecessary it seemed. Rather than introducing a bunch of new NPCs later in the game (when the player may have forgotten about the litterbug quest entirely), why not tie it into something happening in the present?

Enter the Troglodyte, denizen of the forest caves, avid beer drinker, and general layabout. He has a rough life, gets little respect from anyone, and has recently acquired an interest in soaking in the hot springs after a couple drinks.

I like this approach because it connects two components of the starting region. Cause, effect, and solution are locally available for the player to experience.

I also have something in mind for the Hot Springs themselves, the presence of which seemed strange to me in a region that otherwise doesn’t seem thermally active. Something to talk about another day.

In the meantime, I’m trying to look at my storytelling from new angles. I hope the connections will help create a more cohesive world.

Metagame

Points. Achievements. Trophies. Badges. Lots of examples of metagame elements out in the wild. I don’t plan on including points in SRPG, but something achievement-esque might be in the cards. In particular (I feel like I say that a lot), I’d like to acknowledge interesting or dedicated player behaviors (licking every item in the game, finding all the secret areas, etc).

Quest tracking provides a simple percentage scale of game completion, for those who want to really feel like they’ve done it all. Mandatory quests will probably account for 60-80% of this, with more ambitious players able to get that coveted 100% (sounds suspiciously like a score/points value).

I’ve also been thinking about trying to generate some kind of adventure log to describe the player’s journey (and choices) in long form (as if it’s a legend being told generations later). The idea appeals to me because it feels less cold than a quest log or stat screen. I’d be very interested to see the differences between the game’s adventure log and the player’s own story about how they played the game.

StupidRPG: Wandering

Two things to talk about today, both related to wandering. Mild mechanical spoilers.

Nooks & Crannies

This is really just fleshing out the world, and giving the player an incentive to poke around beyond the level required to complete the game. Easter eggs aside, everything in the game (required or optional) should add to the experience in some way. In other words, having side areas simply to pad the node count isn’t my goal. I’m more interested in adding side areas (and items, and characters) that give optional insights into lore, help build the world, or add to the story.

Overworld

Most of the time, the player moves around the world via commands like WALK NORTH (or simply NORTH or N). Location nodes are connected via compass directions (plus special cases like up and down), usually in some sensible relation you could draw on a map.

Act II of the game includes a large region best described as an overworld, where movement is slightly different. Compass directions still apply, but not every spot on the map is a distinct location node. Without giving away too much, it’s an exploration-based area, so learning how to traverse it (and finding the hidden mysteries scattered around it) is a significant portion of the Act.

With that in mind, I’m considering a few novel command modifiers for the WALK verb. In particular, I don’t want to get into miles or kilometers (e.g. WALK NORTH 1KM), but WALK NORTH REALLY FAR sounds like fun. So far my measurements are:

  • A bit
  • A ways
  • A long way
  • Really far

Playtesting will have to determine whether this is actually fun/interesting, or simply annoying. If I’m going to annoy the player, I want it to be intentional.

Tutorial Quest

The answer to my tutorial conundrum was staring me in the face all along: Quests. Today I set up a fully-functioning first quest, which also acts as a brief tutorial on how to acquire items. It’s just a proof of concept, but it includes every piece of a more complex quest:

  • Trigger to receive the quest (game starts)
  • Objectives (acquire the sword)
  • Game tick handling to check for objectives being met (player has sword)
  • Game tick handling to end the quest (all objectives met)

Still running into occasional problems with prototype behavior in JS, but I’m slowly figuring it out.

StupidRPG: Hot Springs

Mild spoilers today.

The hot springs location, like most things in SRPG, serves more than one purpose. The most immediate way in which it becomes relevant to the plot is the discarded refuse (see also: Litterbug Quest), but there’s more than meets the eye.

Ranger Bob suspects local ‘youths’ of scattering trash around, given their keen interest in the hot springs as a hangout spot. It will be up to the player to determine if this is the case, or formulate an alternate theory.

While we’re on the subject, why is there a hot springs here to begin with? The mountain is miles away, on the other side of town. Might be worth looking into.

Weekly Update #6

Things!

Changelog:

  • Added ‘empty’ template helper to change printing of container descriptions based on whether they have anything inside.
  • Added ‘when’ template helper to allow conditionals other than true/false.
  • Added ‘nothing’ component for abstract objects (like a hole).
  • Added ‘part’ component for objects attached to other objects.
  • Added LOOK IN verb to look inside containers.
  • Added MUSIC verb to toggle music on/off.
  • Added THEME verb to switch between visual themes on the fly.
  • Added Quests module and QuestObjective functionality.
  • Added QUESTS verb to show quest/objective status.
  • Added litterbug quest (not completed).
  • Added bird feeder for litterbug quest.
  • Added ‘litter’ component for litterbug quest.
  • Updated description process to include object reference (for easier description logic and templating).
  • Disabled game ticks for: music, inventory, credits, help, save/load, and quit commands.
  • Fixed missing regions for forest locations.

Known Issues:

  • Nothing new

Next Up:

  • Fill out Ranger Bob’s dialogue tree.
  • Add The Twins.
  • Wrap up litterbug quest