{"id":23165321,"url":"https://github.com/vreon/figment","last_synced_at":"2025-10-07T17:35:39.242Z","repository":{"id":57429292,"uuid":"2135509","full_name":"vreon/figment","owner":"vreon","description":"A framework for creating multiplayer, text-based worlds.","archived":false,"fork":false,"pushed_at":"2019-11-15T06:45:42.000Z","size":521,"stargazers_count":14,"open_issues_count":0,"forks_count":2,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-12-08T02:08:42.830Z","etag":null,"topics":["ecs","entity-component-system","game-engine","mud","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vreon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-08-01T07:17:24.000Z","updated_at":"2022-11-12T06:43:04.000Z","dependencies_parsed_at":"2022-08-27T17:01:03.846Z","dependency_job_id":null,"html_url":"https://github.com/vreon/figment","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vreon%2Ffigment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vreon%2Ffigment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vreon%2Ffigment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vreon%2Ffigment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vreon","download_url":"https://codeload.github.com/vreon/figment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230202318,"owners_count":18189439,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ecs","entity-component-system","game-engine","mud","python"],"created_at":"2024-12-18T01:19:22.300Z","updated_at":"2025-10-07T17:35:34.199Z","avatar_url":"https://github.com/vreon.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Figment\n\nFigment is a framework for creating multiplayer, text-based worlds. It was\noriginally designed to explore the application of the \"entity-component-system\"\narchitectural pattern to the realm of MUDs.\n\n## Philosophy\n\nComponents, as Figment defines them, are little chunks of behavior that can be\nattached to any Entity. Composability is a powerful pattern, and Components are\nno exception. Here are some ways you can use them:\n\n* Fire that spreads to nearby entities with the Flammable Component\n* NPCs with a Vigilante Component who will attack criminals on sight\n* Armor with a Healing Component that gradually restores health when worn\n* Doors with a Breakable Component that can be knocked down\n* Switches that can only be weighed down by entities with the Heavy Component\n\nFigment is explicitly designed to empower worldbuilders to create dynamic\nenvironments populated by entities that interact with each other in intricate\n(and even unexpected) ways, so: experiment and have fun!\n\n## Installation\n\nFigment is under active development. You can install it from PyPI:\n\n    $ pip install figment\n\nOr directly from this repository (recommended, for now):\n\n    $ pip install git+git://github.com/vreon/figment.git\n\n## Usage\n\n### Developing a world\n\nTo create a world, you'll need to familiarize yourself with some terminology:\n\n* An **Entity** is any thing that exists within your world. It doesn't need to\n  be physical or tangible.  \n  *Examples*: a sword, a room, a monster spawner, a player\n* A **Component** is like an adjective that can be attached to an Entity to\n  change its behavior and how other Entities behave toward it.  \n  *Examples*: a Component to describe the Entity's location in space, a\n  Component that causes the Entity to meander automatically from room to room,\n  a Component that allows the Entity to use worldbuilding commands\n* A **Mode** is the lens through which a textual command, like \"go north\", is\n  interpreted. An Entity has one Mode at any given time (or zero if it has no\n  agency). Commands issued by an Entity are passed through that Entity's Mode,\n  and the Mode is then responsible for updating the state of the world and\n  sending messages to any affected Entities.  \n  *Examples*: an action Mode for moving around within the world, a conversation\n  Mode for talking to NPCs, a setup Mode for character creation\n* A **Zone** is a slice of a world. It acts like an isolated space for a group\n  of Entities. You can use Zones as server shards or to run different logical\n  regions of the world at different tick speeds.\n\nBy extending Figment's base classes (particularly `Component` and `Mode`), you\ndefine the vocabulary unique to your world -- then construct your world's\npeople, places, and things using that vocabulary.\n\nWhile your available vocabulary of Components and Modes cannot yet be changed\nduring runtime, they _can_ be dynamically applied to Entities (that's the whole\npoint, after all!) so you can even do a good chunk of worldbuilding from within\nthe world itself if you build the appropriate tools.\n\nConsult the example worlds to get an idea of how to structure yours.\n\n### Running a server\n\nFigment is more of a framework than an engine, and it doesn't make many\nassumptions about your world, so there's not much to run out-of-the-box.\n\nIf you have already created a world, or would like to run one of the examples:\n\n    $ cd /path/to/world\n    $ figment run\n\n(Make sure that the Redis instance referenced in your world's config is\naccessible from this host.)\n\nIf the world contains ticking components, you'll also need to run a ticker:\n\n    $ figment run -t\n\n### Running a client\n\nPresently, Figment clients must communicate directly with the backing Redis\ninstance. This is obviously insecure, so it's strongly recommended to write a\nclient that can act as an intermediary between Redis and whatever protocol you\nwant to support (Websockets, IRC, Telnet, etc). Eventually, Figment will\nprovide plugins for the most common client protocols.\n\nFor now, assuming you have direct access to Redis, you can use the Figment CLI\nto interactively send and receive messages on behalf of an entity:\n\n    $ figment prompt \u003centity_id\u003e\n\n## License\n\nFigment is made available under the terms of the Expat/MIT license. See LICENSE\nfor details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvreon%2Ffigment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvreon%2Ffigment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvreon%2Ffigment/lists"}