Using C#

Hi! I’m brand new to the forum and writing interactive fiction. I’ve recently created a game (and posted a call for testers as recommended), but I have a question.

It seems like most IF uses pre-built tools (like Inform7). However, I wanted to get comfortable with basic C#, so I thought building a text adventure as a console app would be great for practice. The end result is an .exe that does not need to be installed. You click it, it runs, you close it – end of story. :slight_smile: However, I wonder if people would find an .exe off-putting. Would this disqualify me from entering IF competitions?

Any thoughts on the topic are appreciated. :slight_smile:

Executables aren’t a big turn off - three times as many people downloaded Kerkerkruip’s installer than the bare gblorb.

But unless your parser is very good, people will criticise it. If obvious commands don’t work then you’ll get bad scores in any competition you enter.

If you want to learn or practice any programming language then I’d suggest working on an interpreter rather than a game. Most interpreter writers would appreciate more contributors!

OK, your thoughtful response raises another question. :slight_smile:

I don’t actually use a parser. That might have been too clever, haha. Instead, I list the options a player has and prompt them to choose from the list. I have played enough interactive fiction (I’ve finished a few of the Zorks, and hit a few others like Hitchhiker’s Guide) to know that’s not typical, but it fit (at least, in my head it fit) for what I was trying to do with my game. I would definitely understand if people didn’t like that, though. Would you see that style (choosing from a list) as problematic?

Your comment about helping by working on an interpreter is interesting and certainly something I will look into. :slight_smile: Thank you (and thank you for letting me know that .exes are OK). :slight_smile:

Oh, well that’s different then. Choice based IF is very common though.

Another issue is that those who don’t use Windows may complain, but I’m sure you would be expecting that.

I think Dannii is underestimating the negative reaction that executable games usually receive. Checking the IFComp records, the last two executables submitted (unless I missed something) were “Dead Hotel” in 2011, which received 35th out of 38, and “The Hall of the Font of Artois” in 2008, which received 26th of 35. There were 3 executables in 2007, and two of them took the last two places.

This isn’t because people are automatically prejudiced against executables (though there is some of that). The thing is… historically, the standalone executables have been poor quality games. The people working on them have been so involved with the challenges of programming behind the scenes that they don’t write a good game. And being a choice-based IF game won’t save your game from that problem. (Dead Hotel was also choice-based.)

I don’t mean to say it’s a bad plan to learn C# by making an IF game. Actually, I think it’s a great idea! My big summer project last year was learning to code in C, and I did it by building a procedurally generated roguelike from scratch. It’s far more fun to work on a project that personally inspires you than it is to go from the book.

The project was great at teaching me C, both the stuff from the book and stuff I made up off the top of my head out of desperation. (I remember my girlfriend staring at one file and saying slowly, “Well… you’ve invented hash tables. Kind of.”) But despite months of work, my game was an unreleasable prototype. It had taken me just so much effort to make it generate forests and cities and weather procedurally, to get a working inventory system, to build the infrastructure for quests and NPC interactions, that game design went by the wayside. Who has time for the finer points of quest design when the seg faults aren’t ironed out?

…coding in C is exhausting. I did so much work on the inside, but so little of it showed on the outside. And as roguelikes go, it was (and remains) a very bad roguelike… just like the executable IF games that have been submitted into competitions historically.

My recommendation: If you want to build an IF game to learn C#, you should build an IF game to learn C#. Because you should work on things that inspire you. And when you do complete it, you should show us where to download it, because we like IF games and would be interested to see what you’ve built.

But I would strongly recommend against releasing it in a competition unless a) you’re spectacularly confident in the game’s quality or b) it really won’t bother you if your game tanks. Because history suggests that the odds are weighted heavily against you, and competition reviewers are not kind. And the joy of completing a project like this should exist on its own, without risking the backlash of a negative competition reaction.

It’s off-putting if it doesn’t run. Like, when you don’t own a Windows operating system :slight_smile:

First of all, welcome to our IF community. We’re very glad to have you investigating the medium, in any form.

However, there are a number of risks and more subjective issues you’ve taken on with this endeavor.

Although some environments (like the IF comp) will perform due-diligence on an executable to verify it’s not carrying any malware, you will lose many people on the archive and IFDB. Most have us have been trained to ignore downloading executables from the Internet (wisely I might add).

This is the age of the Internet. The age of the BBS is about 20 years past. If you want to share a piece of IF, you are probably best served using Internet friendly tools (like Twine, HTML, Parchment, or safe game files that run on a well-known virtual machine like Tads 3 and Inform 7).

The more subjective part of this is that we’re very much like artists and we feel if you want to build to the medium, using the tools for the medium is the best way to go about that. We respect your effort and your interest, but we are probably a little dismissive and uninterested in your use of a C# console application. Not out of spite or meanness, but more because we think you’re using a hammer and a bowl of red paint instead of a palette of primary colors and an easel with canvas.

Have you tried porting your story to Twine? It sounds like it might be a good fit.

David C.

Wow! I can’t believe my post has garnered so many comments. I don’t know what to say other than to thank everyone for taking the time to share their very helpful thoughts. This is more helpful than I could have expected. :slight_smile: Let me post some responses to these great comments:

cvaneseltine suggested I share the link to my game here. I would be happy to do so. I have a folder at – and all you need to do is take the latest version. Currently, that is _104(x64). I also build x86 versions since a friend told me that x64 did not work for him. But for most people (who are on Windows) x64 should be fine. :slight_smile:

To Dannii: Thank you for letting me know that CYOA are quite common. I think this point speaks to my inexperience with modern IF, and lets me know I need to get to exploring some of the latest and the greatest. It will be a fun – er, I mean, demanding – “research project”. :slight_smile:

To DavidC: Looking back, I can now say you’re definitely right. And, even now, when I go to make changes to something in my game, I feel like I’m still using a hammer and a bowl of red paint. :slight_smile: Sometimes I dip the hammer in the paint and shake it off over the monitor, sometimes I just hit the bowl itself and see what happens. Ugh. :slight_smile:

To cvaneseltine: That was exactly my worry. I don’t trust an executable unless I know who it’s coming from, and I assumed it would be very much the same here. However, I am pretty sure I saw one of the other IF tools output as .exe, and I know I’ve used one in the past that did as well (that tool was called Novelty) – this I was not completely certain. I can also completely agree that I’ve spent a great deal of time just making things work when, if I had tools in place, all that time could have been dedicated to a better, cleaner story.

One of the unique elements with my story is that it’s replayable. You’re sort of trying to figure out who “the killer” is, and that person changes every time. Even which minor stories happen, and when, is random. But, again, I spent a lot of time making that work instead of using that time to make the stories more interesting. Sadly, I know these lessons already – and yet I forget them. So now I get to re-learn them. Thank you. :slight_smile:

RealNC, I hadn’t even thought about that before hitting these forums. I’m so used to everyone around me having a Windows machine. Apple and Linux users, in my world, exist but are rare. That said, I have a MacBook and have spent a fair bit of time in Ubuntu so it was silly of me to ignore those people. Another lesson learned, and appreciated. :slight_smile:

Thank you, once more, to everyone for helping out and chiming in with very valuable and useful information. And thank you as well for the encouragement.

::points at cvaneseltine:: That.

And now I’m wondering in how few lines of C# I could do the same.