Friday 26 February 2016

wadeclarke.com rebuilt and Time Warp extension for Inform 7

I just completed a new look renovation of my website and added an interactive fiction page while I was at it. The IF page is a simple hub of my games, tools, sites and blogs.

If you've not had a look over my creative projects before, I'd welcome your visit to my new site:

wadeclarke.com

Time Warp

In IF-dom, I am making available an Inform 7 extension called Time Warp. What it does: It puts a whole CYOA game I wrote on the Apple II+ when I was 12 or 13 into your game. Time Warp has lots of great endings like – 'YOU'VE GOT A LIFE-TIME AHEAD OF YOU...IN GAOL!' – all in the CYOA / Fighting Fantasy / Be An Interplanetary Spy vein.

It's all caps because the text was retrieved verbatim from the Apple II+ game, where all the text was all caps. Not a word, typo, punctuation or 40-character line justification has been revised.

Why would you want Time Warp in your game? Well, if it fits the aesthetic, why not? This would be a move in the tradition of Call of Duty: Black Ops, which had the whole of Zork in it as an easter egg, introduced by you interacting with an old computer in the game world. So in that case, your character was playing Zork.

I ported Time Warp to Inform 7 so I could make it an easter egg in Leadlight Gamma. I put an unlockable Apple II+ in the game's school.

Time Warp won't interfere with your game code. Just include the extension, then, at the point you want Time Warp to start, use the phrase 'run time warp'. I've put a demo online showing how you could embed it in an in-game computer prop:

wadeclarke.com/ifdemos/time_warp/

That site also has the link to the extension. You can right-click it and save as Time Warp.i7x

I'd enjoy seeing Time Warp show up as a diversion in an I7 game, or as a diversion in a bunch of games. In any case, this extension may just give you the idea for writing your own self-contained, reusable extension game. Or, if you want to write a really simple keypress CYOA by somewhat hacky means, look at the Time Warp code.

(You might be aware that I will be releasing a full-featured and non-hacky CYOA extension for Inform 7 in the not-too-distant future. The Time Warp way of doing things isn't suitable for anything robust or complex.)

Monday 22 February 2016

Sylvia - Depression in the movies! and elsewhere

The other day I watched Christine Jeffs's 2003 film Sylvia, a biopic about poet Sylvia Plath starring Gwyneth Paltrow, for the third time in life. It's a film I like a lot and find affecting, and which I feel motivated to write about in the context of various artistic efforts seeking to convey the experience of depression, including the IF Depression Quest.

Plath took her own life in 1963. I will be talking about that, and about related and unrelated non-G-rated ideas in what follows.

Gwyneth Paltrow as Sylvia Plath

Monday 15 February 2016

New beginning, new beshminning!


The game title A New Beginning indicates that there have been a series of beginnings. Or at the very least, one other beginning before this one.

What should the words 'The Final Cut' mean in a game title? I reckon something along these lines:

'This is the last and most definitive version of this game! The producers who got in the way of our vision and the cack-handed editors who failed to assemble the product correctly the first time we solid it to you have all been swept aside. At last we can present to you what we would have presented to you in the first place if it hadn't been for all these jerks and idiots. Also note that this is the last time we will be presenting this product to you, and we're doing it really definitively.'

But what do the words 'The Final Cut' mean in the pretty dumb-sounding title of the game -

A New Beginning: Final Cut ?

They mean: 'Hey. The game's on Steam now, and we got it working on Macs. Plus we added achievements and more localisation. PS The game is exactly the same as before.'

It's hardly Ridley Scott being denied final cut on Blade Runner then getting a chance to edit it how he wanted about ten years later.

In conclusion, all roads are imperfect, but some are dumb, and brainless use of terms like 'The Final Cut' and 'Director's Cut' in the process of glomming a few extra words onto the end of a game's title in order to flog it anew is part of the dumb road.

Monday 8 February 2016

I7 CYOA Framework update and overview

I've started writing the documentation for my CYOA extension for Inform 7. Two secret testers enjoyed the first example game and their excitement is getting me more excited.

The extension itself needs more examples and more testing, but having written the intro and overview, I want to share them now so that folks get a comprehensive sense of how this thing works and what it can do.

As for a shipping date – when it's ready!

INTRODUCTION

CYOA Framework for Glulx enables authors to create choice-based games or hypertexts using Inform 7. A world model switch allows projects to be integrated with Inform's world model features (rooms, objects, people, etc.) or to explicitly ignore those features if they're not needed. You can use this extension to do any of the following:

  • Create a project consisting entirely of prose, choices and links (no parser) with or without a world model underneath
  • Create choice-based interludes of any kind (conversations and puzzles are typical candidates) to include in a parser-driven game
  • Create hybrid projects in which the player can switch between the parser and CYOA mode at will (tricky, but doable!)

The extension handles the drudge work of automatically attaching keypresses and/or hyperlinks to choices depending on the player's interface preferences. The resulting CYOA projects are user-friendly and portable across a wide range of devices and input methods (keyboard, virtual keyboard, mouseclick, finger tap). Users can toggle a screen reader mode to further customise the interface.

The 'CYOA' of the extension's title stands for 'Choose Your Own Adventure', referring to the popular series of late twentieth century books and their mechanic of narrative progression via discrete choices. I named the extension 'CYOA Framework...' rather than 'Choice-Based Framework...' for two reasons:

1. The extension code is already crammed with incidences of the word 'choice'. Naming its choice-based mode 'CYOA mode' and being able to use the prefix 'cyoa' made everything easier.

2. It's a more spirited name.

Throughout this documentation, 'CYOA Framework for Glulx' will be referred to as CF, and the terms 'user' and 'player' are interchangeable, as are the terms 'game' and 'project'.

OVERVIEW

A master switch (cyoa-active) determines whether a project is running in CYOA mode or parser mode at any given time. An entirely choice-based game will never leave CYOA mode. As an author, you can toggle the game mode as required and direct where the player goes during transitions. You can also give the player the power to toggle modes at will.

The base unit of the CF project is the node.

A node generally consists of some prose describing the current situation or location, followed by a list of choices. Choices can also appear in the prose section of the node. (Graphics can be used as choices, too.)

In Inform terms, each node takes the form of a single node rule (e.g. 'This is the bedroom rule'). A node has four optional stages which run in a set order - setup, prose, choices, react. Having all the material for a particular node in one rule makes it easy to read and maintain.

CF offers four modes for automatically labelling choices with keypresses: numerals (1-9), letters (A-Z), particular (arbitrary key sequence defined by you) and smart (CF will use the first letter of the choice text, or a letter within each text flagged by you). You can change modes throughout your project as required.

When hyperlinks are on, all choices are automatically presented as clickable/tappable hyperlinks as well. Only the hyperlinks in the active node will function. Old hyperlinks are rendered inoperable every turn (with one exception discussed in the Advanced Concepts section further down.)

Having read the node prose, a user picks a choice by pressing the listed key or clicking on the hyperlinked choice. If the choice links to another node, the user will activate, or 'move to', the new node. An author can also link individual choices to Inform actions (e.g. 'opening the window'), to special 'continue' prompts, to custom programming, or to any combination of the above.

The extension supplies a world support switch (cyoa-support world) which lets you specify whether or not you want your project to be integrated with Inform's world model concepts: locations arranged in a map, manipulable objects in those locations, other characters who may or may not move around every turn, and the like.

If you set world support OFF, your CF project will behave a lot like a Twine project. There will be no rooms, objects or people to program or worry about. You will just be writing nodes of text connected to each other by choices. You can still avail yourself of any programming you need, but world model entities are rendered invisible in terms of the game's text output.

If you set world support ON, you need to assign every room in your game a base node. When the player moves to a new room in CYOA mode, that room's base node is activated, and while a player is 'in' a base node, they will perceive all relevant output from the world model. That's to say that objects and people in the room will be listed as usual.

If the player activates a non-base node (a node not specifically attached to a room) they are considered to be going 'off-node', during which time they will not see the world model-generated descriptions of objects and people in the current room. If they did, the intermingled texts could read confusingly.

Separate from the choices attached to particular nodes, CF includes a dedicated system of hotkey actions and a complementary options menu.

Hotkey actions are actions the player can invoke during any turn in CYOA mode by pressing the key(s) permanently dedicated to them (or clicking on their links if the player turns key input off). CF comes with a base set of 10 actions you can include:

  1. undoing
  2. mode-switching
  3. menu-visiting
  4. game-saving
  5. game-loading
  6. credits-reading
  7. interface-changing
  8. transcript-toggling
  9. game-restarting
  10. game-quitting

Hotkey actions are highly customisable. You can decide which ones are active, when they're active, what keys call them and which ones appear in the options menu. You can also create new ones.

The options menu (openable by a hotkey) makes hotkey actions selectable via CF's regular choice-listing format. Placing hotkey actions in the menu only can help free up more keys for use during regular play, declutter your status bar and move commands you believe users will need less frequently one step out of the way.

If the player can reach some kind of ending in your game, you can activate the CYOA menu equivalent of Inform's traditional 'final question' section. You can also customise the options that appear in the menu.

ADVANCED CONCEPTS

1. General actions

A general action calls its own node-independant block of code whenever a choice links to it, therefore it can be considered to be free of the context of any particular node. An obviously good, simple candidate to be a general action in a world model game is the inventory command, since the player's location and the state of the game have no bearing on it.

Choices that link to general actions are also the only choices in the game allowed to be made 'eternal', a concept mostly relevant if you force your players to use hyperlinks. If you switch cyoa-eternal general actions ON, all general action hyperlinks in the scrollback will continue to be useable until the screen is cleared. To make a project in which no hyperlink ever ceases to work, it must be built entirely out of general actions.

2. Dynamic/automatic choice generation

Making the appearance of a choice in a particular node conditional on the state of variables or the game is easy, but CF also allows you to generate choices – or kinds of choices – dynamically across a project. Here are a couple of basic examples: You could write a 'create gets' routine that scans rooms for objects and automatically creates 'Get (object)' choices for them. You could place an 'inventory' choice at the bottom of the choice list presented every turn.

For such purposes, CF includes four new rulebooks which run at specific moments as the extension processes and prints out the contents of a node -

  1. before preparing
  2. after preparing
  3. before choices
  4. after choices

By placing dynamic choice generation rules into the appropriate rulebooks, you can control when in the process any automatically created options will appear.

3. Limitations

The main thing CF can't do that some authors are likely to want to do is print choices or hyperlinks outside the main window, or in the status bar. Unified Glulx Input, the foundation of CF, doesn't support such things yet, so CF doesn't support them.

Graphics support in CF is of the most basic kind. If you use a graphic as a link, the graphic appears in the game window at its original size and flush against the left edge of the window. Nor can successive graphics be placed beside each other. But on the plus side, CF offers better support for graphics alt-text than ships with Inform.