Adventure stories: Difference between revisions

From OLPC
Jump to navigation Jump to search
(defined default universal actions; actions implementation; variables comment; Other elements (question);)
(redirecting)
 
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
#REDIRECT: [[ISIS]]
{{TOCright}}
'''XOASK'''
XO Adventure Story Kit
Design version .2

SUMMER OF CODE PROJECT : designing an engine for '''adventure stories''' or '''interactive fiction''' authoring system for the XO. This should be a robust but simple system that will allow users to create their own adventure stories on the laptop. The system will be written in [[Python]] w/[[Pygame]] elements if needed.

== Design ==

We don't want our adventure game to be a parser game because parsers don't translate well to multiple languages. Better to create something with translatable text (this is detailed in Action section).

Our adventure game is a multiple choice system with some hooks for some alternative interface styles.

It is not a [http://en.wikipedia.org/wiki/SCUMM SCUMM] game. We can port a [http://en.wikipedia.org/wiki/SCUMM SCUMM] engine for those style of games.

Our game will be entirely editable by populating various files using a simple editor

The game will support primarily text with icons, but may include images, sounds, and possibly video or music as additional assets.

The basic entities in the game system are:

* Objects -- rooms, creatures, things
* Verbs -- the fundamental verbs of the system; operations like move, pick up, fight, turn on, etc.
* Actions -- these are sequences of verbs and objects that make up the choices given to the player

Everything in the game has a basic object structure that underlies each specific object type

* General object structure
** Name of object
** Basic description of object
** Icon for object
** Type of Object
* Objects might have images, sounds, video, music attached to it ''(probably not every object -- maybe only rooms)''
** Objects may be flagged for display upon some specific triggers or they appear in a list that the user can choose from to trigger it
=== Types of objects ===

; Rooms : Specific places in the gameworld
; Things : Specific objects in the gameworld
; Creatures : Specific living things in the gameworld
Designers edit these object types with simple dialogs and can choose from pre-populated objects from a clip list

Each object has a unique icon

Simple hierarchical lists make it easy to identify rooms that hold things or creatures and to re-sort the lists of things for quick editing

=== Verbs ===

Verbs are the fundamental things that can happen in the game. They're at a smaller level of granularity than Actions. The set of verbs available to the player is fixed; programming an adventure game consists of grouping verbs together into actions.

=== Actions ===

Actions are basically choices the player may take in the system. Actions are collections of verbs and the objects they operate on. Actions can also include conditionals to decide when they are available as options

* Universal Actions are always available. Default UAs are: '''walk''' (only for rooms), '''look''' (any object), '''use''' (only for things) and '''talk''' (only for creatures which are ''verbose''). Also, creatures have a '''receive''' method that can receive an object by a '''give''' action from another creature (maybe this can be the same of '''use''' action). That means, for example, every room will have a "walk" method that is callable by a creature. A thing can't talk or go to anywhere and you cannot use an item from your backpack with a room, except if these are assigned manually to them from developer.

* Local Actions are tied to particular objects. For example, a local action tied to a room is only available if the player is in that room. A local action tied to an object is only available if the object is in the player's inventory. These actions can be extended (or use) universal actions, or implement a new operation.

Details in python implementation: All operations are written at an ''action'' module, based in functions. Objects (Things, Rooms and Creatures) have a dictionary that contains all operations which they can answer to and a tuple associated with arguments, so if for any reason someone want to turn a room ''verbose'', this can be done (we could use for each objects, methods to do this, but this will result in lack of dynamic construction of objects by developers (children!) as they don't have any sense of what is oriented object programming (probably).
This tuple associated with operations need to be assigned easily with objects and pre-defined conditions.
The system's playback job is to run a thread that checks the players location, object, and game state and simply draw out the options the player may take based on testing all appropriate conditions. (if we use actions assigned to objects, we can check objects dicts to see what we can do and do this check only when entering in a room)

'''functions to handle script phrases'''

This is incomplete as is being developed, feel free to modify

ex: let's supose that we have:

creatures: john, mary

things: glue, box, bed

rooms: bedroom, office

default actions:
* get: someone gets an object
* put: someone puts an object
* go: someone go to a room
* use: someone use an item
* talk: start a conversation between the two actors, if both are verbose
* give: get an item from giver creature to receiver creature
some possible statements are:
* 'god' mode, no one is doing this action
get glue from box

put glue in box

put glue on bed

delete glue from box
* actors interactions with something in/at/on... something
john get glue from box

mary put glue on bed

john throw glue to box (...)

john give glue to mary

mary use clue on bed
* simple actors interactions
john talk mary (note that there isn't a 'to' and the missing of s in verbs)

john look box

john eat glue (!)

mary go bedroom

mary use glue
* simple actors actions
john sleep

mary wakeup

=== Action Scripts ===

Action scripts are simply a sequence of verbs (possibly including objects). They also have an optional conditional system that can be tested. Possible conditions include the presence of certain objects in the room or in the inventory. Conditions can be combined with AND and OR.

If the condition evaluates to true, the action is displayed to the user as a choice.

The plan is to allow these scripts to be composed simply with drag and drop.

=== Variables ===
''Note: I think that variables are just another object type, but we'll think about it some more.'' - Roberto: I think variables aren't objects as they are only stored data about the game and they can't call an action.

The system will have several variables that the game can keep state over. These game and player variables can be tested for by an overall game-script (a simple overall conditional script) and when met invoke a game over occurance, room, etc.

The variables I've thought of so far include: score, time, currency, life, ability points, offense, defense, user 1, user 2.

These variables as simple as they are let us offer some rudimentary RPGness to the system that could have kids accumulating wealth, casting spells, fighting creatures, etc. I've tried to choose variables that are basic - we should allow the designer to create two unnamed variables.

These can then be referred to in the scripts as well.

=== Conversations ===

The player can create conversations with characters. We will need a specific conversation design - I have one but need to refine it before posting it.

''(Should probably be a hierarchical tree with cross-references to allow for looping.)''

=== Editing ===

Editing should be based on putting things on a map with iconography and a click and edit framework with various dialogue boxes. A hierarchal chart along the side makes it easy to manage objects in the system as well.

The camera being active is a good tool for recording pictures and video. Black & White mode should also get some attention.

Being able to integrate artwork easily into the game is important. We will have to think about what we can do to allow people to create various collages in the engine as well as provide some artwork library for people to use but we can't recreate an entire in-game drawing program.

Sounds could also chosen from a menu or recorded using the mic. Same with video. We should beware though of memory limits - perhaps limiting the overall size of such things to ensure small-enough game files.

== Other Elements ==

We need to figure out how all text edited into the system could ideally be easily edited including simple search and replace, bold, italics, etc. Perhaps simple <HTML> markup for simple stuff (then kids learn HTML?) or a wiki style markup? Would also be good for there to be an easy means to integrate a spell checker too. Roberto: why we don't integrate with sugar text editor (ABI word modified)?

[[Category:SoC Project]]
[[Category:Games]]
[[Category:Content]]

Latest revision as of 18:28, 20 August 2007

Redirect to: