{"id":13472143,"url":"https://github.com/jcubic/gaiman","last_synced_at":"2025-04-04T16:17:26.108Z","repository":{"id":37235696,"uuid":"350305172","full_name":"jcubic/gaiman","owner":"jcubic","description":"Gaiman: Text based game engine and programming language","archived":false,"fork":false,"pushed_at":"2024-10-08T13:45:10.000Z","size":2427,"stargazers_count":138,"open_issues_count":36,"forks_count":11,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-30T02:37:24.348Z","etag":null,"topics":["dsl","game","game-development","javascript","javascript-library","programming-language","story","story-driven-games","storytelling","text-adventure","text-adventure-engine","text-adventure-game","text-adventure-games"],"latest_commit_sha":null,"homepage":"https://gaiman.js.org","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jcubic.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-03-22T10:43:58.000Z","updated_at":"2024-10-08T13:45:15.000Z","dependencies_parsed_at":"2024-03-13T00:32:13.485Z","dependency_job_id":"0e262557-8c8d-4d84-b948-095fbb01d11a","html_url":"https://github.com/jcubic/gaiman","commit_stats":{"total_commits":459,"total_committers":3,"mean_commits":153.0,"dds":0.008714596949891074,"last_synced_commit":"8ec34b49deab055268f86a97a4b73baf417f3a9b"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcubic%2Fgaiman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcubic%2Fgaiman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcubic%2Fgaiman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jcubic%2Fgaiman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jcubic","download_url":"https://codeload.github.com/jcubic/gaiman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247208190,"owners_count":20901570,"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":["dsl","game","game-development","javascript","javascript-library","programming-language","story","story-driven-games","storytelling","text-adventure","text-adventure-engine","text-adventure-game","text-adventure-games"],"created_at":"2024-07-31T16:00:52.325Z","updated_at":"2025-04-04T16:17:26.085Z","avatar_url":"https://github.com/jcubic.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Gaiman Engine and Programming Language\n\n![Gaiman: Text based adventure games engine and programming language](https://raw.githubusercontent.com/jcubic/gaiman/master/assets/banner.svg)\n\n[![npm](https://img.shields.io/badge/npm-1.0.0%E2%80%93beta.3-blue.svg)](https://www.npmjs.com/package/gaiman)\n[![Build and test](https://github.com/jcubic/gaiman/actions/workflows/build.yaml/badge.svg)](https://github.com/jcubic/gaiman/actions/workflows/build.yaml)\n[![Coverage Status](https://coveralls.io/repos/github/jcubic/gaiman/badge.svg?branch=master)](https://coveralls.io/github/jcubic/gaiman?branch=master)\n[![LICENSE GPLv3](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://github.com/jcubic/gaiman/blob/master/LICENSE)\n\n[Gaiman: Storytelling Text Based Game Engine and Programming Language](https://github.com/jcubic/gaiman)\n\nMain part of Gaiman is a minimalist, Ruby inspired, programming language. The main purpose of it is to help creating\n[Text Adventure Games](https://en.wikipedia.org/wiki/Interactive_fiction). But it can also be used\nto create any interactive CLI applications (Web Based Terminal applications).\nIt supports browser based CLI applications and in the future also native command line.\n\n## Installation\n\nFirst, you need to install [NodeJS](https://nodejs.org/en/). After you're done, you should open terminal and use npm command (that is included with Node).\n\n```\nnpm install -g gaiman@beta\n```\n\n## Usage\n\nFirst, create `input.gs` file with your Gaiman program (you can use one of the examples), and then run:\n\n```\ngaiman -o directory input.gs\n```\n\nThis will compile your source file and generate `directory/index.html` and `directory/index.js` files.\nYou can open the generated HTML file in the browser and run the game.\n\nWhen output files are generated you can use this command to run live [Web server](https://en.wikipedia.org/wiki/Web_server).\nThis is required to run the example. It's like running a website on the internet.\n\n```\ncd directory\nnpx live-server\n```\n\nThis should open `index.html` inside your browser. When your app is ready you can publish it with:\n* [GitHub Pages](https://progate.com/docs/github-pages)\n* [Netlify](https://www.freecodecamp.org/news/publish-your-website-netlify-github/)\n\n## Documentation\n\nSee [Reference Manual on Wiki](https://github.com/jcubic/gaiman/wiki/Reference-Manual).\n\n## Examples\n\nThis is Hello world Gaiman DSL example:\n\n```ruby\necho get \"https://gaiman.js.org/gaiman.txt\"\necho* \"Hi, What is your name?\", 50 # Typing animation with 50ms delay\nlet name = ask \"name? \"\necho \"Hello $name, nice to meet you.\"\n```\n\nMore advanced example:\n\n```ruby\nif cookie.visited then\n    if cookie.user then\n        let user = cookie.user\n        echo \"Hello $user, welcome back\"\n    else\n        ask_details(\"Welcome back stranger\")\n    end\nelse\n    cookie.visited = true\n    ask_details(\"Welcome stranger\")\nend\n\ndef ask_details(msg)\n    echo msg\n    echo \"Do you want me to contact you with updates?\"\n    let confirm = ask \"yes/no: \", lambda(answer)\n        return answer =~ /^(y|yes|n|no)$/i\n    end\n    if confirm =~ /y|yes/i then\n        echo \"what is your name?\"\n        let name = ask \"name: \", lambda(name)\n            let valid = name != \"\"\n            if not valid then\n                echo \"You need to type something\"\n            end\n            return valid\n        end\n        cookie.user = name\n        let email = ask \"email: \", lambda(email)\n            let valid = email =~ /^.+@.+\\..+$/\n            if not valid then\n                echo \"wrong email\"\n            end\n            return valid\n        end\n        cookie.email = email\n        let response = post \"/register\", { \"name\" =\u003e name, \"email\" =\u003e email }\n        if response then\n            echo \"Welcome $user. You're successfully registered\"\n        end\n    else\n        echo \"Ok, as you wish. Bye\"\n    end\nend\n```\n\nMore examples in [examples directory](https://github.com/jcubic/gaiman/tree/master/examples)\n\nSee [Reference Manual](https://github.com/jcubic/gaiman/wiki/Reference-Manual) for details about the features\n\n## Live Demo\n\nSee [Gaiman language Playground](https://gaiman.js.org/)\n\nLive Edit of Gaiman Code:\n![Gaiman programming language Playground Demo Session](https://github.com/jcubic/gaiman/blob/master/assets/edit.gif?raw=true)\n\nLive edit of style\n![Gaiman programming language Playground Demo Session](https://github.com/jcubic/gaiman/blob/master/assets/simple.gif?raw=true)\n\n## Roadmap\n\nSee Wiki [TODO \u0026 Roadmap](https://github.com/jcubic/gaiman/wiki/TODO-\u0026-Roadmap).\n\n## Name and Origin\n\nName came from [Neil Gaiman](https://en.wikipedia.org/wiki/Neil_Gaiman),\nAuthor of novels, comic books, graphic novels and films. Great storyteller.\n\nYou can read about the origin of the language in the beginning of the article:\n* [How to create programming language that compiles to JavaScript](https://hackernoon.com/creating-your-own-javascript-based-programming-language-has-never-been-easier-wju33by)\n\n## Acknowledge\n\nLogo use:\n\n* Font [Calling Heart](https://www.dafont.com/calling-heart.font)\n  by [Lettersiro Studio](https://www.dafont.com/lettersiro-studio.d7440)\n* Clipart [Book with bookmarks](https://openclipart.org/detail/280709/book-with-bookmarks)\n  by [Kevin David Pointon](https://openclipart.org/artist/Firkin)\n\n## License\n\nReleased under GNU GPL v3 or later\u003cbr/\u003e\nCopyright (c) 2021-2024 [Jakub T. Jankiewicz](https://jcubic.pl/me)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcubic%2Fgaiman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjcubic%2Fgaiman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjcubic%2Fgaiman/lists"}