Answer the question
In order to leave comments, you need to log in
How are these text games written? Game logic?
Hello. Thinking about how to write a detailed game. Needed for educational purposes, not going to promote. The main thing is the working mechanism. It is even possible for the game to throw out replicas to the console, and the options had to be entered through prompt ().
Of the programming languages, I know .js best. I
understand what constructor functions are in .js, what is json. But I do not understand how to make the logic of this game.
What is the essence:
The game is very similar to a book, to some kind of story. But, from time to time, there is an opportunity to make a choice. And this choice can affect the further plot.
For some options, you can get a plus for observation. A sufficient number of points of observation, in the future, can help make some kind of choice without spending diamonds (another game currency). Also, the player has a reputation that improves or worsens depending on the decisions he makes. And, probably, there is a player's rating in the eyes of other characters in the game. For example, if in a game, while talking with a girl, you constantly choose options that will offend her, then later she may end up dancing with you, or taking a walk.
Maybe there is some book / manual on how to create such games? Not necessarily in .js. It could be another language, or even pseudocode. The main thing is that I understand the algorithm of the game, see its "architecture" (so to speak).
PS game from play market. Stories your choice. Maybe it will be easier for someone to navigate by name.
Answer the question
In order to leave comments, you need to log in
This is a visual novel. There are many ready-made engines and libraries. But, in principle, the logic of the game depends solely on you. You can write your game however you like.
For some options, you can get a plus for observation. A sufficient number of points of observation, in the future, can help make some kind of choice without spending diamonds (another game currency).
For example, if in a game, while talking with a girl, you constantly choose options that will offend her, then later she may end up dancing with you, or taking a walk.
Here's a similar question.
https://qna.habr.com/answer?answer_id=975360#comme...
This genre is called "visual novels" or "interactive literature" (if there are almost no pictures).
The most famous visual novel engine is Ren'Py .
In general, I played it for a long time, in fact there should be an event tree, and different scenarios. As an option, events can be stored just the same in the object, but the answer should change your coefficient of influence. Well, functions to handle all this. In fact, for the first project a difficult task. It will be easier to create a branch in which there is no influence factor, but simply a sequential action depending on the answer
Maybe there is some book / manual on how to create such games?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question