So I'm attempting to create an auto save system for my game which saves the game every 5 seconds or so... The issue is that the array for my world data is already over 1MB in size and growing, and when I save the array, the game "hiccups" for a split second while it's saving. There's a noticeable lag which is really unacceptable for any game every 5 seconds of play.
So is there any trick or way of auto saving an array while avoiding this issue? Or am I going to be forced to having the player manually save their game? How do other games save data on the fly without it causing lag issues?