Daily Update 274.2015

Changes:

  • Refactored verb handling to allow for preprocessing of important data (prior to the ‘before’ rules executing). In particular, this means I can canonicalize movement directions before movement rules are executed.
  • Moved ‘isOpen’, ‘onOpen’, and ‘onClose’ to Openable component.
  • Fleshed out Door component.
  • Added door to Hot Spring location.
  • Added rule for movement through doors.

Bugs & Problems:

  • Implicit door opening action text is printed after location text. Not sure why.
  • Need to add Locks component to handle locked doors.

Daily Update 271.2015

Little bit of progress today.

Changes:

  • Stubbed in the Twins
  • Added a description for when the player is inside the hot springs
  • Added a dialogue option for the Rainbow Sword

Bugs & Problems:

  • Need to handle ‘inside’ (and other types) descriptions in a general way
  • Need to have scenery available in multiple locations

Weekly Update #11

Chipping away this week when I have time away from work (which I don’t).

Changelog:

  • Tested various actions in the forest after recent refactoring.
  • Added a ‘counter’ helper. It uses the ECS setData/getData methods to keep track of how many times a particular event has happened. This will let me customize output and activities to be more dynamic. e.g. every third time you enter Dim Clearing, a butterfly flutters by. Or the first time you encounter a character, they’re surprised to see you.
  • Added Handlebars helpers to tie into yesterday’s ECS counter feature. Now I can add conditional templating in room descriptions and such based on how many times something has happened.
  • Added generic tracker of how many times a location has been visted.
  • Added generic tracker of how many times an object has been seen.
  • Added variable description for Ranger Bob the first time the player meets him.
  • Added variable description for Other East Trail the second time it’s visited.
  • Laid groundwork for making experimental context menus dynamic based on target. Disabled context menu on everything except name tags.
  • Added nametags with context dropdowns to Dim Clearing.
  • Nametag helper now generates nametags instead of tags.
  • Fixed clickability and styling of context items.
  • Fixed MOVE verb not outputting responses when invalid directions are given. More generally, the NLP once again allows text return values from verbs, which it appends to the response output.
  • Fixed speech tags (special purpose name tags for conversation trees) generating incorrectly.
  • Fixed EAT verb.
  • Fixed LOOK IN verb.

Known Issues:

  • Nothing new

Next Up:

  • Add The Twins.

Daily Update 269.2015

Busy over the weekend.

Thoughts:

  • Need to start leaving custom handlers for last, let functionality interactions happen organically. Especially important for puzzles to give player a ‘toy’ to play with as part of the process of solving.
  • Need more stupid and more rpg.
  • Ran some Numenera this weekend. Should try to draw more inspiration from my actual roleplaying experiences.

Context Menus

One of my many lofty goals for StupidRPG is the idea that it could be successfully completed using only the mouse (or touch, on mobile). This presents a number of challenges because I don’t want to compromise the textual nature of the output (i.e. I don’t want to clutter the output with a ton of available actions). Context menus are my first attempt at solving this problem. Text-input players can ignore them entirely (treat them as non-interactive text just like the rest).

What is a Context Menu?

It’s a little dropdown thingy that opens from clickable command tags (highlighted bits of text that perform an action when clicked). Generally speaking, clicking on a compass direction will move the player in that direction, and clicking an object or NPC will LOOK AT the object or NPC. Context menus allow for more actions to be available for each tag.

How do they work?

On the technical side, not every tag has context actions. Context actions are globally registered with the Entity prototype, which runs a bit of code each time a tag is generated to see which actions are suitable. Right now I have four actions defined:

  1. LOOK: Always available (if an object is being mentioned in a description, the player can obviously see it).
  2. TAKE: Available if the Entity can be taken (there’s already a flag for that).
  3. EAT: Available if the Entity has the ‘Edible’ component.
  4. TALK TO: Available if the Entity has the ‘Living’ component and has a Conversation object.

New actions can be added to the Entity prototype from anywhere (so modules can add new context actions).

What’s next? What’s missing?

Next up I’d like to add the ability for Entities to specify unique, arbitrary context actions (not shared with other Entities). This is a pretty easy task and will let me vary up the dropdowns (and expose some unique interactions and features the player might not be aware of).

The mobile problem: the context menu opens on hover. Hover is not well supported on mobile (some newer phones and tablets optionally support it). Switching to click will make behavior inconsistent because it’s not visually obvious which tags are simple click tags and which also have a menu. Could switch to tap on mobile and make all tags have a context menu (some with only 1 option). Requires an extra click but the behavior is more predictable.

Daily Update 267.2015

Changes:

  • Added nametags with context dropdowns to Dim Clearing.
  • Nametag helper now generates nametags instead of tags.
  • Fixed clickability and styling of context items.

Bugs & Problems:*

  • Nothing new

Daily Update 266.2015

Changes:

  • Added Handlebars helpers to tie into yesterday’s ECS counter feature. Now I can add conditional templating in room descriptions and such based on how many times something has happened.
  • Added generic tracker of how many times a location has been visted.
  • Added generic tracker of how many times an object has been seen.
  • Added variable description for Ranger Bob the first time the player meets him.
  • Added variable description for Other East Trail the second time it’s visited.
  • Laid groundwork for making experimental context menus dynamic based on target. Disabled context menu on everything except name tags.

Bugs & Problems:

  • Nothing new

Daily Update 265.2015

Changes:

  • Added a ‘counter’ helper. It uses the ECS setData/getData methods to keep track of how many times a particular event has happened. This will let me customize output and activities to be more dynamic. e.g. every third time you enter Dim Clearing, a butterfly flutters by. Or the first time you encounter a character, they’re surprised to see you.
  • Fixed MOVE verb not outputting responses when invalid directions are given. More generally, the NLP once again allows text return values from verbs, which it appends to the response output.
  • Fixed speech tags (special purpose name tags for conversation trees) generating incorrectly.

Bugs & Problems:

  • Nothing new.