I
I
iamalizade2017-03-22 15:45:36
iOS
iamalizade, 2017-03-22 15:45:36

How to create a game quest (text)?

I want to create a quest-style game, but I don't know how to do it. More precisely, I have all the programming experience, but I don’t know how games in the quest genre are created. How to validate the entered answer and how to suggest the script according to the answer? If-Else I think it won't work here.
Does anyone have an idea how this works? How to process the entered data and offer the user a new script?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Daniil Basmanov, 2017-03-22
@BasmanovDaniil

There are many options for implementing text quests, but in the end it all comes down to the graph and the mechanics of traveling through it. Let's take a primitive version, where you have a question with two possible answers, each of which leads to a different result. You can think of this question as a vertex in a graph that has two exits to other vertices. In this scenario, the number of vertices will grow exponentially, but no one bothers you to lead both answers to one vertex and thus control branching. You can build a very large number of stories on such mechanics, but if you want more, you can add other mechanics.
Answers to questions can set special flags that are checked later on the graph. "Kill the villain?" - "Yes", put up a flag, after several vertices of the graph checked the condition and ended up in another storyline. Flags can be combined to get additional endings.
In addition to boolean variables, you can use integer and fractional variables. For example, each decision made can move the protagonist along the good-evil line, and at certain points this value is checked to be in the range.
In short, I would suggest that you start with an abstraction over a switch-case that can be connected to each other, and then read Emily Short's blog , she is an expert in text quests and did a bunch of all sorts of mechanics for accounting for player decisions.
UPD: I also advise you to try Twine , now it is the most popular engine for text games.

K
Konstantin Kitmanov, 2017-03-22
@k12th

Something popular topic lately :) Answered here recently: https://toster.ru/answer?answer_id=991939#comments...
Judging by the question, you want a traditional parser game, in this case Inform/RInform. You can also try TADS, but there are big problems with the Russian language (and not only).

S
Sergey, 2017-03-22
@edinorog

instead.syscall.ru/ru or similar ready-made shells for text quests

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question