I have designed an idea for a text-based game, what is the best program to use for creating this game?

Started by
8 comments, last by MarkS_ 7 years ago

Sorry if this is not the most suitable place to post this, I read the FAQs, but this is my first post here so I won't get mad if this gets removed.

I have written many, many ideas for a text-based game that's suppose to contain(in total) a LOT of text(dozens of thousands of words in total) and rather little mechanics.

And after already trying to start programming it in both of #C and as a web (with HTML), I think I need help in getting general ideas on how to program it, because I'd prefer to avoid hundreds of hours in every single programing languange I know just because I currectly have no idea while program is best to use to develop the game.

I will note that I'm by far the most knowledgeable and skilled at #C(I learned and programing some simple stuff with it for a couple of months), and also have very little knowledge in JavaScript, HTML and CSS. It's worth adding I also know how to program an ASP.NET server in #C and use Javascript to "call" it.

Here is a list of serveral core elements in my game, and how I already thought to try to program some of them:

- The main "game mode" is a maze, which is like a trivia game(althought it's not) - you need to choose between serveral answers, one of them advances you into the maze, the rest lead to a dead end ("game over"), or trap the player into a poistion where they are 2 or more dead ends.

- Of course, every maze has serveral "checkpoints"(each checkpoint is a different "position" in the maze, including dead ends and exists). And I have written mazes which have each checkpoint in a text file. So every maze is currectly presented with many text files, and obviously, I need them all in one program. I thought of writing every maze in a XML file which will refer to all textfiles, but I doubt it can work..

- The player has different categories of points, and each category has 2 "sub categories" of points: "negative" points and "positive". and an overall ranking based on all the points the player has, that has a simple math formula, and updates with every update in any of the player's points in any catergory. I think all of this can done with very very easily with #C, by creating an object for the player, containing properites which will have the values of the points and his ranking.

- The points are updated while the player is in the maze - when he reaches a dead end, he "gains" negative point/s for one or more catergories, and when he gets out of the maze, he gains poisitive point/s for one or more categories.

- The mazes are attached to different diffculty levels(1-5) and only the easiest ones can be accessed by the player at the start.

- Winning a game will always unlock another game + abillity to view textfiles that give the player clues and explainitonts (and are necessary for another game mode, which I will explain now):

- The game mode I called "hardcore game mode", is when the player goes throught a maze he already won at with the "normal game" mode, but this time, he needs to solve much more diffcult problems in it to progress, and the soultions have clues in the textfiles from the previous section. Each of them is unlocked by winning a game in the normal game mode.

- There are also bonus levels that sometimes will "jump", when a player exists from a maze. Each of the bonus levels are also like mazes and written in mulitplie text files. Bonus levels also add to one of the points categories when the player wins at them. The player only has 1 chance of completing each bonus level - if he fails, he will immediately be explained how he could've been - and not be able to gain the points he didn't get from the bonus levels where he lost. Bonus levels can't add negative points.

- There will be a main meun, where the player might access:

a. normal game mode

b. hardcore game mode

c. Clues and explainitons for the games (entering this only leads to readable text files, that I categorized in different folders)

d. Game instructions (same as the previous section)

- I also thought it may be worth that the player will need to create a personal account in order to play, and all the data (anything unlocked, points and ranking) will be stored in that profile. This might make it worth to make this game as a browser game, but I have almost no knowledge and experience with Javascript, HTML and CSS. But if it seems to be the most suitable and efficient way to make the game, I'll do my best to gain all the knowledge and experience necessary.

I'm quite unsure what to use for this. There are free programs to create simple text-based games, like inform7, but they may not contain enough tools to do all this. #C is what I'm best with, but it's proably not the most suitable program to create a text based game with all those element.

What do you think is the best way for me to create the game? I already have enough textfiles for anything (althought I'll continue adding more anyway), and I'm not sure how to program it.

Advertisement

You could check out a language specifically for writing text adventure games:

TADS is a popular one, but there are many others you could choose form.

My Gamedev Journal: 2D Game Making, the Easy Way

---(Old Blog, still has good info): 2dGameMaking
-----
"No one ever posts on that message board; it's too crowded." - Yoga Berra (sorta)

Visual Studio and C++ is all you need. You'll find function pointers especially useful for firing events in response to parsed commands.

This can be done in pretty much literally any programming language that you can think of. BeerNutts' suggestions might be easier to get you where you want, but I haven't used them so I can't comment on that. I really don't think switching to C++ and using 'function pointers' is good advice given you know some C#. Side note: delegates are similar to function pointers, fwiw.

C++: A Dialog | C++0x Features: Part1 (lambdas, auto, static_assert) , Part 2 (rvalue references) , Part 3 (decltype) | Write Games | Fix Your Timestep!

This can be done in pretty much literally any programming language that you can think of. BeerNutts' suggestions might be easier to get you where you want, but I haven't used them so I can't comment on that. I really don't think switching to C++ and using 'function pointers' is good advice given you know some C#. Side note: delegates are similar to function pointers, fwiw.

Well yeah C++ was arbitary (though the most efficient option, not that a text adventure in 2017 cares about that though), the point is any IDE with a console is essentially a text-game "engine". Looking at your background, using C# + delegates/events is probably the most efficient route, as nobodynews stated.

C# is fine for what you want. It doesn't sound like the language or the tools are the problem, more that you're not confident about how to organise or structure a large and complex project. Unfortunately that's hard to explain in a forum post, but if you have specific questions about things that you've found difficult, I'm sure someone will be able to offer advice.

I agree with C# being a good choice. Just use the console for input and output, easy read and write of text lines. The advantage of that choice is that you don't get a new programming language on your plate at the same time, so you can concentrate on programming the game.

As for organizing the game, start small, consider them to be experiments. Take a little corner, and code it. If that works, you can find another corner, or extend the corner you have.

Your post is so full with ideas, you'd have to understand completely what you're doing, and design everything up-front to get it all in one attempt. However, you don't really know how to do this, and you're not even sure your ideas will work in practice (inventing an idea is easy, but what seems fun in your head or on paper, may in practice be very boring / non-fun). In your situation the better strategy is to do small tests, get your toes wet, have a little taste of how it will look and work. If you like it, add more. If it seems wrong, either fix it or start a new experiment.

My personal opinion is to use TADS or another text adventure creator. This is not a simple problem, depending on the complexity of the grammar you want to allow for in your language parser. This can be far more complex than parsing the individual words and acting on them. If you are looking for simple, one word commands, then definitely write your own. If you want something more complex, like "Place the key under the rug," then expect to spend quite a bit of time writing a grammatical parser.

Bear in mind that (a) the original poster has already considered inform7, although maybe not tried it, and (b) I'm not seeing any explicit mention of the need for a parser or any of the usual interactive fiction aspects.

Perhaps the original poster could give some more details of what the gameplay would be like and how the user would interact with the game?

A parser of some sort will be necessary for text input. It could be very simple or very complicated, depending on his needs. He wasn't all that clear on how he is planning user input, but I've seen text adventure games with 1-2 word command strings ("turn left") to the more complicated and grammatically correct command sentence I posted above. My intent was to get him to think about the level of complexity he requires and to consider his options. Parsers can be very non-trivial.

This topic is closed to new replies.

Advertisement