{"id":19168390,"url":"https://github.com/bloomberg/git-adventure-game-builder","last_synced_at":"2025-05-07T14:41:58.567Z","repository":{"id":66125184,"uuid":"149665799","full_name":"bloomberg/git-adventure-game-builder","owner":"bloomberg","description":"A set of tools for building a Git adventure game, to help people learn Git","archived":false,"fork":false,"pushed_at":"2020-01-04T12:36:51.000Z","size":50,"stargazers_count":15,"open_issues_count":3,"forks_count":8,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-19T23:31:57.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bloomberg.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","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-09-20T20:19:21.000Z","updated_at":"2022-05-02T01:27:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"39c35763-2a81-46d8-90a6-2aa2bae058b4","html_url":"https://github.com/bloomberg/git-adventure-game-builder","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/bloomberg%2Fgit-adventure-game-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fgit-adventure-game-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fgit-adventure-game-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bloomberg%2Fgit-adventure-game-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bloomberg","download_url":"https://codeload.github.com/bloomberg/git-adventure-game-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252897454,"owners_count":21821439,"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":[],"created_at":"2024-11-09T09:42:30.398Z","updated_at":"2025-05-07T14:41:58.539Z","avatar_url":"https://github.com/bloomberg.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `git-adventure`\n\nA text-based adventure game helping players learn about `git` along the way.\n\nThis document describes how the text-based adventure system that for Git will\nwork.  It supports Git on the command line, both on Windows CMD and Windows\nGit Bash as well as shell under Unix based systems.\n\n## Building up a world\n\nEach level in the game is identified by a branch.  Branch names must be\nformatted as: `\u003clevel_number\u003e_\u003clevel_short_name\u003e`, for example:\n`01_look_into_the_past`.  The branch name is used to identify the level the\nuser is on, display the correct puzzle information and use the correct solution\nchecking.\n\nEach level consists out of 5 files.  The files are named, prefixed by the\nlevel name:\n\n* `\u003clvl\u003e_check.txt` - Contains the puzzle solution checking code.\n* `\u003clvl\u003e_hint.txt` - Contains a hint about how to solve the puzzle.  Each level\ncan define as many hint files as needed (`\u003clvl\u003e_hint2.txt`, `\u003clvl\u003e_hint3.txt` ...\n, `\u003clvl\u003e_hintN.txt`).\n* `\u003clvl\u003e_room.txt` - Contains a general description about the puzzle.  This is\n  displayed to the player when they enter the level.\n\nLastly, the level must also be recorded in the `.game_data/levels.txt` file\nwhich contains all of the level names (branch names), one per line.  Ensure\nthat this file contains a trailing blank line.\n\nDuring development, all this information is stored on the master\n`git-adventures` repository and a special script may be used to generate the\npristine repository.  See _Building the Repository_.\n\nIf your level requires specific setup during repository creation, you can place\nadditional commands into `.game_data/\u003clvl\u003e_setup.sh`.  This script will be\ncalled with two parameters: The source folder where the `git-adventure` master\nrepo is located, and the target folder where the branch is being setup.  The\nscript may assume that the target folder is already in the target branch and\nno changes to the git state in the target folder should be made.  All new files\nwill automatically be added to the git repo.\n\n## Scripted commands\n\nThe following 'commands' are provided as scripts in order to help the player\nnavigate the game:\n\n* './look' - Tells you about your surroundings and the predicament you find\n  yourself in.  Displays the content of the `\u003clvl\u003e_room.txt` file.\n* './hint' - Provides you with some help, perhaps an indication of how\n  to solve the problem.  Displays the content of the `\u003clvl\u003e_hint{n}.txt` file.\n  The command may be called multiple times, cycling through the number of\n  hint files provided.\n\nSome further commands we may want to potentially provide:\n\n* './map' - Some textual representation of the world to give the weary\n  traveler a bit more of an idea of the long-term strategies, goals.\n* './reset' - I've messed everything up.  Help me get back to the start of the\n  current level.\n\n## Ephemeral State\n\nThe `.gitignore` file contains `.game_data/state` and this folder can be used\nto keep ephemeral game state such as score.  Which files and what the format\nto be used is still undecided at this time.\n\n## Building the Repository\n\nTo test the final repo, execute the following:\n\n```sh\n./setup_clean_repo -o \u003ctarget_folder\u003e\n```\n\nThen clone the new pristine repository so that we can see what the user would\nsee:\n\n```sh\ngit clone \u003ctarget_folder\u003e \u003ctest_folder\u003e\n```\n\nIn order to play the game from the beginning:\n\n```sh\n./start_game\n```\n\nIn order to playtest a specific level, the following command can be executed\nto go to that specific level:\n\n```sh\ngit checkout -b \u003clvl\u003e origin/\u003clvl\u003e\n```\n\n## Publish the Repository\n\nLet's say you created the game repo and you are happy with it.\n\n```sh\n./setup_clean_repo -o ../great_game\n```\n\nYou can now publish it via:\n\n```sh\nGIT_GAME=https://github.com/bloomberg/git-adventure-game.git\n$ ./publish_game ../great_game ${GIT_GAME}\n```\n\n## Open Issues\n\n* How to ensure that local tracking branches are not automatically created\n* Branches to set visible when a level is passed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloomberg%2Fgit-adventure-game-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbloomberg%2Fgit-adventure-game-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbloomberg%2Fgit-adventure-game-builder/lists"}