by munin, RTSan and zzorn

This page is meant to be a collection of ideas and descriptions of the tools used to generate and enhance game media. More will be added as we go.

Media Object Builder Scripts

Media Object Builder Scripts is a python scripting framework that allows generation of different aspects of media objects on the client when needed. It can be used to generate or load and modify/combine textures, meshes, sounds, animations, particle systems, and effects/behaviours/triggers that a media object consists of.

Game Object

A Game Object is an object representing some entity, or some abstract thing like a skill. They are stored on the server and manipulated by rule modules. The client interacts with some game objects in different ways. Some of the game objects have a location in time and space, and can be observed by characters. These game objects need to be rendered by the client, and for that tehy should provide a mediaObject and an appearance attribute.

Media Object

A Media Object is a client side object that is used to visualize a visible Game Object. It can have various different parts; texture, mesh, animations, sounds, particle systems, icon, textual description, sprite, triggers, etc. Different clients may use different parts, parts that are not needed need not be loaded/generated.

mediaObject Attribute

The mediaObject attribute of the Game Object contains the name of a python script that implements functions for generating or providing the different parts of a media object. The script name is relative to the media_objects/ directory in the media repository (so it contains any subfolders under media/media_objects/, and then the name of the script). E.g. "creatures/", "humanoids/", "items/", or "".

Media Object Builder Script

A Media Object Builder Script is a python script, that is required to have some standard functions, that the client calls to get the texture, mesh, animations, sounds, etc. to use. The functions may either return references to existing media files in the media repository, or create and return a texture/mesh/sound/etc. The functions are given some of the properties from the appearance attribute o the game object as input. It should also be possible to query the script for what parameters are used when creating the different parts of the media object, so that the client can regenerate that part when the parameters it uses changes. The script uses an API with special designed functions for manipulating textures, meshes, and other media object parts. The API has an optimized C++ or similar implementation, although a reference implementation in e.g. Java might be constructed first. The script should have access to very little else beside the media object manipulation API, in particular it shouldn't be able to read/write to files or use the network, for security reasons.


The media object builder script uses named parameters provided by the appearance attribute of the game object when generating the media object. The appearance parameter can specify properties like hairColor, eyeColor, skinColor, age, woundAmount, isGiganticSize, hasThePox, isUndead, etc. The appearance parameters are often specific for certain media object types. The appearance parameters are set and changed by Rule Modules on the server for Game Objects. E.g. if the hit points of a creature changes, a rule module might change the woundAmount parameter in the appearance attribute to some value between 0 and 1, roughly reflecting the severity of the injury.

Default Parameters

Running the media object builder script without any parameters from the appearance attribute produces a default media object for that builder. It can be used as a placeholder media object, or if the builder uses no parameters.


The generated media object parts are cached on the client, and only re-generated if attributes they use change, or if they were thrown out of the cache and need to be regenarated. Strategies like waiting some time before regenerating after an attribute change can be used to reduce teh number of changes. The generation should also take place in a background thread. Until the generation is ready, the result of running the media object builder script with no parameters can be used as a placeholder media object.

Media Object Library

An utility library should be created, that handles running the media object builder scripts, caching the results, and recalculating media object parts when the attributes change. The library should also provide a placeholder media object while the actual one is being built, and should handle running the builder scripts in one (or several) separate threads. The client should just need to ask the library for a media object for a given game object, and allow the library to listen to changes in the appearance and mediaObject attributes of the game object, as well as getting some notification when game objects go out of sight (or their distance to the camera). The library returns a reference to a media object to the client. The media object parts may change as they are generated and the placeholders are replaced, the client should be able to listen to such changes.

Preview Tool

A preview tool should also be created, that allows the user to select a media object builder script, uses the utility library to generate the media object, and allows the user to change the appearance parameters on the fly, recalculating the media object. The user should also be able to send signals to the media object, using a similar system as the client when some animation or other effect of the media object should be triggered (the details of this need to be thought out in a separate media object specification). The preview tool should periodically check the media object builder script file to see if it has changed, if so, it should reload the builder script and regenerate the media object. This way the user can edit the script in a separate editor or IDE, and see the changes directly after saving, and also test out the effect of appearance parameters or different actions.

Character Generator

Texture Mixer

A great idea

Mercator Tools


Procedural Texture Blending


Procedural Trees