Skip to content

Save game #1

@Fieldelm

Description

@Fieldelm

Allow the user to save the current state of the game in a database. Extend the given schema if needed.

  • The application uses a PostgreSQL database with the schema in schema_ddl.sql.

  • The application respects the PSQL_USER_NAME, PSQL_PASSWORD, and PSQL_DB_NAME environment variables.

  • An Entity Relationship diagram (connections between classes, 1-1, 1-many, and so on) is created in a digitalized format.

  • When the user presses Ctrl+S, a modal window pops up with a text input field (labelled Name) and two buttons, Save and Cancel.

  • When the user clicks Save, the game saves the current state (current map, player position, and inventory content) in the database.

  • If the given name is new, the state is saved.

  • If the given username already exist in the db, the system shows a dialogbox with the Would you like to overwrite the already existing state? question.

  • When choosing Yes, the already existing state is updated and all modal windows close.

  • When choosing No, the dialog closes and the name input field content on the saving dialog is selected again.

  • When choosing Cancel, the saving process terminates without any further action.

  • The modal window is automatically closed after the operation.

  • Already discovered maps are also saved in the DB.

  • There is a Load menu, which brings up a modal window, showing the previously saved states with their names as a selectable list.

  • Choosing an element loads the selected game state with the proper map, position, and inventory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions