+ 3

Need help making a save option for my game so that you can continue where you left.

https://code.sololearn.com/WixmwdoUtW04/?ref=app

11th Jun 2017, 7:57 PM
Cornelius Labuschagne
Cornelius Labuschagne - avatar
8 Answers
+ 2
Oh I read it wrong, sorry. For that you might need: localStorage.setItem("Key","Value"); output = localStorage.getItem("Key");
11th Jun 2017, 9:21 PM
Limitless
Limitless - avatar
+ 5
localStorage or Cookies might work on Pc, doubtful on app
11th Jun 2017, 10:53 PM
Russel Reeder
Russel Reeder - avatar
+ 4
I'm trying to so the same thing. you're gonna need a database of some sort, and a way to access it. it can be done with js but seems like some knowledge of frameworks, php and sql is required. sorry I cant be more helpful, I would like some help in this area as well... lol
11th Jun 2017, 10:52 PM
Russel Reeder
Russel Reeder - avatar
+ 3
not looking for a pause button
11th Jun 2017, 9:13 PM
Cornelius Labuschagne
Cornelius Labuschagne - avatar
+ 3
i want the game to save so that players can reload previoua progress
11th Jun 2017, 9:13 PM
Cornelius Labuschagne
Cornelius Labuschagne - avatar
+ 2
Did u ever figure this out?
5th Jul 2017, 8:49 PM
Russel Reeder
Russel Reeder - avatar
+ 1
What I would do is the following: Create a variable in your JavaScript called speed. Set speed to 500. Use speed at the timeIntervals and multiply values where needed. Example: Speed*2 at Progress bar #2 add a button that says "Pause" : onClick{ if !paused then Change the button's text "Continue" Change Speed's value to 9999999999. and pause. else Change the button's text to "Pause" Change Speed's value to 500 and that's unpause. }
11th Jun 2017, 8:50 PM
Limitless
Limitless - avatar
+ 1
Well at least you have that pause idea if you need your program to ever pause or slow down :p
11th Jun 2017, 9:22 PM
Limitless
Limitless - avatar