Post B0a7rtCzMAuPQxMZIO by stux@mstdn.social
(DIR) More posts by stux@mstdn.social
(DIR) Post #B0a3FvuCTucOyfDj6m by stux@mstdn.social
2025-11-24T19:38:57Z
0 likes, 0 repeats
Garbage removal, cleaning, repair & painting!Save system is almost done#GameDev
(DIR) Post #B0a7DFQfpsW2TeNulM by stux@mstdn.social
2025-11-24T20:23:21Z
0 likes, 0 repeats
How about thisI have about 6-7 mapsWhen you complete tasks you earn money, with the money you earned you can unlock new maps?So start with one small and unlock whatever you want depending on your earnings
(DIR) Post #B0a7Ntq0S6wKhLJSsa by stux@mstdn.social
2025-11-24T20:25:16Z
0 likes, 0 repeats
@franticbiscuit Ah yes! good idea
(DIR) Post #B0a7rtCzMAuPQxMZIO by stux@mstdn.social
2025-11-24T20:30:41Z
0 likes, 0 repeats
Okay maybe not..Currently I save all interactable actors and their state but if I add more levels the save operation gets quite huge or it has to be per levelSo maybe one big city
(DIR) Post #B0aAYIxUD1HdMnSsd6 by trebach@functional.cafe
2025-11-24T21:00:45Z
0 likes, 0 repeats
@stux What exactly are you trying to save to make the save file so huge? You can probably reduce it to flags or variables, save them, and then load the game back to the correct state based off of them
(DIR) Post #B0aBI4C7QvgStj87oO by stux@mstdn.social
2025-11-24T21:09:02Z
0 likes, 0 repeats
@trebach Not the save itself but the systemThere are 6 types of actors with each their vars and some also have refs to materialsCurrently it's just for one level but if i add more i need to overhaul the sysyem so the actors get saved per level
(DIR) Post #B0aDfOlNKF9HG7sFsm by trebach@functional.cafe
2025-11-24T21:35:40Z
0 likes, 0 repeats
@stux I think we can make it expandable without having to overhaul the system each time by assigning an id to each actor, saving the necessary fields for each actor in an object, and then having a dictionary for each actor type with the id of the actor as the key and then the value as the object you made for the actorIf you need to add more actors, you add to the dictionary with a unique id. If you remove actors, ignore ids that don't exist in the game anymore. If there are ids missing when you load the save for actors you've added to the game in the meantime, use default values as though they were brand new