danielfilipealmeida / adventure_studio

Integrated Development Environment (IDE) designed for creating text-based adventure games.
0 stars 0 forks source link

Implement Data Export Functionality with JSON and Encryption #5

Closed danielfilipealmeida closed 1 day ago

danielfilipealmeida commented 3 weeks ago

Description:

We need to create a feature that exports all the project data (rooms, objects, connections, etc.) into a JSON file, which can then be used by the game engine. The export should also include an option to encrypt the data for security purposes.

Task Breakdown:

  1. Export Data to JSON:

    • Implement the logic to serialize all relevant project data (Rooms, Objects, Connections, etc.) into a structured JSON format.
    • Ensure the format is compatible with the game engine's expected input.
  2. Encryption:

    • Add the option to encrypt the JSON data before saving.
    • Use a strong and widely supported encryption algorithm (e.g., AES) for securing the file.
    • Provide a method to input a password or encryption key for encrypting the file.
    • Ensure there is a way to decrypt the file as needed by the game engine.
  3. Save to File:

    • Implement functionality that allows the user to save the exported JSON (with or without encryption) to a file on their device.
    • Ensure the file is saved with a proper file extension (e.g., .json or .encrypted.json for encrypted versions).
  4. UI/UX Considerations:

    • Provide an intuitive UI to trigger the export process (e.g., an "Export" button in the settings or tools menu).
    • Allow users to select encryption options and input passwords when needed.
    • Display confirmation messages or error handling if the export fails.
  5. Testing and Validation:

    • Verify that all data is accurately serialized and saved in the correct JSON format.
    • Test encryption and decryption functionality to ensure it works as expected.
    • Ensure compatibility between the exported data and the game engine, including handling both encrypted and non-encrypted files.

Acceptance Criteria:

Additional Notes: This feature will allow users to export their adventures and secure them before sharing or loading them into the game engine.

danielfilipealmeida commented 1 day ago

This is half done. It is already exporting in json, to a folder. An approach is to leave as is and have a separate step that bundles the information. Actually, this will happen later on when builinding an OSX application, so we will drop the encryption for now.