Ji-Rath / MassAIExample

A project primarily used to test UE5 Mass AI system
MIT License
165 stars 35 forks source link

Have you considered creating a savegame demo? #10

Open saberuster opened 2 months ago

saberuster commented 2 months ago

Hello, this project is fantastic! I have learned a great deal from it. Have you considered creating a demo that integrates the MassEntity system with SaveGame?

Ji-Rath commented 2 months ago

Hi Saberuster, I'm glad to hear that! Though persisting Entity data (through the SaveGame system) is theoretically possible, I suspect it may not scale well with many entities. On that same note, it may be worth considering if you dont plan on having thousands of entities. A more scalable approach may be making the entities deterministic and predictable so that less data has to be stored.

After I finish up my most recent projects, I'll try and prototype a simple save/load for entities. Thanks for the suggestion!

connortwall commented 1 month ago

I agree! I've learned so much about programming using MassAI from this project 🤯. It'd be cool to see to save the constructed buildings height and location data after they've been created. Or to save the number of entities / smart objects in gameplay after any were removed (or added).

Ji-Rath commented 4 weeks ago

I agree! I've learned so much about programming using MassAI from this project 🤯. It'd be cool to see to save the constructed buildings height and location data after they've been created. Or to save the number of entities / smart objects in gameplay after any were removed (or added).

Appreciate it! I recently developed a simple sample using the built-in save system. It saves the entities and their positions. The code is a bit shaky, but it is one method for saving data. Ill investigate saving buildings and their data. Since they are simply actors, I suspect any method which can save actors will work too.

Krout1 commented 6 days ago

Hi, really love your work! Do you have any idea on how to save and load the statetree status?

Ji-Rath commented 2 days ago

Hi, really love your work! Do you have any idea on how to save and load the statetree status?

Thanks! Unfortunately I do not have an idea how it may be possible to save the state tree state. My best guess/alternative would be to consider designing state tree logic that references saveable data (mass fragment, actor, etc) and simply save/load from there.