-
Notifications
You must be signed in to change notification settings - Fork 0
Save & Load System
The Save & Load System is responsible for preserving the player's progress between game sessions. Although the current implementation serves primarily as a framework, it has been designed with future expansion in mind and provides the foundation for persistent game data.
The system is intended to serialize the player's information, inventory, equipment, statistics, and game progress into a save file that can later be restored, allowing players to continue their adventure without losing progress.
While the complete save functionality is still under development, the existing architecture has been structured to integrate seamlessly with the rest of the project's modular design.
- Overview
- Current Status
- System Architecture
- Planned Save Data
- Save Workflow
- Load Workflow
- Future Save File Structure
- Relationships with Other Systems
- Design Decisions
- Future Improvements
- Summary
The Save & Load System is designed to provide persistent game progression.
Once fully implemented, players will be able to:
- Save their current game
- Continue previous adventures
- Preserve inventory
- Preserve equipped items
- Preserve character statistics
- Resume gameplay from the last save
The system is intentionally separated from the gameplay logic, allowing save functionality to evolve independently of other systems.
At the current stage of development, the Save & Load System provides the structural foundation for future implementation.
- Save menu option
- Load menu option
- Save/Load framework
- Integration with the main menu
- Character serialization
- Inventory serialization
- Equipment serialization
- Active effects
- Gold
- Level progression
- World state
- Quest progress
- Player location
Although complete persistence has not yet been implemented, the project architecture has been prepared for these features.
The Save & Load System communicates with several gameplay systems.
flowchart LR
Character --> SaveSystem
Inventory --> SaveSystem
Weapon --> SaveSystem
Armory --> SaveSystem
Potion --> SaveSystem
SaveSystem --> SaveFile
SaveFile --> LoadSystem
LoadSystem --> Character
The Save System gathers data from different gameplay components and writes it to persistent storage.
The Load System performs the opposite operation by reconstructing game objects from saved data.
Future save files are expected to contain the following information.
- Name
- Age
- Race
- Profession
- Description
- Health
- Level
- Strength
- Defense
- Agility
- Intelligence
- Gold
Current weapon
Current armor
Equipment status
Durability
Enchantments
Every stored item including:
- Weapons
- Armor
- Potions
Each item will preserve its own properties.
Temporary character effects such as:
- Strength buffs
- Defense buffs
- Agility boosts
- Intelligence boosts
Future versions may also preserve remaining durations.
Future versions may also save:
- Current location
- Completed quests
- Story progression
- NPC interactions
- World events
The following diagram illustrates the planned save process.
flowchart TD
Player --> SaveGame
SaveGame --> CollectCharacterData
CollectCharacterData --> CollectInventory
CollectInventory --> CollectEquipment
CollectEquipment --> WriteSaveFile
WriteSaveFile --> SaveCompleted
Every gameplay system contributes the data it owns.
The Save System then combines this information into a single save file.
Loading follows the reverse process.
flowchart TD
Player --> LoadGame
LoadGame --> ReadSaveFile
ReadSaveFile --> RestoreCharacter
RestoreCharacter --> RestoreInventory
RestoreInventory --> RestoreEquipment
RestoreEquipment --> ResumeGame
Once reconstruction is complete, gameplay continues exactly where the player left off.
Although the exact format has not yet been finalized, a future save file may resemble the following structure.
Save File
Character
Name
Age
Race
Profession
Statistics
Health
Level
Strength
Defense
Agility
Intelligence
Gold
Equipment
Weapon
Armor
Inventory
Weapon
Armor
Potion
Active Effects
Game Progress
The actual implementation may use text files, binary serialization, or another suitable storage format depending on future development goals.
A complete implementation will include validation for common save and load issues.
Examples include:
- Missing save files
- Corrupted save data
- Unsupported save versions
- Invalid item references
- Incomplete game data
Graceful error handling will improve reliability and provide clear feedback to players.
The Save & Load System interacts with nearly every gameplay system.
flowchart LR
Character --> SaveLoad
Inventory --> SaveLoad
Weapon --> SaveLoad
Armory --> SaveLoad
Potion --> SaveLoad
Chest --> SaveLoad
The system itself does not manage gameplay logic.
Instead, it stores and restores the state of existing objects.
Several architectural decisions influenced the Save & Load System.
Saving and loading are handled by a dedicated system rather than being embedded inside the Character or Inventory classes.
This improves maintainability and keeps gameplay systems focused on their primary responsibilities.
Instead of saving only statistics, the system is intended to restore the complete game state.
This includes:
- Character information
- Inventory contents
- Equipment
- Active effects
- Progress
The architecture has been designed so additional gameplay systems can later participate in serialization without requiring major structural changes.
Examples include:
- Quest System
- Crafting
- Trading
- Skills
- NPC relationships
The Save & Load System has been designed with long-term scalability in mind.
Planned improvements include:
- Multiple save slots
- Autosave
- Quick save
- Quick load
- Save timestamps
- Save previews
- Version compatibility
- Cloud synchronization
- Compressed save files
- Save encryption
- Backup saves
- Achievement persistence
- Cross-platform save compatibility
These features can be introduced incrementally as the project grows.
Adventure-Game is an educational project focused on learning object-oriented programming and software architecture.
Development has prioritized building the core gameplay systems—such as the Character, Inventory, Equipment, Weapon, Armor, Potion, and Chest systems—before implementing persistent storage.
By establishing a strong architecture first, the Save & Load System can later be integrated without requiring significant changes to the existing codebase.
The Save & Load System provides the architectural foundation for persistent game progression in Adventure-Game. While full serialization is still under development, the project already includes the structure needed to support saving and restoring player data in future releases.
Its modular design allows save functionality to integrate cleanly with every major gameplay system while remaining flexible enough to support future features such as autosaves, multiple save slots, cloud synchronization, and complete world-state persistence.