A related example, I tried out Inform 7 a few times. Inform 7 is a programming language for writing interactive fiction. It's also a subset of natural English.
It's a really interesting and cool programming language with plenty of features to do what you need to do. But I ultimately found it difficult to keep a model of the language in my head because of the similarity to English.
The text adventure community is still going strong: new tooling for Infocom's Z-machine gaming system, interpreters for essentially every platform, thousands of new games --- I wrote some myself (I won fourth place in the yearly Interactive Fiction Competition in 2012!). You can still write games which can be played on the original Infocom interpreters, although most are now too big and need newer interpreters. The latest Inform compiler is a semi-declarative rule-based system where you write text in natural language. http://inform7.com/
Sounds like you are trying to make an IF (Interactive Fiction)
I'd recommend a program called inform. You can check it out here: http://inform7.com/
It has all the necessary resources on the site.
If you ask /r/python/ whether python is a good choice, they will say yes.
And it is completely doable! But if the goal doesn't include learning python, you're probably better off starting with an existing authoring system for interactive fiction such as inform.
Many years ago I used to write these using a free C+ based language called Inform - just checked and it's still going but looks like it has been updated and made flashier.
There used to be sites where people could submit their games for others to play - if you are interested in text-based adventure games then they are still being made !
Check out http://inform7.com/
Incidentally, although at the time I was a moderately-experienced programmer in some older languages, I found the Inform language to be really intuitive and was a great intro to C+ based ones so it's worth taking a look :D
no mention of inform 7? i thought it was pretty much the gold standard of IF authoring tools; it's definitely what i'll be using if i ever get off my ass and actually make a game.
> I mean who cares about building text adventure games Hahaha.
Judging by the number of entries every year in the Interactive Fiction Competition, and the existing tools for writing interactive fiction, a good number of people, actually.
> While my skills are not any where close enough to contribute to an open source project
Actually, this is a place that I would recommend starting. The existing project will give you a structure that you can build upon, so rather than figuring out how to do an entire project by yourself, you can find an existing project that is missing some feature, add that feature, get some feedback on your code from other people, and then see other people start to use it since you know there are other people using that project already.
Start with something simple; improving error messages in an existing tool, or adding a small feature that's similar to one that already exists (a new input or output format for a tool that supports several, for instance). Work your way up to larger features, and then eventually to working on your own project from scratch.
Inform or TADS are a couple domain specific languages. The old-school methods basically amount to having:
I would pick the language that you find to be the most fun to program in, assuming you want to write all this stuff. If you just want to make a game, then Inform 7 seems to be pretty popular, but you might find TADS to be more like a programming language.
"interactive fiction" is the keyword you want to google, and see also: r/interactivefiction
Edit: Here is a very tiny toy zork-like adventure that I made when I first tried to learn python
I found this reminding of language for interactive fiction such as Inform 7. There are surprisingly interesting links between fiction/narration and type theory, see for example Chris Martens' work and thesis proposal.
The current big ones are Inform 7 for old-school parser games and Twine and ChoiceScript for stuff that's more Choose Your Own Adventure.
I don't really see your problem area intersecting much with what I consider the trickiest parts in roguelike dev. World generation is not that hard and the display can traditionally done with ASCII without changing the game experience much. The bigger problem for me is managing rules and rule complexity. What I'd like to see tried in a game engine is some kind of declarative rule-based system that can do NetHack-grade complex interacting rules in a way that reads like a pen & paper RPG manual instead of an imperative rat's nest of legacy C. See eg. here and here and actual source code of a CRPG-ish thing in Graham Nelson's Inform 7.
So basically "Inform 7 for roguelikes" would be the sort of engine project in the rogulike space that'd actually get me to pay attention, and also is pretty much entirely different from what you are making. Maybe try /r/VoxelGameDev for stuff that focuses on the graphics and geometry side of worldbuilding?
> multi-threading problem has almost nothing to do with the engine. > > it's mainly the game code itself, the main game loop where multi-threading is implemented.
Well, one could argue that PDS games share a common "game logic" framework to handle events, actors and AI; and that this framework is actually part of the engine. While this "framework" certainly is different from game to game, they most certainly don't rewrite it from scratch each time and there is probably some amount of old code in it. It's both an "engine" in the sense that it's re-used (at least in design) from game to game and in the sense that it's responsible for executing the content written with their "Paradox Script" (don't know how it's actually called).
Technicalities aside, it's reasonable to assume that PDS does not rewrite the game logic from scratch each time, that some of the code and design decisions governing game logic have been around for some time, and that some of these legacies from older games hamper multithreading efforts to some degree.
Also, in general, the main game loop may be buried in the engine (eg, if I'm writing a game in inform I won't see the main loop) and multithreading does not have to be implemented close to the main loop (eg, openMP "par" directives).
+1 with a link -- Inform works on OSX and Linux, as well. It's got a sweet debugging interface (that saves all routes you've played through your game in a tree it calls the "skein") and knows common vocabulary.
Every time someone talks about natural-sounding programming languages I'm obligated to refer them to the maddening insanity that is inform.
"Rocket Man"
Instead of going somewhere from the spaceport when the player carries something: let N be "[is-are the list of things carried by the player] really suitable gear to take to the moon?" in sentence case; say "[N][paragraph break]".
The Spaceport is a room. North of the Spaceport is the Rocket Launch Pad. The player carries a stuffed bear, a chocolate cookie, and a book.
The description of the book is "It is entitled [italic type]Why Not To Take [sentence cased inventory] To The Moon[roman type]."
To say sentence cased inventory: let N be "[a list of things carried by the player]" in title case; say "[N]".
Test me with "n / x book".
Yes, this is code. It's all code.
Inform7 is amazing. You write the IF in what looks a lot like plain English - which makes it pretty quick to learn, and very powerful. I'd recommend it - and it has a lot of community support, examples, extensions and documentation - plus an IDE of for writing the whole thing in. Highly recommended!
Was it Divis Mortis? Or perhaps One Eye Open? They were both from the 2010 IF Comp.
Edit: Also, here is a list of IF interpreters for various platforms so you can play either of those. The IF scene is pretty active and there are lots of awesome games out there!
I was looking into making text adventure games using Inform which seems like a really cool program. One of the most impressive development environments I've ever seen. I had an idea that I would make a text adventure out of the Fifth Element and the catch would be that you'd play as Corbin Dallas and therefore Zorg (Zork? LOL) would never actually be seen! If someone wants to "steal" this idea, go ahead.
Oh boy are you in for a treat. So this is actually specifically talked about in RB11.4.
>If we wish to change the wording of the default message ("[Your score has..."), we may want to use the Responses system.
So when you see the words "use the Responses system" it means that you're more than likely going to have to change one of the responses builtin.
So you can find out a little more about that in WI14.12. Basically you'll run a story and then just type RESPONSES 1
to get a list of the builtin responses. In that, you should see the responses that are responsible for the scoring message.
announce the score rule response (A): "[if the story has ended]In that game you scored[otherwise]You have so far scored[end if] [score] out of a possible [maximum score], in [turn count] turn[s]" announce the score rule response (B): ", earning you the rank of " announce the score rule response (C): "[There] [are] no score in this story." announce the score rule response (D): "[bracket]Your score has just gone up by [number understood in words] point[s].[close bracket]" announce the score rule response (E): "[bracket]Your score has just gone down by [number understood in words] point[s].[close bracket]"
You rules are more than likely the same as mine here, so the one that you are interested in is (D) looks like. May want to change (E) as well but that's up to you. You can see an example of changing a response in WI14.11.
That should be enough to get you going there.
The last update to the bug tracker was in December of last year. While I don't think the release schedule speaks well of the health of Inform 7, I still don't think it's dead quite yet. Edit: and issues are still being responded to. When this project dies, we will know when the bug tracker goes silent. Or when they tell us.
Yeah, that's the one that uses text-style programming.
Here's an example:
http://inform7.com/learn/eg/bronze/source.txt
No really, that's the source code to a game, in Inform7.
I like my source code to look like source code, and when I look at Inform7, I feel like Switch in the Matrix, Not like this. Not like this.
This what Inform is for- it's the modern implementation of the system the classic Infocom games (such as Zork) were written in and is heavily used in the interactive fiction community. It is an odd language and one I never really did much in but it is what it used primarily nowadays, alongside a few other smaller interactive fiction engines.
If I were to use a more standard language I'd personally be going for Python (or even JavaScript/ES6) as it offers the object-oriented paradigm you like without the pain that C++ gives for memory management and string handling. I'd also be looking at ANTLR as my lexer/parser as it Just Works and is available for many common languages.
It's worth looking at Inform first though- better to look at what people have been building and using for literally decades before deciding to write a new implementation.
There's Inform7, which is basically a big blob of NLP transpiling something like this into Inform6, which is closer to underlying interactive fiction VMs.
As usual for these languages, it reads nice when it's in its niche, but becomes mind-numbing if there's need for behaviors too far beyond common ones.
It's nice for describing rooms and objects, but it gets a little awkward when you want to implement complex behavior, IMHO.
For example, this is from Glass, by Emily Short:
To relate (initial subject - a subject) with (next subject - a subject), directly or pausing first: repeat through conversation set begin; if the starting entry is initial subject or starting entry is blank begin; if the final entry is next subject or final entry is blank begin; if pausing first, say "There is a long thoughtful silence. "; say "[comment entry][paragraph break]"; blank out the whole row; rule succeeds; end if; end if; end repeat.
Yeah it's like that. I find those books cumbersome and kind of awkward to navigate but I've always been drawn to the notion of being able to explore a literary world in a non-linear way... I got into this through RPG gaming, and right now I use a program called Inform which makes writing it all really easy and fluid. They also have some good stuff on the whole philosophy of interactive fiction, history, some examples, etc. What I'm currently writing is going to be a standalone text-based RPG which will be playable in a web browser, and if I can manage to recruit some more people I would like to turn it into it's own RPG built in the Fallout game engine.
I do, and that's why I've put together a little collection of resources I would have found useful when I was asking the same questions ten years ago. Here you go! http://tom-jubert.blogspot.co.uk/p/narrative-design-resources.html
To answer your particular questions... I got my first job writing on Penumbra: Overture. It was a student game gone pro, and I emailed the guys at Frictional a rewrite of their intro script from the existing Penumbra tech demo as a pitch. At the time I was in the habit of doing that sort of thing, first asking for work experience, then work placements, then writing jobs.
I also spent time in QA at Lionhead Studios on Black and White 2. That was super valuable experience, and I recommend it - but in terms of getting your first writing job I would say go after the smaller studios who need writers. There are so many talented small teams out there crying out for a talented writer. Persevere, keep practicing, and you will get a shot eventually. It may take a while.
And in my day it wasn't Twine, it was Inform7 http://inform7.com/ which I still highly recommend.
Going to take this opportunity to pimp Inform7. It's a ballin' ass interactive fiction engine that seeks to emulate the best parts of the genre while avoiding bullshit like you've got in the OP. The code you write also reads like English, so non-programmers (i.e. most authors) can use it perfectly well after skimming through the included examples and documentation.
It's good stuff, more folks should check it out.
The idea is out there, but it's far for being feasible. The Media Lab at MIT is working on something like that, "Programming in Natural Language" is the name of the project. It's still very, very far from being functional, in spite of having very, very clever people working on it.
You may want to look at Inform 7 http://inform7.com/ which uses natural language for programming. It's the closest to what you're talking about, and it's already out there.
Setting aside the idea of using Inform as a tool to manage a tabletop game, and noting that there ARE existing tools to do this like FantasyGrounds or Roll20...
Yes, there are ways to change the rules during play, and one of them is the concept of Scenes in inform7.
http://inform7.com/book/WI_10_1.html
Scenes are basically groups of rules that can be triggered by the passage of time, or by any other specific trigger. This is probably the closest thing to what you're looking for.
I thought this was a great idea, so I used it. Thank you!
A thing can be notable or notnotable. A thing is usually notable.
Glancing is an action applying to nothing. Understand "Glance" as glancing.
Carry out glancing: If the location is dark, say "It is pitch dark, and you can't see a thing." instead; Let X be the list of notable things in the location; say "[X]".
It isn't pretty yet, though. The documentation on inventory highlights some simple ways to pretty-up lists: "with newlines" and "with extra indentation" would look great here. Having trouble figuring out exactly how to tell inform use those though.
I'll come back to update this comment if the code gets any better.
I don't think starting with terrain is necessary.
There are two parts to the problem of procedural generation of pretty much anything: some kind of conceptual model of the type of thing you want to generate (terrain, characters, civilisations), and showing the generated results in a player-visible way (in your case, producing readable text).
You might learn some general lessons by looking at level generation, but neither the conceptual models nor the presentation are directly applicable to what you want.
Concept models are so specific to what you're doing that it's hard to point you towards resources, but for ideas on text generation, you could look at text generation tools like http://tracery.io/ or play with text-adventure systems like http://inform7.com
You could, but you'd have to write your own parser to do that, which is a lot of work.
If that's what you want to do you'd probably be better off using something like Inform 7, which was built for that kind of stuff.
For more ideas about how to implement animal behavior, you can check out the examples in the recipe book -- specifically, 8.3 Animals and all of 7 Other Characters.
I know you're just asking about the legality, but I want to address some other issues - mainly, Unity is absolute shit for a text based game. You can do it, sure, the same way you can use a Ferrari to haul firewood. There are much, much better tools if you want to make a text based game. I highly recommend Inform 7 for its "natural language" approach, or if you prefer a more C-like language, TADS 3.
Every one of us learned how to visually parse natural language sentences in school over a period of about a decade. The closer your layout is to a "normal" sentence, the more you can rely on that expensive training to help people visually parse your thing.
See Inform 7 for an interesting example of how far this can profitably go.
Non-shitty answer: Are you familiar with Inform? It's a programming language designed for writing interactive fiction. You might find it interesting.
that's a text-game snippet in a language resembling english (way better than COBOL, though). That snippet alone creates 2 rooms and a NPC. You can ask him for help and he goes into room 2 (where supposedly we should put some contrivance there for him to help the player)
Seconding this. Inform is brilliant, very powerful, and very first time friendly, particularly due to the excellent and built-in documentation.
No pirating needed, Inform 7 is completely free. It's probably the best place to start.
Inform 7 itself supports compiling your story to a webpage with a built-in Javascript interpreter. Check out section 25.11 of the I7 manual.
It's possible to play existing blorb/z8 files with Parchment as well, you can put a direct URL for your story file into http://parchment.googlecode.com/svn/trunk/zcode.html and get a link to a Parchment interpreter page that plays it.
Access to academic research is definitely an issue, though I don't claim the knowledge and experience to suggest or evaluate solutions that would maximize fairness.
Assorted thoughts:
My college cuts alumni out of database and library access after they graduate, but my grad school's policy seems to be to extend access indefinitely, which I'm super grateful for even when I don't take full advantage of it. What do most colleges' policies on the subject look like? And keeping in mind that not everyone goes through college.
Many academic publications don't really seem to know much of how to handle digital media (though maybe actual digital-media-studies types of fields are doing okay). Even when there's explicit interest in incorporating audio and video in digital-format publications, for instance, it seems to be very shallowly implemented and not well-designed for actual readers' use/convenience.
The way that the parser IF community has historically handled this issue is very interesting to me, but "the parser IF community [...] historically" is much smaller-scale and more technologically uniform than "the entire history of digital games ever". Like, can you imagine "all of the various" game developers creating a "treaty" decreeing "a common format for cover art, bibliographic data, and so on"? And now that other types of text-based games are gaining popularity, the same problem has begun to arise -- Twine(+) writers and players didn't develop from the same roots and never signed no damn treaty, not to mention what seems to be a greater technological divergence, so would-be IF archivists are fretting rather.
Perhaps instead of the prompts themselves, the best story replies. I'd look into r/bestofwritingprompts. But definitely a thread where people could submit their work. Maybe you could also give an example of what you plan to do with the pieces.
EDIT
I actually found the original link I was reading about this. Tell me if this is where you're going with it?
If anyone here has ever used Inform 7 (code example), it is the most fully-realized english-based programming syntax I've ever seen.
When I used it for a project, the english syntax turned out to be a curse, because english syntax is very flexible and ambiguous, but programming languages are (generally) strict and unambiguous. So, I'd often type things that made sense in english but didn't work in the language, and I had to constantly tweak the word order and phrasing until I had written the sentences the way the parser expected.
If you just want basic teleportation without any restrictions, you can try a simple snippet like:
> Teleporting is an action applying to one visible thing. Understand "go to [any room]" as teleporting. Carry out teleporting: move the player to the noun. (Source: http://www.intfiction.org/forum/viewtopic.php?p=17895&sid=f4294b7cde9bee89d526c4f783849a64#p17895)
If you're interested in allowing the player to travel towards rooms (or to adjacent rooms by name), I suggest the following example from the source of Emily Short's 'Bronze': http://inform7.com/learn/eg/bronze/source_35.html
Note the 'Understand "go to [any room]" ' action, which calculates a route, determines a heading, and moves the player. The code in this case is somewhat complex because it supports doors, darkness, unknown routes, etc. Depending on the specifics of your adventure, you can eliminate some of these checks.
If you're really interested in showcasing good writing and story, what you want is interactive fiction. It's a niche game genre to be sure, but it's been experiencing a revival of sorts because of the annual competition, and it's certainly a good way to showcase writing and story in gaming. As a bonus, you don't have to worry about creating art assets, animations, etc., because everything you create is part of the writing and the story - particularly ideal for a one-person project.
A good starting place would be to use Inform 7 (it's free) so you can skip having to bootstrap up a whole game architecture. Out of the box, Inform 7 gives you most of what you'd need to do standard IF, but it's flexible enough that you can kitbash any mechanics you want into it. And the manual is an absolute pleasure to read (as you'd expect from people who write prose for fun). The language is very easy to pick up, being natural language, and lends itself to the presentation style in a way that few development environments do.
The only down side, really, is that the text-only nature of the game will put a lot of people off. You're not going to get rich selling indie IF. But if your goal is to showcase writing and story for a teacher or colleagues, it would do that effectively, and it would certainly hone your writing skills. (And it's just plain a lot of fun if you enjoy writing.)
I was interested in this idea a while ago and stumbled upon Inform7 which is a very non-programmer friendly choose-your-own-adventure style "game" engine. It's probably worth looking into and I'm sure you could figure it out on your own. It's very well documented.
Also, I wish there were more of these games. I miss real stories.
For general programming, Python is easy to learn and good to know (unlike some toy languages, which you'll never use again). If you plan on actually doing something with your knowledge in the future, I highly recommend starting with Python.
From personal experience, if you want to make a text adventure, I'd recommend Inform 7. Its syntax looks like natural language (English) and you'll be able to get going very quickly. It does, however, encourage lots of bad habits (like global variables and mediocre encapsulation) and uses metaphors uncommon in other programming languages, so if you want to learn real programming keep that in mind. The article mentions ADRIFT, which is another format based on a GUI (IIRC). I don't know much about it except that it produces the same kind of game (text adventure) as Inform. Being a GUI (that is, a series of dialog boxes and other windows which ask you questions about your game instead of a programming language you use to describe it), it may be easier to work with.
I am currently in the process of writing an Inform 7 game. One of the drawbacks that they don't always tell you about is this: the errors its compiler will throw at you can be confusing or misleading, and that happens a lot. Fortunately there are dedicated forums where friendly people will help you with any given system (ADRIFT, Inform, TADS, whatnot). Just keep in mind, over there they're called "interactive fiction" or "if" for short.
I have less experience with the other suggestions in the list or the other genres. I have no experience with graphical programming (besides very limited javax.swing, which doesn't count). Maybe ask /r/gaming or /r/programming (or does anyone know of a more specific subreddit?)?
Twine is probably the most accessible option, yes. If you want something that comes with an actual world model by default, Inform 7 combines the greatest flexibility with the most accessibility, and it can compile to the Glulx multimedia format.
This may be off the mark, but that natural language programming sounds a lot like Inform 7.
Typical code reads like this:
The old lady is a woman in the Stage. Understand "mother" or "stepmother" as the old lady. The old lady is active.
... it's written using Knuthian literate programming...
Which is to say, it's self-documenting!
Anyway, I've found it to be an impenetrable web of confusing B.S., but there's a lot of non-code (that is documentation), you can read here
I always wondered what ZIL looked like. It looks like a bit of a beast.. certainly designed for programmers rather than writers.
​
Contrast that with something modern, like Inform 7, which is designed for writers, the difference is stunning (here's an example of what current interactive fiction source code looks like: http://inform7.com/learn/eg/wir1/source.html )
Most interactive fiction is written using Inform.
https://en.wikipedia.org/wiki/Inform
I've never heard of a JavaScript to Inform interpreter, but maybe such a thing exists.
I don't know which version of Inform7 you're using, but example code is always dark-blue in the manual. Sure, there are complete games on the official site, where you can see its source text, alternatively download the project file (I recommend "Bronze" by Emily Short). I wouldn't say it's the ideal way to start out as a beginner; do consider skimming through the manual so you get a grasp on how the code works and what the correct syntaxes are. For starters, brackets outside quotation marks are for code comments (and will make the text green coloured). Brackets inside quotation marks is for text substitutions (and will colour the text purple).
Example Room is a room.
[This text will be a comment, and will only be visible in the source text]
Instead of listening when the player is in Example Room: say "You can hear [sounds in Example Room]."
A thing can be audible. An audible thing has some text called the sound.
To say sounds in (room - a room): repeat with N running through audible things in the room: say the sound of N.
That's not the manual/documentation. That's your game's index (note that the Index tab is selected) You want the actual documentation, under the Documentation tab. Note that the white section is the manual, and the yellow section is the recipe book (for slightly more advanced writers).
The index is used for getting a comprehensive overview of everything in your game, and is updated each time the game is compiled. It only updates before play begins, so any changes during the game will not be reflected in the index.
Edit: The manual is also avaliable here. Brew a pot of coffee and start at the beginning. It's fun! Feel free to ask if anything's unclear :)
Thanks for the responses all. Indeed, it looks like the Glulx virtual machine supports reading and writing of files specifically for allowing the programs to communicate with the outside world. This is defined in the Glk API, and Inform 7 supports its use in compiled code:
http://inform7.com/learn/man/WI_23_11.html
Since I only need to communicate once per turn, it really looks like this will work.
Just a small warning; substituting a carry-out rule will make it trigger twice. (Bug #1976)
I agree that the best way to handle is a conditional exception to the check rule, I think the proper syntax should be something like (based on example 227):
The can't take other people rule does when taking an animal.
In order to make taking animals work, you may need to revoke the "can't take other people rule" in addition to making it portable (if it isn't already?).
If you have non-animal people, you may wish to instead replace it with a rule that prohibits taking men or women.
Taken directly from the syntax example file, here is the way you would phrase these sorts of operations:
The can't take other people rule is not listed in the check taking rules. The new taking rule is listed instead of the standard taking rule in the carry out taking rules.
You may also wish to review the chapter on rulebooks.
Both of them are programming languages. Inform has version 6 and 7 - the former is more of a programming language, the latter uses a subset of English for its programming. You can check it out here.
/u/Trainzack is right, action names are supposed to be gerrands optionally modified by a preposition. I actually thought this was enforced by the compiler.
see also the section on "action variables" which would let the instead of talking to bob: ...
syntax work even if the action name is talking
instead of talking to
.
I strongly recommend you (re-)read the "Actions" and "Advanced Actions" chapters of the manual.
1. Isn't it just all things in <the room> which are not carried
(I've tested this and it works for me).
Ah. nm "in" only goes on layer deep, so if you have nested containers (in this case, the room, and within the room are some objects, one of which is the player, and perhaps a treasure chest or something, and then within the player/containers in the room there are other objects it won't nest.
The recursive containment relation is called enclosure, so you do:
the list of not carried things enclosed by <the room>
Could also do the list of things enclosed by <the room> and not enclosed by the player
or the list of things enclosed by <the room> and not possessed by the player
or the list of things enclosed by <the room> which the player does not have
possession is similar to containment in that it is not recursive; however, something "has"/"possesses" something else if is "in" (containment), "on" (supporting), or wearing the other other thing.
2. There aren't any built in operations for this, but of course you could write your own; however, it isn't very useful, since you'd usually just write your "description" (this is the technical term used in the i7 documentation, but I prefer to call/think of them as queries, and it seems you do too) differently. (though of course some times you have a list of things that aren't world-objects, but even then you could use custom-relations... I guess remember that i7 is secretly a dialect of prolog)
However, see §21.11. Variations: arrays, logs, queues, stacks, sets, sieves and rings in the docs.
3. Did you even check the documentation before asking? Though to be fair, the answer is under the heading building lists and that's a little confusing. (I just skimmed the entire chapter on lists)
You hit the "release" button. It should be right next to the "Go" an "replay" buttons.
You may wish to check out Chapter 25 Releasing in the inform7 manual.
I think one would not want to port inform7 (which is a compiler to inform6, which is then interpreted - I think), but an inform interpreter:
http://inform7.com/if/interpreters/
...where Frotz is one option of them.
Also, I have Gargoyle running on my Kindle ereader, which might hint at the code being portable ;-)
I'm looking forward to /u/Urd's suggestions, but in the meantime here are my thoughts...
It really depends on what your goals actually are. If you want to 'learn batch' then carry on. The best way to learn it is to use it and that is exactly what you are doing. If you just want to make text based games specifically, you may want to check out Inform7, they even have their own subreddit at /r/inform7. If you want to learn to program in general, and building games just happens to be something you enjoy as a learning tool you may want to check out the ever popular lpthw as it lays out the tools and sets you loose to build as elaborate a text adventure as you could want. I'd be willing to bet the third option is the one you'll want.
Learning C# is an admirable goal, and I hope you succeed. C# is a great language for a lot of things. However, specifically for creating adventure games I'd recommend that you take a look at Inform 7 - which is an amazing tool for penning adventures in natural English syntax...
IIRC, both Glulxe and Git can run gblorb files (assuming you're using Windows). They can be downloaded from here. Git is effectively a faster version of Glulxe
Edit: There's actually a useful table on the wiki that lists available programs to run specific file types
I think you want Simple Chat, but there are several conversation engines for inform since the built in system for conversation is kind of lacking.
The "inform" way to do conversation is ask whoever about whatever
then there's a rule like:
carry out asking whoever about "whatever": say "'Whatever.', whoever replies".
Y'know what I find funniest:
This Twine thing appears to be the Fisher-Price model of something like Inform or TADS-- a system for making Interactive Fiction pieces (Text Adventures). I'd noodled around a bit with Inform 7 a bit myself, back when I had free time, and the one thing I found funny in the community was that even when people were making pieces with honest-to-goodness game-mechanical elements, it was always described as "Interactive Fiction", not a "Game". I'm not saying this is a lesser distinction, and I never did find out what the hangup was on the subject, though I always felt that some people should have at least applied both titles to their work, as it was worthy of both.
But then, years down the road, I find this amateur's-amateur shouting "Hey, look, I'm a GAME DEVELOPER!", having done basically the point-and-click simple version of the sort of thing that these other folks had been languishing in obscurity doing for quite some time.
Technically, it stands for "interactive fiction", but as you might imagine, that phrase as a literal descriptor could be applied to very many things. Traditionally it has referred to parser-based text games, such as the classic Zork and so forth; after text adventures yielded to video games in the commercial space, the artform was kept alive by a very dedicated hobbyist community, where experimentation flourished. In the last decade, other forms of digital text games have also risen to popularity (...calibrated for text-game levels of "popularity", of course), which pushed the aforesaid hobbyist community and various narrative/game-design wonks to reconsider the boundaries of "IF" and how/where that label could be expanded with fruitful or interesting results.
The "IF" tab on the Inform 7 website has some more history, and Andrew Plotkin's IF page is also written as an introduction to IF!*
*Bias check: these resources are both slanted toward the parser side of things (Inform 7 being a popular language for writing modern parser IF, Andrew Plotkin being one of the luminaries of the medium). Plotkin and the prominent folks involved with I7 are interested in many kinds of intersection between text/narrative and play, but they are going to be shaped by their experiences just like anyone else.
The funny part in seeing this Twine stuff is...
I was trying to learn Inform 7^([1]) a while back, so that had me lurking in the small but tenacious circle of Interactive Fiction (a.k.a. "Text Adventure") writers, and I noticed that they, by and large, never used the term "games". They were always writing "interactive fiction", even when to my mind, the challenges and achievements involved transcended that into the level of game-ness.
Meanwhile, you've got folks doing the Fisher-Price, Drag-and-drop, underpowered version of that, and throwing themselves around as game developers, wanting to be respected like the real adults for it. Yeah, okay, it might be well written... but you know what else is well-written? Games. They're also well-crafted, well-balanced, often well-graphicked, well-designed, and, well, games. Congratulations. You've completed step 1... of 20.
Granted, I won't begrudge some Twine dabbler being a Twine dabbler, but just don't let it inflate your head too much. Have some humility, and you might push yourself to advance.
^([1] A beautiful language, IMO, and pretty easy to pick up, too. I'd recommend taking a look if you've ever considered writing an IF game.)
If you're interested in writing a FULLCOMMUNIST text adventure, Inform 7 is a very accessible language, even if you don't have any programming background. It looks almost like English, and is pretty easy to pick up.
Doing so is not terribly difficult, and there are any number of tools you can use to make it. There aren't any "tutorials" for whole projects, but you can piece together how to do it with a little careful thought.
There are even platforms built for exactly this kind of thing: interactive fiction with a tool like Inform (see TrapQuest for an example), and RenPy (which is used for visual novels).
All you need is:
The only hard part is putting it together and adding content that's fun.
I suspect that game world logic programming is just intrinsically tricky with a strict type system. It could work if you started out with pretty much a full idea of everything your game will have (chess, Tetris clone), or if your game will have mostly data-driven variations of objects with very few standard interactions (side-scrolling shooter).
With roguelikes, interactive fiction, and whatever all the Zeldas and Assassin's Creeds are called, you start out having very little idea of all the nuts and bolts you'll end up needing with the complete project. A lot of them end up doing something like dynamic typing, either by adding a scripting language layer and using it to implement the world logic, or implementing an ad hoc dynamic typed system like an ECS or a properties pattern on top of the statically typed base engine.
Finally, there are some really out there systems like Inform 7, which mixes a declarative logic programming style and the always iffy attempt at using a natural language syntax, which sorta makes sense because it's for programming interactive fiction. Still, I7 gets you actual source code that reads like a pen & paper RPG manual at times, and that's pretty close to how I see an ideal world logic description language working. Don't have that many ideas on how you'd get from Rust to there though. I guess you'd need a pretty big compiler plugin.
Looks pretty interesting, I would love publishers to include something similar to all tabletop RPGs.
Having said that, I got a vibe of old Fighting Fantasy 'choose your own adventure' books, relatively recently re-released on Kindle and other ebook readers. It it would be of any interest to anyone, there is a pretty good programming language for creating them: Inform 7.
Just downloaded 6L38, and I'm having the same problem as you. I can't create new projects or open projects (except projects that show up in my recent projects list).
There is a mantis issue for the bug already: http://inform7.com/mantis/view.php?id=1405
There's some discussion of it on the infiction.org thread about the 6L38 release: http://www.intfiction.org/forum/viewtopic.php?f=7&t=16134&sid=d9bf4cef177b618001021df46c6f380d
And someone has thrown together a version that uses the 6L02 UI and the 6L38 bugfixes to the core: http://www.intfiction.org/forum/viewtopic.php?f=7&t=16219&sid=d9bf4cef177b618001021df46c6f380d
Right now I'm going to stick with the 6L38 version I have installed since I can just open the project I'm working on from recent projects.
Yeah, I haven't really kept up on my HTML, but I remember the HTML browser games of the past. A lot of them were puzzle games. Twine would be perfect for that.
I also got my start writing Interactive Fiction for Inform 7. It's an... interesting language and a good one for people who just wantt to write IF.
Definitely Scrivener. A Scrivener project contains a binder with a bunch of documents in it, and you can put links in your text that point to other documents.
So each of your "steps" within the book (or "rooms" or whatever you want to call them) could have a section below, like a bulleted list, which says "Do you want to: A) foo B) bar C) baz" and then each of those would be a link to another Scrivener document within the Project.
When you compile it into a flat book, all of the "steps" will be back-to-back with whatever headings, and in the Kindle version, all of the links will be hot, so the user can click around. For a print book, you need to fiddle with the links so it says "go to page 9" or whatever - I haven't done this in print, so I am not sure exactly how to do that, but I bet there's an easy way.
If you're looking at doing an online game, or something that runs in a Z-machine interpreter (like all of the old Zork/Infocom games) the gold standard for authoring is Inform 7. (http://inform7.com) But it has a huuuuge learning curve, and it's not really for doing ebooks or print.
"cannot decrypt metadata without key."
How do we access the file?
Also, you may be interested to know that there is a huge community of developers of text-adventure games, and many tools available that make their construction and implementation quite streamlined, if not outright easy.
http://inform7.com/ is one such platform.
And for anyone who wants to see a delightful programming system for making such games: http://inform7.com/
Basically, the source code of the game reads like a game itself. "The room contains an openable box. In the box is a lamp. The lamp is lightable. North from the room is the staircase. You can go up the staircase."
There are many extensions available for dialogs. You may want to try Simple Chat: http://inform7.com/extensions/Mark%20Tilford/Simple%20Chat/index.html - it's rather simple compared to most advanced conversation systems for Inform 7.
Grab something like Ren'py and make a game. Yeah visual novel isn't everyones cup of tea but if you're wanting to show off your wrting without needing much other creative skills it's got "novel" in the name of the genre.
Or Interactive Fiction with something like Inform. Bit harder to use (though still very simple as far as game making goes), but definitely all the focus is on "how good can you write". If you can conjour up thoughts of the deep dark forest of the dreadlord with no visual accompaniment, you're sorted.
Whatever you do, whatever field of the games industry you want to be in, you won't get in with nothing to show for it; a working game.
Although it's more of a niche than anything, something to possibly consider is interactive fiction. Inform7 uses natural language for "programming" interactive stories, so it's fairly easy to learn. The emphasis is almost all on the writing. There's a collection of interactive fiction here http://ifdb.tads.org/
One of the things I did when I first learned C++ (a long time ago) was to write not a text adventure, but a text adventure writing system (a bit like http://inform7.com but nowhere near as powerful) - I think that's a much more interesting problem, and one that plays to C++'s strengths.
Check out the site of Inform 7 if you are interested in creating these games as well. The language that the newer games are made in is syntactically similar to plain old English.
You might want to check out Inform 7 if you are interested in making a game more along the lines of the old Adventure or Zork style games, where you type in commands and get responses. It's an excellent game design system!
More intuitive programming language is a unique feature I've seen. In Twine's SugarCube, for example, to set a variable you can write <<set $dog to poodle>>. Inform goes even deeper. Here's some example code to create a room, an NPC and dialogue when the player enters:
>"The Power of the Keys"
>Afterlife is a room. "Fluffy white clouds gather round you here in the afterlife." The Pearly Gates are a door in Afterlife. "The Pearly Gates - large, white, wrought-iron and splendidly monumental - stand above you." Heaven is a room. The Gates are above the Afterlife and below Heaven.
>St Peter is a man in the Afterlife. "St Peter, cheery if absent-minded, studies his celestial clipboard."
>Before going through the Pearly Gates: > say "St Peter coughs disarmingly. 'If you'd read your Bible,' he says, 'you might recall Revelation 21:21 saying that the twelve gates were twelve pearls, each gate being made from a single pearl. I really don't know why people keep imagining it like the entrance to some sort of public park - oh, well. In you go.'"; > end the story.
>Test me with "enter gates".
I would look through the Inform 7 Recipe Book on this topic: Section 7.6: Getting Started with Conversation seems like a good place to start, and I would look through the referenced examples.
This is assuming you're up for learning Inform 7, which if you don't program, may be a decent idea, although Inform traditionally isn't the best at conversation in general.
If you want to build it into something like Unity you might want to look at Ink. I haven't tried it yet. The author of Electra is on here a lot too, you could try that, but I think both of these are branching.
Good tools will allow the dialog to branch with visible choices and still allow you to arrive at new game states that affect the dialog and other aspects of the game state. I don't know if we're there yet or not though. Thinking about how to approach this in my own Inform games, my plan is to have different things the player says cause the characters to take different values for their own properties, which will affect what they say in reply, but I haven't tried it in anger yet...
IDK, but when you start using native language constructs you know you are headed that way.
Inform would be an example, though it’s something of a DSL in the sense that it’s made for writing interactive fiction (IF).
If you're looking to make classic parser-based interactive fiction, Inform (http://inform7.com/) is the industry standard. It may be tougher for you since the syntax is formatted as English grammar, but it is the standard used by most people writing text adventures.
Hi, I'm new to inform 7 myself and haven't done much with conversations yet.
However if you just want a simple response to the player saying something to someone you can do something like this:
Instead of answering the old woman that "hi":
Say "The old woman says hi".
Instead of answering the old woman that something: Say "The old woman gives you a puzzled look".
Instead of asking the old woman about "the answer to life universe and everything": Say "'The answer is 42' the old woman answers".
Instead of asking the old woman about something: Say "'Sorry, I don't know anything about [the topic understood]' the old woman answers".
Inform 7 treats saying something to someone as answering. If you're intrested you can find the block answering rule inside Graham Nelson's Standard Rules.i7x which is the code that gives you the default answer: 'There is no reply'.
One additional thing that might be useful, to see which rules that are considered when you type something you can enable action listing by typing 'ACTIONS'.
Moreover I can recommend Writing with inform and The inform recipe book, which are quite handy to give an idea on how to do stuff with inform.
Hope it helps and good luck.
I wouldn't say it's the "highest-level programming language in existence", but the language you're describing is Inform 7. Have a look at some of the example programs on its Wikipedia page.
If you're brand new, read about values!
They're the best way (I've found) to give a character a "Strength" or "Speed" stat that's easy to call-up when you need it.
Looking at some of their examples, there are control structures like conditionals and loops. It looks to be a complete programming language even if declaring data seems to be a particular focal point.
An action is made up of multiple rulebooks, instead, carry out, check before and after ( not processed in that order)
It does not matter which rulebook you use. That is it doesn't matter if you use check or instead rules. The thing that matters is the order the rules are executed in which you control can control with various ordering commands like last and first.
Generally you use check rules if you were making a action from scratch can you use instead rules if you are modifying a built in action that comes as part of the standard rules but it doesn't actually matter.
If a rules ends in success or failure, then the entire rest of the rulebok is skipped. If it ends in the third "make no decision" status.
Instead rules fail by default whereas check rules "make no decision" by default. Which is probably why you were told to use check rules. But you should be able to use instead rules and just control the order they're processed in or use check rules combined with the use of stop the action
(or the shortcut say "error" instead.
which is more idiomatic.)
This won't make sense unless you read the docs. - http://inform7.com/book/WI_19_1.html <--probably just read the whole chapter - http://inform7.com/book/WI_19_7.html <-- control ordering - http://inform7.com/book/WI_19_11.html <-- success and failure
There's quite a number of concepts in Inform that don't exist in other languages, so it can be a challenge to sift through the documentation. But once you begin understanding how it models the world, you'll be better at making things that work the first time.
You can model this situation a few ways, but let's work from an example.
[First we add places and things to the scene] The player is in a room called Bar. Bronston is a person in the bar. The player is carrying a club and sword.
[Erase the existing attack commands] Understand the commands "attack" and "punch" and "destroy" and "kill" and "murder" and "hit" and "thump" and "break" and "smash" and "torture" and "wreck" as something new.
[Make an action; actions are the basic 'steps' a story can take] Attacking it with is an action applying to one visible thing and one carried thing.
[Make a command so that the player can use the action with text input] Understand "attack [someone] with [something preferably held]" as attacking it with.
[Next we need to use rules to decide what happens.] [Rules are the code that does most of the game's heavy-lifting.] [They "catch" stuff that happens in the game and decide what the game will do in response.]
[This is the normal way to complete actions by 'reporting' them to the text output] Report attacking Bronston with a sword: say "Bronston's shield holds off some blows, but you manage to outpace him with deft swordsmanship"
[And the instead rule ignores the action, replacing it with something else] Instead of attacking Bronston with a club: say "Bronston deflects the club with his shield"
For Zork-like, pure text interactive fiction, the gold standard (although potentially no longer the most popular IF language, I am not sure these days) is Inform.
Its "modern" version (Inform 7) is very, very non-Lisp-like, but it's a fascinating language and programming environment nonetheless. It compiles down to z-code, the same(ish) format as ZIL. It also comes with a huge standard library for doing common IF things outside merely just parsing.
http://inform7.com/book/RB_1_1.html
>"The Power of the Keys"
>Afterlife is a room. "Fluffy white clouds gather round you here in the afterlife." The Pearly Gates are a door in Afterlife. "The Pearly Gates - large, white, wrought-iron and splendidly monumental - stand above you." Heaven is a room. The Gates are above the Afterlife and below Heaven.
>St Peter is a man in the Afterlife. "St Peter, cheery if absent-minded, studies his celestial clipboard."
>Before going through the Pearly Gates: say "St Peter coughs disarmingly. 'If you'd read your Bible,' he says, 'you might recall Revelation 21:21 saying that the twelve gates were twelve pearls, each gate being made from a single pearl. I really don't know why people keep imagining it like the entrance to some sort of public park - oh, well. In you go.'"; end the story.
>Test me with "enter gates".
While Lua seems like a nice idea and is widely used, IMHO it's a terrible language. All larger Lua implementations hack some variant of OOP together which is harder to use than if it just was natively supported. I personally just feel it's kinda hacky and not super well suited for larger projects due to being very limited.
I would really look into something else instead. Python or JavaScript I guess being two very popular contenders. If you target developers or people who want to become ones, they are fine choices.
I would advise not to do your own unless you are really passionate about it. Writing your own scripting language is a lot of fun, and I have done it plenty of times, but actually implementing enough to make it useful, will require a lot of work, and it's very likely not worth it.
If you target non-dev authors or artist-types, I think you might look at Ink or Inform 7 to get an inspiration or just build some DSL yourself, which is less cool but more accessible.