M
M
maqstein2019-02-08 18:39:04
PostgreSQL
maqstein, 2019-02-08 18:39:04

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,
 );

and somehow in the table for users to mark the id-shnik and status (execution progress),
but the idea did not go further. I decided, maybe someone will offer the norms of the solution
PS I was looking for ready-made solutions, I found only a pirate for the World War II, and there was too much of everything stuck, I could not find anything sensible

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2019-02-08
@maqstein

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 question

Ask a Question

731 491 924 answers to any question