I have just begun learning inform 7 and have been thoroughly enjoying the learning process of thinking of a scenario and then trying to implement this basic idea in inform 7. So far in just a handful of evenings i have tought myself the very basics of the program and am gradually learning some of the more complex concepts.
I figured now was a good time to start looking at available source code online of existing works as a way to learn good formatting along with general good practices.
The first search came up with Bronze by Emily Short and I was immediately struck by how well laid out and organised the code was. I also realised that many of the rules of the world that she outlines in the first few chapters seem like things that would apply to many āstandardā game worlds.
Things like smells, staircases and floors etc. all seem like very flexible and common things to include in a game.
Getting to my point, do many of the IF authors here have their own libraries of rules etc. they have accumulated over the years that they like to draw from when beginning a new game to help speed up the process of establishing the world, or do you generally prefer to just start with a clean slate and write up all these things from scratch each time you start a new game.
Just wanting to get a bit of insight into the processes that people like to use and if there are any handy resources that might help a new I7 user (besides the manual). Perhaps other games with available source code that is well structured and can be used as a good learning example.
Thanks everyone and I look forward to learning more in the coming days and years with this wonderful community and program.
I probably reach for some of the same extensions repeatedly. Less so a library of my own code; my own code always ends up being too specific to each game.
Extensions are quite a big deal in that there are tons, and itās simply not possible to keep them all in mind when youāre starting out. But itās worth browsing them at random occasionally (if youāre on the Mac, just click the Extensions tab on the bottom-right corner of the IDE, and have a browse. If some other platform, uh, someone else will probably chime in for me) because they show ways to do things, or use Inform, you probably havenāt thought of. And the ones that do things in a way you really like may end up becoming your staples.
This is potentially a lot to think of when starting out, so if you look at them and feel overwhelmed or like āI donāt even know what this extension is trying to do,ā donāt worry about it. If you end up staying the course, theyāll start to make sense and help later. And the one thing Iāve learned about extensions is, itās better to have them in mind earlier than later. Otherwise you can end up reinventing too many wheels.
Thanks for the response, I normally shy away from forums in favour of discord due to how long it sometimes takes to get a response but looking at this forum Iāve been really impressed by how much valuable information there is and how overwhelmingly helpful the community is to newcomers.
I think i will begin to experiment with extension soon. My initial thought was to try and learn each thing from scratch to help familiarise myself, however I feel that itās quite easy to get stuck on one thing and lose track of your direction.
I use both mac and windows and occaisionally linux. There is a strange bug that affects my mac version of I7 which doesnāt allow me to see the curser, meaning i have to guess where my next input will land on the screen. Not as bad as it sounds, its almost like its in white and not black which I donāt have happen on windows.
Yes, this forum tends to have very quick turnaround on technical questions.
One unfortunate thing is that the built-in search panel is really hopeless. But!.. this is easily overcome by doing a google site search. You know, āsite:intfiction.org how do i create a moveable locked doorā. As a lot of questions do get asked repeatedly over time. Nothing wrong with that, but itās good to be able to get at old answers quickly, too.
Notwithstanding the strong competition from more generalist sites, the IF archive still has a sizeable collection of IF sources, library contribuitions & alternate libraries, and remain the main, centralised repository for the IF community, mantained by IF community members.
Tangentially, I think that, aside the few philosophical differences with some standard and/or alternate libraries (ex. implementing a READ separated from EXAMINE in inform 5/6/7), I donāt feel much need of having a āpersonal skeleton/shellā, so I still start from the generic shells/skeleton provided by practically all the IF languages.
I donāt know if youāve already seen it, but āThe Inform Recipe Bookā is built into the I7 app. Itās very useful in that it tackles coding from the point of view of āHow do I do Xā ā e.g. How do I code an NPC who is referred to as āthe conductorā at the start of the game, but after being introduced at the after concert party becomes āStanislav Popovitchā?
The code can be copied over to the sourcecode panel with one click, so itās easy to whip up a tiny practice game so you can experiment with ideas. Because itās part of the app, itās more likely that the code is up to date, too. One of the problems with extensions is that some of them donāt compile anymore.
In addition to extensions as mentioned above, Iāve found myself re-using some rules in several projects, but I havenāt yet bothered to pull out everything thatās common to them, because when I start a new project, Iām usually more focused on laying out some rooms, rules and NPCs specific to that scenario; whereas the common aspects are sometimes more for player convenience or for polish at a later stage. For example, making sure thereās a good default response for actions like SMELL for those objects which donāt have a specific response ā thatās good to have in every project, but itās not necessary to get started on a new game.
The role of a standard common base to jump-start the creation process is more or less filled by the automatically-included āStandard Rulesā, which provide the material to let you hit the ground running (in this sense, I7 is more ābatteries includedā than some general-purpose game engines).
As for the general learning process, the manual āWriting with Informā is a great place to start. Donāt forget to also look at the included Recipe Book, which organizes the examples by topic.
Iām not sure if itās common practice but modular reusable code is a design Iām very fond of. Iām also very fond simulation oriented design and I think they go well together. Typically having generalized code that you can reuse can be really helpful when youāre working on future projects (once youāve done a general dialog system once itās already ready for your next game) but it can mean added complexity in the short term since you have to generalize/abstract the specific thing youāre trying to do. Having something general can also help others as others have mentioned with extentions, these are often generalized approaches to different systems or tools one could use in a lot of different projects. This gdc talk on Modular AI while about modular AI specifically also covers a lot of the core ideas of modular reusable design and covers a lot of the benefits of it as well as the things to avoid.
Wow thanks for these wonderful resources. Iāll be sure to start looking at them tonight, these are the exact sort of things Iāve been looking for to establish good habits.
I started playing around with extensions last night which was a lot of fun. There are definitely quite a few that seem like that would be very useful and help to enrich a game world.
Iāve begun creating a tutorial game for myself which is more of a sandbox approach which I can then refer back to my own source code in the future if I need to. Each night I ask myself what a couple of interesting and challenging things I could try and implement in the game world and then debug it to see how well it works. Overall this seems like a good way to learn but lacks any real direction or structure so these resources will be really valuable in building on those concepts Iāve been experimenting with.
That looks really interesting, I really enjoy those sorts of GDC talks. I think I will co to ue to accumulate some of my own ālibrariesā of modular code as a way of cataloging what I have learned. At some point this will become redundant but for the next few weeks or months I think it will help to commit things to memory.
I am quite new to coding in general and Inform in specific, and I try not to reuse chunks of code, because I need to know that I can remember how to do it. Also, each time I recode something, I find ways to make it more streamlined and sensible, and I get a better understanding of why itās working. So itās tempting to just plug and play things I already have, but I donāt. Something to think about if you donāt have much coding background!
One thing Iāve found helpful in learning to code is to avoid using cut & paste, and typing out the code myself, even when Iām directly copying an example.
I find having snippets of code around handy - even, in some cases, code thatās in languges I donāt technically know and am not using for my IF. It gives good structural clues for how to do the thing that needs to be done, and thereās usually enough thinking that has to be done in conversion to remind me to take the context Iām putting it into consideration.
I have an enormous library of code and world model tweaks that Iāve built up over the past year. And itās pretty conspicuous that a difference between me and the people who have been saying no is that theyāve written games and Iāve still only written Inform extensions. So if your aim is writing a game, maybe my example should serve as a cautionary taleā¦
Your question is about āIF authorsā and then all your references are to Inform 7.
Everyone in the thread has responded eloquently to the I7 portion of your question, so Iāll just add that no, itās extremely uncommon to a) have publicly accessible libraries and b) reuse code except in very limited circumstances for other IF authoring platforms.
Sorry I may have mispoke by bundling i7 and IF authors in the same boat. I was primarily referencing IF Authors using i7 although I didnāt explicity say that.
I think that between extensions, recipe book and people simply referring back to their previous works this kind of answered my question, at the time of writing I hadnāt explored extensions in any meaningful way. It would also seem that there are some very fine examples of publicily available code from games which are useful to reference for a new author.
as for part b) of your response, I donāt fully understand. Are you referring to other software such as Twine/tads/inkle etc. ?
Not much to add to the observations others have already made, but one thing thatās come up for me is that each of the games Iāve written and the ones Iām currently working on have been pretty different, so the upsides to code reuse have been pretty minimal (I use Inform 7). With different conversation approaches, major interaction mechanics, gameplay structures, and even just varying tone and style, Iāve usually found it easier to just modify the standard rules to do what I want than to go back to what I did last time and modify it again.
If your projects tend to be more self-similar, maybe code reuse is more efficient - and there are a couple places where Iāve definitely found some reuse to be useful (I have a list of rules that modify the most common standard responses that I cut and paste into each project, since hunting them all down is kind of annoying) but so far Iāve done it less than maybe I thought I would when I first started out.
Hello @BubbaBobba ! Welcome to the Intfiction forums!
What Iāve found to be more helpful than accumulating code or creating start templates, is heavily notating the code used in your projects. You may want to do something in a later project similar to something you did before. Naturally, you will think of times you did something similar, and will go back to take a look at how you accomplished that. This beats searching the manual or forums to rediscovery something you already solved. No sense in recreating the wheel each time.
However, being able to, months or years later, even find that relevant piece of code amongst the whole source, let alone interpret it once you do find it, is often easier said than done.
This is why I often signpost where certain code segments start and end, what they do, what variables are involved, how they work (if I understand that), and sometimes even SEO tags to help me find it later if I think itās valuable enough. I want to be able to bring up the source on any of my projects, search with āfind on pageā and immediately find what Iām looking for. This is the same reason I donāt delete old projects, even if I decide the premise isnāt worth pursuing any longer; Iāll scavenge from my own code for years as long as I took the time to make it accessible and intelligible.
If you take the time to do this, then everything you ever wrote becomes a searchable reference for future work. This is what Iāve found to be most helpful.