Answer the question
In order to leave comments, you need to log in
How to implement quests in the database for an online game?
I rivet a text game from time to time and now there was a desire to add quests to it, but the catch is that I don’t know how to implement tasks in the database.
I wanted to make a table with quests
CREATE TABLE IF NOT EXISTS quests(
quest_id integer NOT NULL,
quest_text character varying(300) NOT NULL,
status smallint DEFAULT 0 NOT NULL,
reward ARRAY NULL,
);
Answer the question
In order to leave comments, you need to log in
So you need a lot of plates.
A plate with the types of tasks, a plate with key characters, objects, lines that appear in the task. A plate with the quests themselves, where for the quest its steps from tasks and participants, the logic of the quest (its branches depending on the result of execution) and also the known reward will be listed.
And only then a sign with the status of users about the passage of a particular quest.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question