I’m new to this world, played some adventure games when I was a kid, enjoyed them a lot, and would like to learn more about how they were made. Any recommendations as to what software I should start with? (has to be free, and available either on browser OR Linux, cause I’m not sure I wanna spend money just, dipping my toe in the water, ya know…?) What I’m curious about is what kind of computer science I’d need to learn before I try making any int-fiction - any good books you guys’d care to recommend on the subject (which may not necessarily be Comp Sci textbooks)…? Any good web guides or pages on the subject, for that matter? I guess what I’m looking for here, is a book that makes the Comp Sci part of things FUN, and mixes it in with stuff about how to use that theory to MAKE int-fic…is there anything like THIS on the market??
If you go with Inform, Emily Short and Andrew Plotkin have some publicly available source code for games. My first game was made by taking Emily Short’s Glass code and changing it to my own one part at a time.
I think Aaron Reed’s Creating Interactive Fiction with Inform 7 is a bit like what you’re describing (mix of theory, practical, and comp-sci, with easy-to-follow examples), but it’s increasingly expensive to get ahold of. (If you do use it, be aware that not all the code will work with the most recent version of Inform 7; see here for details on what’s changed.)
Inform 7 is a mature and powerful (free) tool for creating so-called “parser” games (the classic type-and-read kind of games I think you’re referring to). It has a deceptive learning curve in that it’s extremely easy to get started - you can create a playable game with nothing more than “The foyer is a room.” - but the further in you get, the more you realize it’s a real programming language with a very rigorous logic and many fiddly bits. But hopefully, by the time you get that far, you’re already hooked
Inform has a very comprehensive manual with extensive examples, although many people have criticized it for being confusingly organized. Still, I kind of can’t help but love it:
If you’re interested in a more traditional programming language, you might like TADS (also free). It’s less popular than Inform 7 these days, but it has very good documentation that a number of people prefer to Inform 7’s. I don’t think the Linux version has an IDE, however.
Aaron Reed’s text is indispensable. If you can’t locate a hard copy, it is available for the Kindle. My copy is full of my own notes. I am on my second pass through. The accompanying textbook web site includes the progressive source code tagged to each chapter in the text.
I took a look - that book is PHENOMENALLY expensive, sorry, don’t think I can do …but I’m curious - will I be able to build a compiler for a computer language (such as C++ or Java, or one of my own invention), after reading it? That was kind of part of the intention…
If you want to make IF, I would highly suggest learning and trying out some of the existing development systems first.
Unless you really just want to write a custom authoring language or development system for your own enjoyment, education, and personal use, you don’t want to re-invent the wheel - especially if you’re not familiar with what is expected in modern IF.
You may not need to go to the trouble of learning how to develop an entire computer language and then actually building an entire computer language if something that exists works for you. I love checking out new development systems, but unless the one you build fills a specific need that is currently unfilled, or does things in a new way, or makes authoring finger-snap easy, getting people to try and use yet another language seriously is an uphill climb.
First, the book is super expensive on Amazon, but not here. Don’t know why. You should check the accompanying website and its invaluable advice that if you want to use the book, you need to install a somewhat older version of Inform 7.
What exactly do you mean when you say you want to build a compiler? You want to compile your own compiler? If so, you want to check out something weird like Linux from Scratch… but frankly, if you need to ask how to build a compiler, then you don’t want to build a compiler. I guarantee it.
The Kindle version is only $2.99. I read it on my iPad kindle app. The iPad is much better than the eink Kindle for tech books. An Amazon Kindle Fire HD 8" is also a good option for tech books and much less expensive than an iPad.
Echoing others, you can’t go wrong studying the docs for Inform7. It is a very well thought out system and it will teach you a lot about interactive fiction generally even it you decide to develop your own system. The online documentation at Inform7.org is quite thorough.
While many will caution against reinventing the wheel, writing your own system is a great way to deepen you comp sci skills and knowledge. However, if you want others to use your system, you need to figure out what your system does better than existing systems. The best tool tends to be the one you already know and so potential users need to believe that there are real benefits in switching.
If you are going to design your own language, then at some point you are going to need to google compiler theory and graph theory and start learning a bit about these subjects. If the thought of recursion makes you shudder, you will probably not get past writing a simple two word parser.
As far as designing a language, I think the thing to do is try to write a simple text adventure in your imaginary language. Then create an engine that can process the source code and play your game. You will find that this is an iterative process, where you revise the source code to make something simpler or more precise and then go back to the engine to try to make it work better.
I’m working on such a project and I’m finding it to be a great deal of fun. I’ve been working on this for the past 8 months, though, and still don’t have anything that will run Cloak of Darkness. I’m not discouraged. I’ve thrown away so many bad ideas that what remains is starting to look very good.
I’m still not exactly sure what you want to do. There’s all of the following:
You want to build a compiler in the technical sense of ‘build’: take existing source code and compile it into a working compiler. If that’s what you want to do, you need to choose an existing compiler for which source code is available. GCC (the Gnu Compiler Collection) might be a nice start, since it’s a collection of free and open source compilers. (Other people here might also point you to Interactive Fiction compilers that can themselves be compiled; but Inform 7 isn’t one of them, since it’s not open source at the moment.) But this is not necessarily a process you learn a lot from. It’s mostly just typing in some commands; if you want a taste of this, I again recommend installing Linux from Scratch, one of the early steps of which is compiling your own GCC.
You want to write your own compiler for an existing language. In that case, you need to choose a language – like Inform 6 or TADS 3, or, if you want to write a compiler for a more general language, something like C. Please note that writing a compiler is a very difficult and requires a high level of programming skills. It is not a good ‘first project’ for someone who wants to learn some computer science in about the same way that building a house is not a good first project for someone who wants to try out what these ‘saw’ and ‘hammer’ things really are.
You want to write your own compiler for a new language. This comes down to creating a new programming language. Again, this is not a good ‘first project’ for someone who wants to learn some computer science.
So as far as I’m confused about your question, it is because 1 is a pretty useless exercise that doesn’t teach you much, while 2 and 3 are so difficult that you shouldn’t even think about it unless you are an experienced programmer.