{"id":13337475,"url":"https://github.com/fdavies93/magic-demo","last_synced_at":"2026-02-22T10:18:45.344Z","repository":{"id":48161954,"uuid":"485636885","full_name":"fdavies93/magic-demo","owner":"fdavies93","description":"Minimal framework for writing text adventures.","archived":false,"fork":false,"pushed_at":"2022-07-31T14:38:27.000Z","size":165,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-10-23T18:11:21.347Z","etag":null,"topics":["game","text-adventure"],"latest_commit_sha":null,"homepage":"","language":"Python","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/fdavies93.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}},"created_at":"2022-04-26T04:47:25.000Z","updated_at":"2023-11-06T03:57:07.000Z","dependencies_parsed_at":"2022-09-22T21:41:54.914Z","dependency_job_id":null,"html_url":"https://github.com/fdavies93/magic-demo","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/fdavies93%2Fmagic-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdavies93%2Fmagic-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdavies93%2Fmagic-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fdavies93%2Fmagic-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fdavies93","download_url":"https://codeload.github.com/fdavies93/magic-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242987046,"owners_count":20217523,"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":["game","text-adventure"],"created_at":"2024-07-29T19:14:22.788Z","updated_at":"2026-02-22T10:18:45.310Z","avatar_url":"https://github.com/fdavies93.png","language":"Python","funding_links":["https://www.buymeacoffee.com/fd93"],"categories":[],"sub_categories":[],"readme":"[![\"Buy Me A Coffee\"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/fd93) [![License: CC BY-SA 4.0](https://img.shields.io/badge/License-CC_BY--SA_4.0-orange.svg)](https://creativecommons.org/licenses/by-sa/4.0/)\n\n# MAGIC Text Adventure Framework\n\nMAGIC, as the name suggests, is a framework for writing console-based text adventures. It leans towards the style of traditional text adventures or pen-and-paper RPGs and was originally conceived as a way for me to quickly test different logics for a pen-and-paper system I thought about many years ago -- without using dice, game pieces, etc.\n\nIf you want to understand the way the framework works, the best way is to dive into game.py, the basic demo, and take a look around.\n\nIf you want to contribute to the framework code, you can file a pull request or chat with me directly. I'm a regular on the [\"Programmer's Hangout\"](https://discord.com/invite/programming) Discord.\n\n## Design Goals\n\nThe framework aims to be unopinionated, minimal and very extensible. RPG stats are not included in the framework, nor are basic verbs like \"look\" or \"move\" (although they will be in game.py). Even the basic concept of \"a room\" is actually just a state in an object's state dictionary; NPCs will merely be GameObjects with minds attached to them. This is a deliberate choice to solve several architecture issues with old-school MUD systems written in C.\n\nHard-programming features like \"look\" into a framework requires objects to have an ever-increasing number of flags such as \"visible?\" and callbacks like \"reaction_to_counter_attack\", ultimately leading to spaghetti code. On the other hand, while not implementing verbs into a framework leads to more verbose code, end-user developers can abstract away the complexity themselves while keeping the basic framework pristine.\n\n**Because the framework is relatively minimal, it's recommended you implement your own methods to create basic objects and do other basic admin. The reference (game.py) will contain these.**\n\n## Current Project Layout\n* magic-battle-sim is a naive implementation of the basic concepts\n* magic-rpg is a more sophisticated implementation \n* game.py is a basic demo designed to show how to implement game concepts using magic-rpg.py. It also serves as the main way of testing new features.\n\n## Current Priorities - Framework\n* Refactoring skills to allow skills to be used by NPCs.\n* Refactoring skill help system to allow nesting of skill types (probably instantaneous vs. time-consuming in the reference implementation)\n* Adding a save / load system for current game state (but not skills, reactions, or minds).\n* Writing I/O for web hosted version.\n\n## Current Priorities - Game.py\n* Implementing basic combat between actors using a stat system.\n* Implementing a basic inventory and item system.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdavies93%2Fmagic-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffdavies93%2Fmagic-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffdavies93%2Fmagic-demo/lists"}