Answer the question
In order to leave comments, you need to log in
How to implement an algorithm for a mobile game?
It is necessary to develop a game similar to this https://play.google.com/store/apps/details?id=com....
In this game, the user answers questions about why the plot changes. There are a lot of options for the development of an event, do you really have to implement all this with if else conditional statements. Are there any algorithms or examples of solving such a problem?
Answer the question
In order to leave comments, you need to log in
There is no link. But the description is similar to IF , there are a lot of engines (a short list at the link).
PS In a general sense, this is a finite state machine called: a graph with transition conditions between vertices.
One if and one else, and a loop.
All questions are in the database. The column has the text of the question, and two indexes to other questions that will jump to if yes or no.
It is possible in an array.
You can complicate it, make a variant with three answers and exit the cycle of victory / defeat.
nothing complicated.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question