Home

rmgen-common/gaia_entities.js

rmgen-common/gaia_terrain.js

These functions are often used to create a landscape, for instance shaping mountains, hills, rivers or grass and dirt patches.
Source:

rmgen-common/player.js

rmgen-common/wall_builder.js

rmgen/Area.js

An Area is a set of Vector2D points and a cache to lookup membership quickly.
Source:

rmgen/Constraint.js

rmgen/Entity.js

The Entity class stores the given template name, owner and location of an entity and assigns an entityID. Instances of this class (with the position using the tile coordinate system) are converted by ScriptConversions.cpp to the Entity struct defined in source/graphics/Entity.h and passed to MapReader.cpp.
Source:

rmgen/environment.js

The environment settings govern the appearance of the Sky, Fog, Water and Post-Processing effects.
Source:

rmgen/Group.js

A Group tests if a set of entities specified in the constructor can be placed and potentially places some of them (typically all or none). The location is defined by the x and z property of the Group instance and can be modified externally. The Group is free to determine whether, where exactly and how many entities to place. The Constraint to test against and the future owner of the entities are passed by the caller. Typically Groups are called from createObjectGroup with the location set in the constructor or from createObjectGroups that randomizes the x and z property of the Group before calling place.
Source:

rmgen/Object.js

An Object tries to find locations around a location and returns an array of Entity items holding the template names, owners and locations on success.
Source:

rmgen/RandomMap.js

The RandomMap stores the elevation grid, terrain textures and entities that are exported to the engine.
Source:

rmgen/Terrain.js