Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@M1thieu
Copy link
Collaborator

@M1thieu M1thieu commented Jun 17, 2025

Summary

This PR introduces a comprehensive save system for LP with the following key features:

  • Dynamic event logging - Automatic capture and storage of game events with cleanup
  • Incremental saving - Snapshot and rollback functionality for quick saves
  • Platform-aware storage - Proper save locations for Windows, macOS, and Linux
  • Rich metadata - Timestamps, game version, platform info automatically included
  • Easy integration - World extension methods for simple save/load calls

Technical Implementation

  • Added GameTracker resource for centralized state management
  • Implemented automatic periodic saves with configurable intervals
  • Platform-specific save directories following OS standards
  • Reflection-based component serialization for Saveable entities
  • Version migration system for backward compatibility
  • Snapshot system for experimental gameplay features

Usage Example

// Simple API for game integration
world.save_game("quicksave.json")?;
world.load_game("checkpoint.json")?;

// Automatic saves every 60 seconds
if tracker.should_auto_save(delta_time) {
    tracker.auto_save(&mut world, game_time)?;
}

Additional Improvements

  • Updated AI components with proper Reflect traits for save compatibility
  • Improved electromagnetic field calculations for accuracy
  • Enhanced plugin architecture following Bevy best practices

Closes

Fixes #1, #2, #3

Add dynamic event logging system with automatic storage and cleanup
- Implement incremental saving with snapshot/rollback functionality
- Add platform-aware save paths (Windows/macOS/Linux XDG standard)
- Include rich save metadata (timestamps, versions, platform info)
- Add bevy_save-inspired World extension methods for easy integration
- Improve electromagnetic field calculations with proper cross product
- Update AI components with proper Reflect traits for serialization
This was linked to issues Jun 17, 2025
@M1thieu M1thieu merged commit d508f05 into erematorg:main Jun 17, 2025
3 checks passed
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.

Incremental Saving Dynamic Event Logging Dynamic Save & Load

1 participant