{"repo":"okaybenji/text-engine","free":true,"listed":false,"github":"https://github.com/okaybenji/text-engine","clone":"git clone https://github.com/okaybenji/text-engine.git","description":"A browser-based text adventure game engine and sample game","language":"JavaScript","stars":375,"topics":["text-adventure","engine","adventure-game-engine","javascript","text-adventure-game","repl","game-engine","text-adventure-engine","text-engine","interactive-fiction"],"license":"GPL-3.0","category":"game-templates","readme_excerpt":"An HTML-based text adventure game engine. Small and easy to use with no dependencies. Highly customizable. Very little programming is required, but several JavaScript hooks are provided if you are inclined to use them! How do I use it? To create your own adventure, you can use one of the files in the game-disks folder as a template. For example, take a look at the disk called newDiskTemplate. Include your \"game disk\" (a function returning JSON data) in index.html and load it with loadDisk(myGameData) . (Look at index.html in the repo for an example.) The end product will be your very own text adventure game, similar to this one. It's a good idea to give that game a try to get introduced to the engine. text-engine uses a disk metaphor for the data which represents your game, like the floppy disks of yore. Including index.js from this repository in your index.html adds a several functions to the global namespace. One of these is called loadDisk . loadDisk accepts a single argument, which is your disk -- a function returning a JavaScript object (JSON). Disks A disk is a function which returns a JavaScript object that describes your game. At minimum, that object must have these two top-level properties: Property Type Description ----------- -------- ----------- roomId String This is a reference to the room the player currently occupies. Set this to the ID of the room the player should start in. rooms Array List of rooms in the game. There are other properties you can choose to in","default_branch":null,"files":null,"tree":[],"storefront":"/r/okaybenji","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/okaybenji/text-engine/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}