Always Save w/ out Lag?

How can I constantly be saving my game without lag? I have constant points coming in, and need it to be constantly saving. Any way how?

Comments

  • AlchimiaStudiosAlchimiaStudios Member Posts: 1,069

    How often is "constant" and why does it need to be that way? I would write the value to a table and just write rules to periodically auto-save/save at prime points in the game.

    Follow us: Twitter - Website

  • AngryBoiAngryBoi Member Posts: 586

    @AlchimiaStudios It's a clicker game, and ever time you click, you get a point. But, if I save every single time I click, it lags...

  • MantoManto Member Posts: 796

    @BetweenTheWalls maybe you could save the game when the user stops tapping for X seconds. I'd expect the user to stop tapping before closing the app, so that'd be a logical place to save the game. Of course if GS had some rule that was triggered when application is terminated, it would be the best place to do it.

  • AngryBoiAngryBoi Member Posts: 586

    That sounds okay. Anyone know of any other ways?

  • AngryBoiAngryBoi Member Posts: 586

    If I save it every .01 seconds will it cause lag? Ive heard it wouldn't, but I'm not sure..

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880

    Save at every .2 seconds. Thats still 5 times a second -- which is pretty fast for a human, but very slow to a computer. (If its still lagging, then I would bet that its because of some inefficiency thats being introduced by your code.)

  • AngryBoiAngryBoi Member Posts: 586

    Thanks. I ended up saving every .1 seconds and it didn't cause any lag. I guess i just needed to try it.

Sign In or Register to comment.