The Mason Mechanical System

Related Documents

Mechanical System Implementation notes - A more recent look at how to implement the MMS, as well as some lists of mechanical nodes and other things to implement for the first iteration(s).

Version History

Date Version Author Changes
2000-03-21

0.0.1

Hans Häggström Initial version.
2000-09-25

0.0.2

Hans Häggström Second edition. A complete rewrite.
2000-10-12

0.0.3

Hans Häggström Goals and Requirements section and Technology section written.
2000-10-15

0.0.4

Hans Häggström Wrote the Connections section and fixed some typos.
2000-10-17

0.0.5

Hans Häggström Implemented some suggestions by anubis and corrected typos.
2000-10-24

0.0.6

Hans Häggström Had a really cool idea and extended MMS with transfer connectionss and data connections. Now MMS is general enough to handle all three of energy, matter and information. Added transport, manipulator and computer nodes. Did some restructuring of the chapters. Wrote the Mason Data System and Node Container chapters. Wrote short descriptions for the other node categories.
2000-10-25

0.0.7

Hans Häggström Renamed channel to port. Wrote more general stuff about nodes. Updated the Mason Information System section a bit.
2000-10-26

0.0.8

Hans Häggström Added tracks, wrote somewhat on manipulators and transport. Also added one example.
2000-11-24

0.0.9

Hans Häggström Rewrote the connections section. Did small corrections and updates. Filled in the Definitions.

Introduction

The Mason Mechanical System provides players and world designers with a flexible way to implement machines in a game world. The machines can execute actions like opening a door, raising an elevator, blowing a whistle, grinding wheat or launching a poison-arrow trap. They can be controlled with buttons and levers, or hidden floor-switches. They can also perform advanced computational operations on the input data, and can use devices to store data for future use and to do logical checks and comparisons on multiple input ports. The machines consist of nodes that are connected to each other with energy-carrying connections. Various sources can be used to provide energy for the machines, from just the tiny force of a button-press to full scale windmills and water-wheels.

The Mason Mechanical System provides means to simulate the processing of energy, matter and information in a game world.

Mechanical System made of wheels, levers and rotating shafts.

This paper presents the design of the Mason Mechanical System (MMS). The first section presents the general motivation for MMS. The second section discusses different Technology Levels. After that the connections and nodes are introduced. Then follow a list of node types and examples that use them. Last there is a section with implementation suggestions and a section with ideas for future additions.

The implementation is considered in various design decisions, but a detailed implementation is not described in this paper.

 

Definitions

Definition of terms used in this paper.

MMS Short for Mason Mechanical System. It is not specific for Mason, but that is where it is first going to be implemented.
Node An instance of a node type in the game. Some nodes look like boxes or have other shapes, other nodes can be contained inside building blocks.
Mechanical Node See Node.
Node Type A certain class of nodes, with unique properties and functions. Each actual node in the game is of some particlular node type.
Node Category A category of node types that have similar functions or purposes. This is just a way to organize the node types, the category boundaries are not sharp.
Connection An invisible energy, matter or information connection that connects two ports, allowing energy, matter on information to flow in one or both directions.
Port A named 'socket' on a node type, for recieving or transmitting energy, matter or information to/from a connection. A node can have many ports.
Technology Level A Technology Level describes a specific set of materials and techniques used to implement nodes. Each node is of some specific technology level. The technology level affects the nodes appearance and properties. Not all node types have to be possible to construct in every technology level.
Energy Source Node that produces energy from a natural energy source, some fuel or some other way. This is a Node Category.
Sensor Node that reacts to certain input by sending energy signals or information objetcs. This is a Node Category.
Effector Node that executes some physical action in the game world. This is a Node Category.
Processor Node that manipulates energy. This is a Node Category.
Node Container Node that contains a number of smaller node types. This is a Node Category.
Transport node Node that moves items or substances (liquids, gases, pastes, powders, particles, etc). This is a Node Category.
Manipulator node Node that does operations on items and substances. This is a Node Category.
Computer node Node that stores and manipulates information objects. Executes programs. Connects to networks. Provides agent platforms. Manages access and account information (in-game). Provides information and services to client computers and terminals. This is a Node Category.
Terminal node Node that moves information objects between medias in the outside world (such as books, diskettes or characters mind) and information connections. This is a Node Category.
Track node Track nodes are used for general moving platforms; they allow suitable track traveler nodes to move along a track node, and to continue from one track node to adjoining track nodes. This is a Node Category.

 

Goals and Requirements

Simulation of various machines is important for a realistic modeling of a culturally advanced game world. Enabling users to design and invent new machines, using basic components as building blocks, opens a whole new dimension of innovation and complexity in a persistent game world. It allows the players, in addition to world designers, to invent new devices that the original programmers hadn't even thought of.

To help us acquire these goals, we can state some basic requirements for MMS:

1. Allow complex but flexible systems.
It should be possible to create machines with arbitrarily complex behavior. That is, it should be possible to create a computer using the components in the MMS (in other words, MMS is Turing Complete). At the same time it has to be easy for players and designers to handle these complex structures. This can be done by allowing hierarchical grouping of the components of the system - a part of the system can be treated as a 'black box' that has some specific interface outwards, but whose internal structure can be left alone unless it has to be changed. This allows modularity and flexibility in the design of systems. A player can design a complex machine by using components containing subsystems built by someone else. The mechanical system also integrates with the blueprints, allowing easy building of a previously created or acquired design. More on blueprints at the end of the document.
 
2. Easily expandable with new node types.
The range of new node types is limited only by our imagination. Various game types will probably use own node types, a sci-fi game could have fusion-reactors as one energy source and a fantasy game could add a whole range of node types based on magic. New node types would probably require some coding (creating a new class for the node type and hooking it into a node types factory in the MMS module in STAGE), but it might also be possible to create scripted node types, if performance would be acceptable.
 
3. Generic enough for both fantasy and scifi games.
The original idea, that was based heavily on the behavior of mechanical constructs, such as axles, belts and gears, has been reworked into a more abstract system that deals with transferring energy. The processor nodes have been designed to provide general processing operations for analog signals, in this they have some analogies with electronic components. However, the design has been focused on providing useful and efficient functionality, instead of simulating the quirks and limitations of actual electronic components. Some powerful but useful components, such as timers, randomizers and memory with removable media are also provided. Sensors include the usual array of buttons and hidden switches, and also things like locks. The default effectors mostly contain functions for moving building blocks around. Effectors are probably the category that will have most custom node types in different games. The current energy sources are also mainly fantasy/medieval, with cranks, water wheels and windmills. New game types can extend these with other types of energy sources.
 
4. Efficient implementation.
There should be no fixed boundary on how many and big machines can be built in a world, so the servers can have to handle a lot of simultaneous nodes. The system has been designed to be reasonably efficient to run. Various heuristics can also used to reduce load. For example, many machines like traps and user controlled machines will be sitting idle, waiting for input most of the time. By analyzing the flow of energy in such a machine and only monitoring a few key points when the machine is idle a lot of unnecessary simulation can be avoided. This can be expanded to cover constant energy transfer in addition to no energy transfer (changes in the node states are only neccesary when the energy flow changes, while it remains constant no actions are required (other than running effectors at a fixed power)).
 

Technology Levels

A technology level is used to describe the technology used in nodes that belong to the technology level. Nodes of different technology levels are useful for different things, big, crude cast iron wheels are good for handling large forces, while tiny silver gears are good for manipulating small forces with little resistance.

The technology level dictates the following properties of nodes:

Here is a list of some technology levels. The first three can be used in a medieval game like Mason, while the rest are ideas for future games of various genres.

Wood
Wooden, metal reinforced wheels, pegs, axles and belts. This is the most basic type of technology, it requires only knowledge of shaping wood (and optionally metal). It can handle mediocre energies and has relatively high resistance. Processor nodes are about 111 meters in size.
Stone
For the kind of advanced stone traps and mechanisms that can be found in ancient temples, staying unused and in perfect repair for millennia until some unfortunate adventurer steps on the wrong stone and gets his skull impaled on pointy spikes in the ceiling. Can handle relatively large energies, but has very high resistances. Processor and other nodes are large (around 333 meters).
Heavy metal
Big, heavy iron gears, spinning discs and large noisy machines. Think 'Industrial Revolution', although this technology level can also be used in other settings. Manufacturing of these nodes requires knowledge of casting iron. They can handle quite large energies, but they are not good for transmitting smaller energies, as it takes some force to get the heavy wheels rolling. The size of the processor nodes is about 222 meters.
Light metal
Small silver gears and delicate mechanisms, like clockworks. This technology requires knowledge of whitesmithing. The nodes can can handle small energies, and have low resistance. However, they are not good at high energies. Processor nodes are small, about 0.250.250.25 meters in size.
Electricity
From the invention of electrics and onward. Handles high energies, but is not good at delicate manipulations. Processor nodes are about 0.5 meters along each side.
Electronics
This includes integrated circuits, up to and exceeding current technology. The nodes are good at handling small energies with minimal resistance and at high speeds. However, they can not handle large energies well. The processor nodes are very small, about 0.128 meters per side.
Biotechnology
Fancy things done with genetic engineering.
Nanotechnology
Even though the actual components are very small, the nodes that encapsulate them are big enough to be possible to manipulate conveniently by humans.
Magic
Mysterious devices that manipulate and transfer magical energy.
Spiritual
Instead of physical devices, this technology uses enslaved spirits and other cool stuff to produce entities that work like invisible mechanical nodes in a system.
 

Nodes

A mechanical system consists of a number of nodes of various types. Each node type is specialized at some particular task, like turning or rotating a wall section or door, striking a bell, sensing when someone steps on a floor tile, or heating items. The node types are organized in several categories that contain nodes with similar functionality. Examples of categories are sensors, effectors and processors. They contain node types that are specialized on reacting to certain stimuli, executing some particular (physical) action in the game world, and manipulating energy and signals, respectively. The categories are listed in the Node Categories chapter and some example node types in the List of Some Node Types chapter.

All nodes have some specific location in the game world. Some have a special item that represents them, usually just a box with the machinery mounted inside. Some node types are hidden or contained in building blocks, for example floor switches, door opener sensors and trapdoor openers.

Nodes can be connected to each other with connections. There are three types of connections, energy connections, matter connections and information connections. Energy connections transfer positive or negative energy. Matter connections transport matter, both individual items and homogenous substances, such as liquids, gases, pastes, powders and other substances made up from small particles, like grains or berries. Information connectins transfer information in the form of information objects (text, blueprints, item type descriptions, pictures, composite documents, etc).

A node has a fixed number of input and output ports of each of the above types (energy, matter and information). The ports can be connected to ports on other nodes with connections. An output port on one node has to be connected to an input port on another node. Ports can also be unconnected.

The ports can have different names on different node types, for example an oscillator type energy processor node could have the following ports: "power input", "frequency control input", "amplitude control input", "signal output". The port names can be visible when a blueprint with MMS nodes on it is edited.

Individual nodes can also be named in a blueprint, to allow a clearer and easily readable design.

No internal resistance or friction is modeled in the nodes (unless that is a purpose they have), that is simulated in the connections.

 

Connections

An output port of one node can be connected to an input port of the same type on another node with a connection. A connection can connect nodes of different technology levels. The possible port and connection types are energy, matter and information (described in more detail later).

Energy and information connections are one-way (from an output port on one node to an input port on another). Matter connections are two-way, although valves can be used to make them impassable in one direction, and some node types have built-in valves at some ports, making them input or output only.

Connections are not represented in the game world with any visible item. The connection works as long as the connected nodes are within the max distance from each other. (Note that for matter connections, the max distance is zero. For transporting matter longer distances, transport nodes are used). This has the advantages that users building a mechanical system does not have to worry how to wire all the cables or rotating rods, whether they can pass through walls or if holes have to be built, etc. This is particularly useful when nodes are rearranged, or some nodes are mounted on moving platforms. The actual route a connection takes is not interesting or important from a game play perspective, so here we sacrifice some realism in order to make the game play simpler and less burdened with unimportant details. The only drawback to game play is that interesting things like cutting a wire to silence the phones is not possible. However, the mechanical nodes are still represented in the game world, and they can be destroyed or meddled with.

The connections have resistance and delay values that depend on the distance between the two connected nodes and the technology levels of the connected nodes (the resistance/delay constants dictated by the two technology levels are averaged).

Connections can also be named in blueprints, in the same way as nodes and ports can. This makes it easier to document designs.

 

Mason Energy System

The energy system is the most basic of the three systems.

 

Both positive and negative energy can be transfered over a connection, but it can only be transfered from the output port of the sending node to the input port of the receiving node, not the other way.

The following types of resistance are used:

 

Mason Matter System

 

Mason Information System

The Mason information system adds one more port and connection type: The data port and data transfer connection. As with energy ports, the each node can have both data input ports and data output ports, and the connections transfer data from a data output port of one node to the data input port of another.

The data ports have some minimum delay, a maximum length of the connection, and they might also need some power for transfering information that is related to the length of the connection, but that is not clear at the moment.

The data ports transfer Information objects. There are a number of different types of information objects, text (including style markup), blueprints, item type descriptions, spell descriptions, pictures (both bitmap and vector), sound, musical scores and lyrics, raw numerical data, and so on. Information objects can also be organized in documents, that can can contain any other information objects, including other documents. The information objects can be stored on various medias; in books, letters, paintings or signs, memorized in a characters memory. Information objects are described in more depth in a separate document.

The information objects can be processed by computer nodes and some processor nodes. Some effector or manipulator nodes can also use or produce information objects. For example: a dynamically reconfigurable carving manipulator could take a new item type description as input, and change itself to carve items of that type, if they can be created by carving and the manipulator node is equipped with suitable tools.

The computers can execute programs (another kind of information object). The programs would probably be python or the same scripting language used for character scripting. The programs can send and recieve information obejcts and energy signals at various ports of the computer, and also access the network, if the computer is connected to one.

The data system can be extended to handle networks and internets. This could be done by having a special computer [or terminal?] node type that is addressable on the network and that can recieve and send information objects from/to other connected nodes [or build it into computers with sufficient technology level?]. The network mechanics would not be simulated at a low level, such as network traffic etc, instead it would just be a way to send and recieve information objects. Some way for browsing the services other connected nodes offer could also be needed. The network system also needs an account system, a character, computer program or autonomous agent can have accounts with rights to use various services. The accounts could be username/password based, or just associated to the owner somehow.

Another extension are autonomous agents. They can operate from any computer that provides an agent platform. In a way, agents are virtual characters. They can be controlled by scripts, or a player can play an agent (this opens up interesting new role playing possibilities ;-). Agents can use services and information objects that they have access to at the servers, and they can move to any server that have an agent platform that they are allowed to use. Agents should also be able to communicate with each other (and probably be able to copy themselves, although that wouldn't work that well for player controlled agents).

 

Node Categories

Nodes types can be divided up in different categories depending on their functionality. However, the categories are not absolute, and some node types can contain functionality that is listed under multiple categories.

Energy Source

Produces energy from a natural energy source or some fuel.

Sensor

Reacts to certain input by sending energy signals or information objetcs.

Effector

Executes some physical action in the game world.

Node Container

A node container is a special type of node that can contain one or more other nodes. Selected input and output ports of the contained nodes can be exposed to the outside world, as ports on the node container. The ports on the node container can be named, in the same way as ports on a normal node, so it is easy to construct machines using predefined node containers containing machinery designed to do some specific task.

A node container has a volume limit on how much volume the nodes it contains can have together. This is some constant times its own volume, this constant can also be larger than one, for example 2 could be a normal value. This is because much of the support and enclosing structure of the contained nodes can be shared. In addition, it can only contain nodes that have a smaller volume than its own volume, otherwise it would be possible to store an unlimited number of nodes in one node container by using nested node containers.

Node containers come in many sizes for all technology levels, from 0.128 meters per side to 4 meters per side.

Transport

Transport nodes are used to move or provide a passage for items and substances, such as liquids, gasses, fine grained items, etc.

Moves items or substances (liquids, gases, pastes, powders, particles, etc).

Processor

Manipulates energy.

Manipulator

A manipulator node does some atomic or composite operation on items and substances that it recieves from matter input ports. When the items are processed, they are pushed out through one or more matter output ports. For example, one type of manipulator node could hammer all items that pass through it. Another could use the latest item type description that it got from its information input channel, and form any clay or paste like material it gets from a matter input channel to the shape of the item, if the item can be shaped from that material in that way, and output the completed items through an matter output channel.

Manipulator nodes can only handle items that are smaller than themselves. The manipulator nodes come in many sizes for each technology level, from tiny 0.1250.125.125m nodes, to 0.5m, 1m, 2m and 4m nodes. The 2m nodes can handle human sized items, and the 4m nodes can be used for most big creatures and building blocks.

Connected matter transfer ports have to be at zero distance from each other, so the manipulator node has to be placed next to any other manipulator or transport nodes that it has matter connections to. However, it does not matter what part of the manipulator node that touches the other node, as long as two surfaces are in contact.

Computer

Stores and manipulates information objects. Executes programs. Connects to networks. Provides agent platforms. Manages access and account information (in-game). Provides information and services to client computers and terminals.

Terminal

Terminal nodes are used to move information objects from some medium in the outside game world to data ports, and from data ports to a medium in the outside game world.

Some terminal nodes can only handle certain types of information objects [Not sure about this. Would all such nodes fall under the effector category instead, such as automatic pinaos or speech recognicing microphones?].

Terminal nodes include various screens, keyboards, printers, printing presses etc. The terminals can transfer the information directly to a specifi medium, like sheets of paper or a memory module. Other terminals can provide an intrface that lets a character memorize the information object, or enter a memorized infromation object. The character can also copy an information object directly from some other medium (that the character is able to read) to the terminal, or the other way, without memorizing it.

Track

Track nodes are used to implement general moving platforms. They resemble railway tracks; they allow suitable track traveler nodes to move along a track node, and to continue from one track node to adjoining track nodes.

Currently UClient can not handle arbitarily rotated building blocks, so the turns the railway cars can make are limited to 90 degrees. This means that for now the tracks will have to be straight tracks and narrow 90 degree turns.

Tracks come in two sizes by default, one 1m wide variant for normal train type things, and one small, 0.125m wide track type, for small moving and transport mechanisms in houses.

Each track segment has both input and output energy and information channels that are connected to any track traveling nodes moving on the track segment.

Track segments can also be attached to walls and ceilings, track traveler nodes moving on them will not fall off. However, atraveler node can not move from a wall mounted node to a floor or ceiling mounted one.

There are also forking track segments, they have signals controlling what route an incoming wagon will use. Crossing track segments provide means for two separate tracks to cross. In addition to curves, it is also possible to have sharp corners. When a traveler node comes to a sharp corner, it will not turn, but rather stop and start moving in the new direction, without turning. There are also forks that are sharp corners. Another type of track node can rotate a traveler node that is located on it, in 90 degree steps.

List of Some Node Types

Energy Sources

Sensors

Effectors

Processors

Node Containers

Manipulator nodes

Transport nodes

Computer nodes

Terminal nodes

Track nodes

 

Examples of Machines

 

Manipulator and transport nodes can be used as parts of a trap. For example, a big trapdoor in the floor opens and the trespassers fall down into a transport node, that transports them to a heat-adding manipulator node. After the heat manipulator node comes a sieve node, that filters all items of metal smaller than 10cm to one output and other items to another output. The other items are dumped in a trash chute. The metal items are transported via smaller transport nodes directly to the incoming treasure chest. From there other machinery can still sort out the gold and silver coins from metal trash and jewellery.

 

Integration with Blueprints

 

Implementation Suggestions