Category Archives: Quest

Quest 5.0 Technical Preview now available

The first Quest 5.0 Technical Preview version is now available.

This is a very early release. Most importantly, it’s limited to hand-coding games (there’s no visual editor yet), and there’s no support for games for earlier versions of Quest. These features will be added over the coming months/years (it’s going to be quite a while even before the first proper beta versions).

You can download it from the new Quest 5.0 wiki at quest5.net

If you have any feedback or questions, please drop me an email or see the forums.

Enjoy!

Verbs, Commands and Templates in Quest 5.0

Note: this information is now out of date. Please see the updated article on the Quest 5 wiki

Quest 5.0 currently follows relatively similar principles to previous versions when it comes to processing player input. I say “currently” as this may change over the course of the technical previews and beta versions, and I say “relatively” as although based on the “old” system, there is a lot more flexibility and power in the new way of doing things. In a nutshell, we retain the concepts of verbs and commands.

Here is a simple command:

<command command="test">
  msg ("Hello")
</command>

This allows the user to type “test”, and in response prints “Hello”. So far, very similar to Quest 4.

Verbs let you add “doing” words, to let players interact with objects. For example:

<verb command="eat">You cannot eat that.</verb>

This would let the player type “eat crisps”, and provide a sensible response for when the player tries to eat other objects in the game.

Templates

Core.aslx defines the behaviour for standard verbs such as “look at”, “speak to” and so on, but the actual text for the verbs themselves comes from the language library (English.aslx). To have the behaviour in one place but the verb itself in another, we have templates, which look like this in English.aslx:

<template name="eat">eat</template>
<template name="cannot_eat">You cannot eat that.</template>

A French version might look like:

<template name="eat">mangez</template>
<template name="cannot_eat">Vous ne pouvez pas manger ça.</template>

We use square brackets in Core.aslx to dynamically replace text with the template. So Core.aslx might have a line like this to define the verb, which will behave in exactly the same way as the verb in the above example:

<verb command="[eat]">[cannot_eat]</verb>

As well as using square brackets, for <command> tags you can use command templates. These let you specify multiple ways of expressing the same command, which each resolve to the same template. For example, English.aslx might define an “inventory” command like this:

<commandtemplate name="inventory">i</commandtemplate>
<commandtemplate name="inventory">inv</commandtemplate>
<commandtemplate name="inventory">inventory</commandtemplate>

That way, “i”, “inv” and “inventory” all resolve to the same template “inventory”, and Core.aslx can define the behaviour of the command like this:

<command template="inventory"> ...

Matching objects in commands

For more complicated commands, such as “put apple on table”, you can match objects within a command. Quest 5 lets you use regular expressions for this:

<commandtemplate name="put"><![CDATA[
  put (?<object1>.*) (on|in) (?<object2>.*)
]]></commandtemplate>

This may look slightly frightening at first glance, but it’s pretty simple underneath the scary syntax. The “<![CDATA[” section is there because we need to use “<” and “>” characters for the named groups in the regular expression, but we will have an invalid XML file if we don’t use a CDATA section.

For any named group with a name starting with “object”, Quest tries to match it to an object in the current visible scope (e.g. the objects in the current room, plus the objects in the inventory – I’ll be discussing scopes in more detail in a future post). You can also have named groups starting with “exit” to match available exits.

When the script for the command runs, local variables “object1” and “object2” are set to the objects specified in the command, so you can access their properties directly using “object1.parent” etc.

It may be the case that this mechanism is refined as we go through the development process, as regular expressions are probably overkill. It might be nice to simplify the named group syntax so that you can write “put #object1# (on|in) #object2#” in a similar way to Quest 4.x.

Dynamic Templates

Templates are used for all the standard output from Core.aslx. This includes the standard error messages, such as “I don’t understand your command”.

A dynamic template is a template that can call functions and read properties. This is useful for dynamic responses such as when the player tries to take an untakeable object. Usually, a response of “You can’t take it” is sufficient, but what if the object is a female character? Dynamic templates to the rescue – they are essentially functions that return a string value, for example:

<dynamictemplate name="TakeUnsuccessful">
  "You can't take " + object.article + "."
</dynamictemplate>

A female character should have their “article” property set to “her”, so this will print “You can’t take her.”

To print this from a script, call the DynamicTemplate function, which takes two parameters:

msg (DynamicTemplate("TakeUnsuccessful", object))

Note: this information is now out of date. Please see the updated article on the Quest 5 wiki

The Quest 5.0 .aslx game file

Quest 5.0 uses a new XML-based file format, and files have an .aslx extension.

Here is a simple example:

<asl version="500">
  <include ref="English.aslx"/>
  <include ref="Core.aslx"/>

  <game name="Test ASLX Game"/>

  

    <exit name="east" to="hall"/>
  </object>

  

  

    <exit name="west" to="hall"/>
  </object>

</asl>

This example defines what in previous versions of Quest would have been three rooms – a lounge, a hall and a kitchen. In Quest 5.0 these are just objects, and they themselves contain the objects “sofa” and “sink”. By nesting <object> elements, you can define further objects inside objects.

Libraries

There are two libraries included in this example:

  • Core.aslx provides the default Quest functionality, including: showing room descriptions, implementing default verbs such as “take”, “drop” and “use”, opening and closing containers, and deciding which objects are currently available to the player.
  • English.aslx provides the English text for the built-in default responses, and the names of the verbs whose behaviour is defined in Core.aslx. This means Core.aslx is language-neutral – if you wanted to make a game in German or Spanish, just translate English.aslx and plug it in to your game.

Properties

Each object’s properties are defined in the XML. In previous versions of Quest, there were only two data types – “properties” were strings, and “actions” were scripts. To make things more confusing, the properties and actions for an object were separate from the tags specified in the ASL file, so you couldn’t always read all the information about an object from a script.

In Quest 5.0, everything has been unified into properties, and there are more data types available, with the XML “type” attribute used to specify the type. If no type is specified, the string type is assumed, as with the sink’s “look” property in the above example. An exception is if there is no data in the XML tag, in which case a boolean “true” is assumed instead – as in the “start” property for the lounge.

The available types are currently:

  • string
  • double
  • int
  • boolean
  • script
  • list (of strings)
  • list (of objects)
  • object
  • exit
  • null

The type of a property can determine the behaviour of an object. In the above example, the sofa’s “take” property is a script, so that will run when the player types “take sofa”. If the “take” property is a string, the object will be taken and the string will be printed. This behaviour is defined in Core.aslx.

Properties can change type while the game is running, by simply setting them to a new value.

Additional properties

When Quest loads the game, it will set the following additional properties on objects:

  • name – string, from the “name” attribute specified for the <object> tag
  • parent – reference to the containing object, or null if the object has no parent

The player object

The player is itself an object in Quest 5.0. Here, the lounge has the property “start”. Core.aslx defines the player object, and when the game starts it will move the player into the start room by setting the player’s “parent” property to the first object that has a “start” property set to “true”.

An overview of Quest 5.0

Quest 5.0 is under development, and is substantially improved from previous versions. Although it is still a long way from being released, I thought it would be a good idea to write a series of blog posts discussing how the new system works, and the new capabilities this will bring to the system.

Limitations of Quest 4.x

Quest has grown over the years, from the very limited and somewhat quirky Quest 1.0 back in 1998, to the much more powerful system that it is today. However, it is still based on those foundations laid over a decade ago, and this means that it would be hard to implement some frequently requested features without a fundamental rewrite. This is the reason for taking Quest “back to the drawing board” – Quest 5.0 is a brand new text adventure game system, but taking many cues from the current design of Quest.

Doing more with less

The main idea behind the new version of Quest is that most of its features should be implemented in Quest itself. This is a fundamental change from the way previous versions have worked – in Quest 4.x, there is code for handling the ASL (the Adventure Scripting Language, which is how games define their own logic), and there is also separate code for providing the default behaviour for games, such as what happens when a player takes an object, how to print room descriptions, etc.

By contrast, Quest 5.0 is designed to handle as little default game behaviour as possible. Instead, all this code is written in ASL itself, and defined in a core library. This means that as a game author, you can see exactly how the system works at quite a deep level – and more importantly, you can override this and specify your own behaviour instead.

Many concepts which were separate in previous versions have now been unified. For example, Quest 4.x has separate ideas about rooms and objects, and the player itself is something different again. In Quest 5.0, these are all just objects. An object can contain other objects, and they can contain objects themselves, and so on. So when the player enters a kitchen, the player object moves inside the kitchen object. The kitchen then contains the player, in exactly the same way that a fridge defined in the game might contain a bottle of milk.

Eating one’s own dog food

In writing the fundamental behaviour of Quest in ASL, I have had beef up the power of the language. By “eating my own dog food”, I have had to design ASL to handle many things that previous versions simply couldn’t cope with, with the result that it is now a much more powerful and capable language. Expressions are now fundamental to the way ASL works, for example, and there is built-in support for handling lists.

Technical Preview

I’m very excited by the potential of the new system, and I’m keen to release an early version as soon as possible so I can get your feedback. This will be a very rough “technical preview” version, with plenty of functionality missing – there will be no visual editor and no ability to load Quest 4.x games – though of course these will arrive later. I expect to release this preview version in the next month or two.

Stay tuned this blog for updates, and if you have any questions or ideas then please post to the new Quest 5.0 forum.

Quest 4.1.2 is now available

Quest 4.1.2 is now available.

This release improves the performance of large games.

It also fixes the following bugs:

  • A run-time error could occur when typing “put on” if that command did not exist.
  • Locked exits weren’t working in packaged games.
  • Some container-related messages were not present in the LDF file.

If the JAWS screen-reader is running, QDK now shows the old-style menus and toolbars as these are easier for the screen-reader to work with. In addition there is a new “Go To” menu for JAWS users which makes it easier to select items from the Treeview.

Quest Pro users can download the update from http://www.axeuk.com/mydownloads

Non-Pro users can download the update from http://www.axeuk.com/quest/quest412.exe

Quest 4.1 Beta is now available for testing

This weekend’s second Quest release is the test version of our next upgrade, Quest 4.1 Beta.

I’ve already blogged about this release here, and you can now download it for testing:

Please note this version is intended for testing only – we strong recommend you keep backup copies of any game you’re working on. We also recommend you install to a separate folder so you can keep your existing Quest installation.

Also please note that the documentation has not yet been updated.

Below is an overview of what’s new. For further details, you can check the VERSIONS.TXT and VERSIONS-QDK.TXT files the folder where you installed Quest.

Quest Packager (part of Quest Pro only)

This is a new product that lets you create a setup EXE file for your game, so your users can install it just like any Windows application. No longer do you need to tell people to download Quest separately – you can just send them an EXE file that will install your game for you. This opens up the possibility of submitting your game to software download sites, greatly increasing the number of people you can reach!

Quest

– Lockable exits
– Exits are implemented as objects, so you can check their status using the Object Debugger.
– You can now do “for each exit in game/<room>” to iterate through all exit objects.
– You can now specify a script when using “create exit”.
– You can now destroy directional exits e.g. “destroy exit <room1; northeast>”
– QSG files no longer save redundant property and action information, so saving and loading games is now much more efficient.
– For ASL 410 and later, the “visited” property for a room is now set only after the description for the room is printed, so you can print a different description if the player has visited the room before.
– New error “defaultwait” lets you specify default prompt for the “wait” command.
– Can now use “for each room in game” to get a list of rooms in the game.

The following bugs have been fixed:

– objects overriding actions specified by more than one type wouldn’t override correctly.
– objects and rooms created via the “create” command didn’t pick up the “default” and “defaultroom” types. This has been fixed only for ASL 410 and later to preserve backwards compatibility.

QDK

QDK has had major internal changes, and has a cleaner look.

– New toolbars
– Word-processor style text editor is now used for editing room descriptions, text blocks, and “print a message” scripts.
– Procedures, functions, timers, object types, status variables, synonyms, menus and resources are now accessed via the tree instead of the menus.
– “Back” and “Forward” buttons on the toolbar
– New exit editor for rooms combines the old “Compass” and “Go to” tabs, and allows for editing lockable exits.

Because QDK now uses some .NET 2.0 SP1 components, QDK no longer runs on Windows 98 or earlier. Windows 2000 or later is required to run QDK.

Other changes

As reported earlier, QuestNet Server is no longer part of Quest 4.1.

Testing

As this is a beta release, please be aware that you will almost certainly encounter bugs. Please do report any you find – please email me at alex@axeuk.com. As we have done with previous betas, I will be awarding the people who submit the most helpful bug reports with free Amazon vouchers. So please get testing and let me know your feedback!

Quest 4.0.5 is now available

Quest 4.0.5 is now available.

If you’re a Quest Pro user, you can download your update from the “My Downloads” area at http://www.axeuk.com/mydownloads

Otherwise you can download Quest 4.0.5 from http://www.axeuk.com/quest/download.htm

This is a bug-fix release, which addresses the following bugs:

Quest
– fixed various crashes when running using JAWS.
– when connecting to a QuestNet game with a blank title, Quest wouldn’t successfully connect to the game.
– when double-clicking a QSG file in Explorer, if the ASL/CAS file was not found and you chose not to find it, quest.exe would remain running in the background.
– The word “and” was hard-coded (for room descriptions “You can see …, … and …”). This has now been added to the LDF file so it can be translated.
– Variable names containing capital letters could cause a run-time error.
– If a game contained parameters with no end-of-parameter “>” character, no error would be reported.

QuestNet Server
“disconnect” admin command didn’t work.

QDK

– No changes.

Other changes
– QuestNet Server is no longer being actively developed – I am currently working on the next major version of Quest, version 4.1, and this will not include QuestNet Server. Unless any bugs are found, this will be the last version of QuestNet Server. The “Pro” version is now included with Quest Pro, and is no longer available for sale separately.
– There is a slight change to the version numbering convention – this version is called 4.0.5 instead of 4.05. 

Quest 4.1 is coming soon

I thought I’d post here about the work that I’m currently doing on the next version of Quest – version 4.1.

So far the bulk of the work has been overhauling the internals of QDK (in programmer’s speak, “refactoring”). This is to enable me to more easily add new features in future versions, and also to enable me to more easily move the code from VB6 to the newer VB.net.

In fact QDK 4.1 is already using the Microsoft .net framework for some new interface elements – the toolbars have been overhauled with a more modern look, and there is a new rich editor for text, as you can see in the screen shot below. No more weird formatting codes – you now type in a room description just as you would in a word processor:

You can also see that the tree view now contains some of the editors that were previously pop-up windows accessed via the menus – the timers, object types, status variable editors etc.

Also there are new web-browser-style “Back” and “Forward” buttons, which should be useful if you’re editing a large game.

The rich editor also appears for the “Print a message” command in the Script Editor, which has been cleaned up a little:

Quest Pro 4.1 will also feature Quest Packager, which is an enhancement to the Quest Compiler. You will now be able to compile your game into a single setup EXE file, so you can give your game to other people, distribute it over the internet, and submit it to software download sites, without having to get your users to download Quest separately.

I’ll also be overhauling room exits for version 4.1, allowing you to easily create locked exits, and replacing the two tabs in the QDK room editor “Compass” and “Go to” with a single editor that will allow you to manage all exits for a room. I’ll post more details on this later, and I’ll create a thread in the Feature Requests forum to get your feedback on how this should work.

Hopefully a beta version will be ready in a couple of months time – I’ll post updates to this blog with details as we go along.

Quest 4.04 is now available

Quest 4.04 is now available.

If you’re a Quest Pro user, you can download your update from the new “My Downloads” area at http://www.axeuk.com/mydownloads

Otherwise you can download Quest 4.04 from http://www.axeuk.com/quest/download.htm

This is a bug-fix release, which addresses the following:

Quest
– fixed run-time error displaying collectables in Quest 2.x games.
– a run-time error occurred if a game’s default font name was invalid.
– a run-time error could occur if variables were accessed using different cases.
– CAS files with resources which used “define menu” blocks wouldn’t load correctly.
– verbs defined with capital letters wouldn’t work correctly.
– an object inside a container which was itself inside a closed container could still be taken. The container logic has been improved to recurse properly through the parent containers of an object before allowing it to be taken, opened, closed, added or removed.

QDK
– fixed various crashes when running using JAWS.
– fixed bug with “else” script being corrupted when nested “if” statements were used which only contained one-line “then” and “else” statements.

Quest 4.03 now available

Quest 4.03 is now available.If you’ve already got Quest or Quest Pro, the easiest way to update is by selecting “Check for updates” from the “Help” menu in Quest or QDK. If you’re not already a user, you can download Quest from http://www.axeuk.com/quest/

Here’s what’s new:

QDK

  • The Script Editor’s functions are now available from a menu (with keyboard shortcuts) as well as from the toolbar.
  • Added “Allow players to use abbreviated object names” game option.
  • Slightly increased the size of the Object Type box to display correctly in Windows Vista.
  • If QCompile is launched from QDK and fails to compile the file, it now displays error information.
  • Fixed bugs:
    • a run-time error occurred when removing a synonym.
    • double-clicking a script line in the Script Editor would cause it to be changed.

Quest

  • The command entry box now uses the same font and fontsize as the game.
  • You can now turn off the player’s ability to use abbreviated object names, by adding “abbreviations off” to the “define options” block.
  • Quest now writes an error to the ASL log if an internal error occurs while running a script command, instead of quitting with an error message.
  • Fixed bugs:
    • fixed run-time error when opening some large games.
    • fixed problem where “if” statements of the form “if … then if … and/or … then …” would be processed incorrectly.
    • QCompile wouldn’t add a WAV file to a CAS if the playwav command did not include the file extension.
    • a run-time error would occur if the “clone” command was used in an object’s “action” script.