Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IN PROGRESS] Implement SQLite as a replacement for XML-based storage in saving game data #133

Draft
wants to merge 11 commits into
base: sf-auto-merge
Choose a base branch
from

Conversation

Dimakl
Copy link

@Dimakl Dimakl commented Apr 29, 2023

This pull request introduces SQLite as a solution for storing and managing game data, replacing the current XML-based file structure. The outdated method of storing files locally and serializing game parameters into an XML file no longer meets the requirements for a robust and secure storage mechanism. In addition, document-oriented storage is not the optimal solution for a project with multiple users since similar fields are present across XML files belonging to different players.

By replacing XML storage with SQLite, the following benefits can be achieved:

  1. Enhanced data security: Using SQLite ensures that the game data cannot be easily tampered with or deleted by users.
  2. Persistent storage between gameplay sessions: Players can save their progress and continue their games at any time.
  3. Efficient data access and retrieval during gameplay: SQLite provides fast and efficient database operations, leading to improved performance.
  4. Easy modification of game parameters and adding new game features: The new database structure allows developers to provide updates and add game features effortlessly.
  5. Multiplayer game support: A unified database contributes to efficient data management in multiplayer game modes.

The proposed changes include implementation and tests for the FreeColSQLWriter and FreeColSQLReader classes, which handle writing and reading game data to and from the SQLite database, respectively. The new classes cover various game components such as game state, player data, and tile data. This pull request serves as the foundation for further enhancement in game data management and the introduction of more features that rely on database functionality.

@Dimakl Dimakl marked this pull request as draft April 29, 2023 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants