{"id":18012246,"url":"https://github.com/divinedominion/termquickrpg","last_synced_at":"2026-04-30T10:32:00.579Z","repository":{"id":66740700,"uuid":"144376312","full_name":"DivineDominion/TermQuickRPG","owner":"DivineDominion","description":"Role-playing game written in Ruby that draws to the command-line using curses","archived":false,"fork":false,"pushed_at":"2021-03-03T08:28:57.000Z","size":183,"stargazers_count":3,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-09T23:44:13.347Z","etag":null,"topics":["curses","rpg","ruby","terminal"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/DivineDominion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2018-08-11T10:29:18.000Z","updated_at":"2021-03-04T14:41:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"54e5abeb-0f58-42e3-b6bc-15d088326daa","html_url":"https://github.com/DivineDominion/TermQuickRPG","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/DivineDominion%2FTermQuickRPG","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineDominion%2FTermQuickRPG/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineDominion%2FTermQuickRPG/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DivineDominion%2FTermQuickRPG/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DivineDominion","download_url":"https://codeload.github.com/DivineDominion/TermQuickRPG/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247190253,"owners_count":20898702,"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":["curses","rpg","ruby","terminal"],"created_at":"2024-10-30T03:15:01.133Z","updated_at":"2026-04-30T10:31:55.558Z","avatar_url":"https://github.com/DivineDominion.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TermQuickRPG\n\nTerminal QuickRPG port using ncurses.\n\n- See [the Gosu port](https://github.com/DivineDominion/quickrpg-clone) of the graphical game from 2001.\n\n![](github_assets/screenshot.png)\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'termquickrpg'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install termquickrpg\n\nAfter installing with `gem install`, you can run it from your `PATH` as:\n\n    $ termquickrpg\n\n### Ubuntu Installation Troubleshooting\n\nOn a fresh Ubuntu you'll probably need:\n\n    sudo apt install git ruby ruby-dev ruby-bundler build-essential libncurses-dev\n\nThen you should be able to run the ruby scripts at all.\n\n## Local testing\n\nTo run the built-in game from this directory without installation, install dependencies and run `exe/termquickrpg`:\n\n    $ bundle\n    $ bundle exec exe/termquickrpg\n\nAlternatively:\n\n    $ rake run\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n### Game scripts\n\nYou can write maps to include scriptable content and not just static map data.\n\n- To execute a script when the player _moves onto_ a coordinate, add an entry to the `:triggers` hash. (Key: location of the form `[x, y]`; Value: lambda `-\u003e (ctx) { }`)\n- To execute a script when the player _interacts_ with a specific coordinate (e.g. when you placed a decorative thing on the map to mangle with), add an entry to the `:interactions` hash. (Key: location of the form `[x, y]`; Value: lambda `-\u003e (ctx) { }`)\n- To have items the player can pick up, add an entry to the `:items` array as a hash of all item initializer parameters. (`{ location: [x, y], char: \"†\", name: \"Dagger\", effect: \"You stab with your Dagger.\" }`)\n- To have non-player characters to talk to, add an entry to `:characters` array as a hash of all character initializer parameters. (`{ location: [x, y], char: \"☻\", name: \"Bob\", talk: -\u003e (ctx, bob) { } }`.\n\nThe actual scripts are in the Ruby lambdas. That means they are executable Ruby code: you can do everything you can do in regular Ruby code, like using loops and if-statements.\n\nTo access the game engine-specific commands, you get a _script context_ to `#run` the script in as the first parameter of the lambda (named `ctx` in the examples). Wrap your code like in this example:\n\n```ruby\n{\ninteractions: [\n  # Location x=10/y=5 in the map\n  [10, 5] =\u003e -\u003e (ctx) {\n    # Regular ruby code could be here\n    ctx.run do\n      # Custom script commands are available in this block, like:\n      msg \"Hi!\"\n    end\n  }\n], # rest of the map data ...\n}\n```\n\nNote that scripts accept 1 or 2 parameters. The first one is always the script context. The optional second parameter is the trigger itself. In the case of a character's `talk` script, that would be the character game object itself. You can use that object in your script to change the character's representation on the map or move it around:\n\n```ruby\n{\ncharacters: [\n  {\n    location: [x, y], char: \"☺\", name: \"Bob\", talk: -\u003e (ctx, bob) {\n      ctx.run\n        # Use regular script commands\n        move bob, :up\n        dialogue bob, \"Don't touch me!\"\n        # Access `bob`'s properties and methods to change his face\n        bob.replace_char \"☹\"\n      end\n    }\n  }, # more character definitions here ...\n], # rest of the map data ...\n}\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/DivineDominion/termquickrpg. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivinedominion%2Ftermquickrpg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdivinedominion%2Ftermquickrpg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdivinedominion%2Ftermquickrpg/lists"}