Tuesday, July 5, 2016

Roodylib 4.1.2

I'm several months late in helping someone code a scene in their game, so me being me, that means I went and got Roodylib ready for a new release!  SORRY, JIZ!

The three main elements of this new update are:

  • Incorporated the accessibility code mentioned one or two posts back into Roodylib and made them available by default.  I may add another accessibility feature at some point- some kind of spelling system for uncommon words (as discussed on the intfiction.org forums)
  • Code supporting Nikos Chantziaras' Hugor opcodes system
  • Incorporated "newmenu.h" into Roodylib so one doesn't have to include the extra file.  I added mouseclick support to menus sometime within the last handful of months, too.

Sunday, May 29, 2016

"sandbox" modes

After completing Michael Berlyn's Suspended, a player is given a special command that allows configuration of the main game- moving robots here and there, changing the timer, etc.  I heard about this feature many years before I actually beat Suspended.  At the time, it sounded like overkill for a game that I had bashed my head against (although in hindsight, it's really not the Herculean effort I thought it was).

I have to admit that, having beaten the game and finally being familiar with how things fit together, the extra challenge mode seemed like a cool idea.  Wow, a player could really make this game as hard or easy as they want to; I could see a fun optimization puzzle emerging.  I have to admit that I never actually played much with this extra mode, but it was cool to see and finally understand.

I've pondered nice ways to provide a similar experience for players, and the easiest answer I came up with was to give the player a magic word when the game is completed that turns on debugging mode.  They'd be able to look at the object tree, move objects or the player around, or even control how daemons run.  I thought this would be a fun way to share the innards of the game with the player; for some reason, having game source available doesn't provide the same thrill unless it's, say, in Hugo and I'm applying new Roodylib functionality to it or something for my own curiosity.

Today's code sample supplies this magic word debugging system.



Now I just need to write a game that players would want to dig into!

Saturday, May 28, 2016

general update and "bags of holding"

Some interesting news in Hugoville.  Nikos Chantziaras has added an opcode system to Hugor, allowing for some special behavior here and there.  Unfortunately, along with posting here about stuff more often, I've been meaning to update the Roodylib documentation to cover all of the new stuff and put out a new release.  So, more news down the road!

In the meantime, I thought I'd share some code examples I put together the other month; well, one now, one next time I write here.

Today's bit of code will be for what IF lingo calls a "bag of holding."  I'd say they were first popularized in late era commercial IF although they first showed up a bit earlier than that.  Players still had set carrying capacities so object-management was required, but one object in the game- usually a bag or knapsack- could carry a limitless number of objects.  As soon as you couldn't pick up anything more, you'd stick stuff in the bag of holding and, yay, looting can recommence!

Bags of holding got even cooler when the game would automatically stick stuff in them for you.  Today's code sample will be an automatic bag of holding system in Hugo.



Just set the bag_of_holding global to your bag of holding object, and there you go!  Now, admittedly, this system is pretty simple. It only allows for swapping one object that, when moved, will create enough space for the new object. I considered writing another pass if the first one didn't find a suitable most, but I figured that this behavior would fit most games.  If a game has large variance in object sizes, the large objects probably should get special treatment through before routines and such.  Plus, it's always kind of ugly when you try to pick something up and then half of your inventory is moved to the bag of holding so I didn't want to encourage that.

Monday, February 15, 2016

Announcing the Hugo Notepad++ add-on

Some people were unable to use my standalone Notepad++ package because they already had Notepad++ installed.  I finally got around to putting together a package adding (most of) its functionality.  Just download the following file and follow the instructions in the .pdf file!

https://drive.google.com/file/d/0B_4ZXs4Z_yoWclhaOFFYQ3JScjg/view?usp=sharing

It includes the compiler, an interpreter, and library files, so once installed, you'll be ready to start writing your Hugo game!  As mentioned in the .pdf, all of the new commands will be under the Macros tab when you're done.

Saturday, January 16, 2016

new ZIL blog

Just a quick note that I've started an additional blog where I'll write about my experience exploring ZIL, the language used to write the Infocom games:

ZIL Crazy After All These Years

Feel free to tag along!

Saturday, January 9, 2016

Updates in Accessibility

I spoke about accessibility in the last post.  It was brought to my attention that NVDA, another screen reader, does in fact work with some Hugo interpreters.  This was exciting news as I could finally test my new accessibility code.

For one thing, I was pleased to discover that my option to disallow screen-clearing was in fact justified; in-game screen clearing occasionally causes NVDA to lose track of the text.  For the meantime, I'm taking the "clear every turn" option out until I learn of screen reader software that might work with.  I'm also pretty pleased with the switching-the-prompt command; "Your command..." sounds a lot better than "greater than."

If anyone wants to try NVDA out themselves, you can download it at http://www.nvaccess.org/download/

You can get the add-on someone wrote for several IF interpreters at http://jeff.tdrealms.com/Add-Ons/IfInterpreters-1.1.nvda-addon

I found finding the place to install the add-on in NVDA was a bit of a search, but dig enough, and you'll find it.

The add-on specifically targets the winglk Hugo interpreter which can be downloaded at http://ifarchive.org/if-archive/programming/hugo/executables/hugov31_winglk.zip

Lastly, download any of the following games, compiled with Roodylib's new accessibility code.  Now, they're not my games (I'd much rather have people play something good) so please don't redistribute; these are just for personal use.

Spur: https://drive.google.com/file/d/0B_4ZXs4Z_yoWOFg2b2FUZVBXeTQ/view?usp=sharing
Guilty Bastards: https://drive.google.com/file/d/0B_4ZXs4Z_yoWNG5TX1BMem9TWmc/view?usp=sharing
Down: https://drive.google.com/file/d/0B_4ZXs4Z_yoWZkVtUndXQ0VUcGs/view?usp=sharing

Accessibility commands are listed if someone types the suggested "INFO" command.

Moving your mouse reverts NVDA to "hover over words" mode, so for best uninterrupted behavior, leave your mouse alone.

These accessibility commands will be on by default in future releases of Roodylib.

Wednesday, December 16, 2015

Roodylib non-progress and a ZIL update (gasp!)

Since the last Roodylib update, I've been working on a couple things.  Unfortunately, none of them have been very successful which is especially unfortunate because I noticed a capitalization bug I introduced into the last Roodylib release (only seen when someone UNDOs after taking their inventory) and it'd be nice to put out an official release as soon as possible.

Plural Class Stuff

I have a folder of little bits of Hugo code to specifically test this or that functionality.  For example, since I haven't really used Hugo's plural class support much in my own games and WIPs (I have used it a couple times but nothing that'll give the code a good workout), I made a dishwashing simulation where the game begins with 3 dirty dishes and as you wash them, they turn into clean dishes.  Already this little bit of code has been useful to me since it helped me catch a typo in the original plural class code, but it never has been working perfectly so I put it aside to look at again one day.

I took that closer look a few weeks ago; actually, before I started looking at the code again, I thought there might even be a chance that my tweaks to the plural class code since then might have resolved the original issue.  Sadly, no, this was not the case, ha.

The issue was that the game wasn't recognizing the references to the clean dishes once there were 2 or more of them.  It turned out that, just how the attachables system makes the assumption that there is only one attachable in scope, the plural class system makes the assumption that there is only one item in scope with the same noun property.

Hugo's plural class system is a complicated bit of pre and post engine-parsing parsing.  Trying to fix the problem through little code tweaks was unsuccessful in the end, so I think I'll need to re-design the whole thing if I really want it to work.  Like the only-one-attachable-in-scope thing, I don't think I'll revisit this problem until someone's game in progress requires me to do so (or I get really really bored).

Accessibility

Last month, there were a couple posts to the intfiction.org forum by people who use screenreaders to play IF.  I had actually been wanting to get in touch with someone about that for months; at one point, I tried to write to the Audyssey mailing list but I think I used the wrong link and felt too self-conscious to keep trying, haha, so I was excited to finally have some people to talk to.

One got back to me right away, and I began working on extra Hugo commands to present the screen as nicely as possible to screenreaders.  Eventually, I decided the wisest thing was to test it myself, so I installed JAWS for the first time in 10+ years and was painfully reminded that no Hugo interpreters- not even the glk one- work with it.

Still, some interesting threads came up in my research:

http://www.inthecompanyofgrues.com/?p=220 (and the thread discussing it) - Makes several interesting points about accessibility and was very useful in reassuring me about the usefulness of some of my ideas.

http://www.intfiction.org/forum/viewtopic.php?f=6&t=8690&start=0 - Lists interpreters that already work well with screenreaders.  Seems like the main deciding factor is whether text is selectable in the main window (without going to scrollback).

So yeah, my Hugo code is pretty useless until there's a Hugo interpreter that works with screenreaders (technically, there's a 16-bit simple DOS interpreter that should work but I've found that it crashes for larger games), so that project, too, goes on the backburner for a while.   Possibly I'll implement it in ZIL in the meantime.

ZIL!

Speaking of ZIL, I wanted to end this post with at least one tale of success.  I was quite excited to see Jesse McGrew's ZILF 0.7 release.  It comes with his complete re-implementation of Adventure and has examples of the kind of character command code I need for my ZIL project ideas.

As I did for Hugo, I made a notepad++ ZIL distribution with some syntax highlighting and buttons for project creation, compiling, and running games.  To be totally honest, I don't always keep the same kind of functions the same color, changing it up a bit for readability, but if people find that confusing, of course, feel free to edit it to your heart's desire (and I'd be interested to see what you do with it).

ZIL notepad++ screenshot
 Unfortunately, these standalone versions of notepad++ don't seem to work for people who have notepad++ already installed (and are storing settings in user settings).  At some point, I may write instructions on how to integrate these things into your own notepad++ installation, but it's complicated as the Customize Toolbar plugin I use to provide buttons doesn't currently allow for different-buttons-based-on-the-currently-open-file.

Anyhow, if you'd like to play around with it, you can get it here.