{"id":17494423,"url":"https://github.com/shijbey/centrifuge","last_synced_at":"2025-07-10T12:40:46.130Z","repository":{"id":70839869,"uuid":"362531816","full_name":"ShiJbey/centrifuge","owner":"ShiJbey","description":"A cross-platform desktop tool for authoring narrative sifting patterns for the Talk of the Town simulationist story generator.","archived":false,"fork":false,"pushed_at":"2021-10-11T16:06:09.000Z","size":1418,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-02T18:45:00.857Z","etag":null,"topics":["social-simulation","story-sifting","visual-programming-editor"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ShiJbey.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-28T16:09:08.000Z","updated_at":"2025-01-03T21:18:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"3c5e1b9e-cb5c-450e-86e5-914b1f204e87","html_url":"https://github.com/ShiJbey/centrifuge","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/ShiJbey%2Fcentrifuge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShiJbey%2Fcentrifuge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShiJbey%2Fcentrifuge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ShiJbey%2Fcentrifuge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ShiJbey","download_url":"https://codeload.github.com/ShiJbey/centrifuge/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246076931,"owners_count":20719894,"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":["social-simulation","story-sifting","visual-programming-editor"],"created_at":"2024-10-19T13:25:56.057Z","updated_at":"2025-03-28T18:19:07.937Z","avatar_url":"https://github.com/ShiJbey.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Centrifuge: Node-Based Sifting Pattern Editor\n\nCentrifuge is a cross-platform visual programming tool that helps users author narrative sifting patterns for character-based simulated story worlds. Sifting patterns search the state of the simulation, looking for matching characters, events, and scenarios. Our goal with Centrifuge was to develop a tool that enables users to craft sifting patterns without learning a text-based programming syntax. Centrifuge is built on [DataScript](https://github.com/tonsky/datascript), an open-source in-memory database and datalog-based query language. Users drag-and-drop nodes that correspond to parts of DataScripts query syntax, and Centrifuge takes care of translating their pattern of nodes into a valid query.\n\nThe current version of Centrifuge is configured for use with the [_Talk of the Town_](https://github.com/james-owen-ryan/talktown) simulationist story generator. _Talk of the Town_ was the simulation back-end for the award-winning augmented reality live-acting game, [_Bad News_](https://users.soe.ucsc.edu/~jor/publications/samuelBadNews.pdf).\nWe chose this simulation because in _Bad News_, one player acts as the _Wizard_. Their job is to find interesting characters in the simulation by manually coding inside a Python interpreter. This manual story sifting is a tedious process and requires knowledge of python programming and the internal simulation structure. Here is an example [video](https://www.youtube.com/watch?v=NUnp44OkaQo) of gameplay.\n\n![Centrifuge editor screenshot](./docs/resources/editor_screenshot.png 'Centrifuge Editor Screenshot')\n\n## How to Use\n\n1. Install a release build or clone a development version from GitHub (see instructions below)\n2. Start the application and create a new editor tab.\n3. Drag node types from the tray on the right, and drop them onto the editor\n4. Click and drag from ports to create connections between nodes\n    - **Delete node:** Click the node to highlight, press _delete_ or _backspace_\n    - **Delete link:** Hold _shift_, click the link, press _delete_ or _backspace_\n5. Click _Compile_ in the 'Output' tab to compile the diagrams into query code.\n\n## Building Development Version\n\nWe use Yarn for package management. Please download it from npm with the following command.\n\n```bash\nnpm i -g yarn\n```\n\nThen you can clone and run Centrifuge.\n\n```bash\ngit clone https://github.com/ShiJbey/centrifuge.git\n\ncd centrifuge\n\nyarn\n\nyarn start\n```\n\n## DataScript Syntax Support\n\nThe editor transforms patterns into valid [Datascript](https://github.com/tonsky/datascript) queries. DataScript is an free \u0026 open-source alternative to [Datomic](https://www.datomic.com/). Therefore it tries to offer the same query language features. Below are the features of the query language that Centrifuge does not currently support.\n\n-   [pull expressions\\*](https://docs.datomic.com/cloud/query/query-data-reference.html#pull-expressions)\n-   [return maps](https://docs.datomic.com/cloud/query/query-data-reference.html#return-maps)\n-   [Aggregates](https://docs.datomic.com/cloud/query/query-data-reference.html#built-in-aggregates)\n-   [functions\\*\\*](https://docs.datomic.com/cloud/query/query-data-reference.html#functions)\n-   [get-else](https://docs.datomic.com/cloud/query/query-data-reference.html#get-else)\n-   [get-some](https://docs.datomic.com/cloud/query/query-data-reference.html#get-some)\n-   [ground](https://docs.datomic.com/cloud/query/query-data-reference.html#ground)\n-   [missing?](https://docs.datomic.com/cloud/query/query-data-reference.html#missing)\n-   [tuple](https://docs.datomic.com/cloud/query/query-data-reference.html#tuple)\n-   [untuple](https://docs.datomic.com/cloud/query/query-data-reference.html#untuple)\n-   [database scoping](https://docs.datomic.com/cloud/query/query-data-reference.html#rule-database-scoping)\n\n\\* Datascript JS API doesn't support in-query pull expressions\n\n\\*\\* We have a prototype function node available, but there is not yet a framework for creating custom function nodes given a set configuration parameters.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshijbey%2Fcentrifuge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshijbey%2Fcentrifuge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshijbey%2Fcentrifuge/lists"}