CDogs1964's Recent Forum Activity

  • My apologies if this post seems repetitive from a previous post, but I do not feel it is written clearly how one saves off game data and keeps it protected. I have Local Storage working great in a game I am developing. It maintains progress for multiple aspects of the game in addition keeping high scores for different game modes within the game. The problem is that if I clean out my history, which is a good thing to do from time to time, it wipes out all this information. I would think this sort of behavior would upset many players. I have never played Candy Crush, but I understand it has many levels. How would a player feel if they were just trying to tidy up things by clearing history only to find out they wiped out hours of play of their favorite game? So with regards to this topic...

    • What good is Local Storage if it can be wiped out so easily? Is there a better way to protect it?
    • Is there another solution that protects the data more? I am hoping for something clean where a file is read when the game is loaded similar to Local Storage, but that is only deleted if done so intentionally by the player either directly or by removing the game.
    • Does Local Storage work on mobile games? By mobile I am not referring to browser-based games. I have not learned how to export for mobile yet, but I have read up on Cocoon JS and XDK. It is this type of game I am referring to. And if you can use Local Storage within these games, can the data be wiped out easily by the user the same way it can within a browser?
    • If developing a game for the App Store, should all this be done with Game Center? (And the same with Android and its counterparts) Do we have access to all these features with a plug-in?

    Again, I am sorry if I am a bit repetitive with my posts, but it surprises me this topic is not addressed more completely somewhere or perhaps I just cannot find it? Any help is much appreciated.

    Thank you!

    • Is Local Storage only to be used with web apps (browser) and not mobile apps?
    • If so, what do you use in place if developing for mobile? Is this part of the mobile plug-ins?

    Thank you in advance for any assistance.

  • You may have to click Download twice after cancelling Dropbox' request to set up an account.

  • Created a capx to show more people how to use local storage with dictionary if you are interested.

  • https://www.dropbox.com/s/61kstfx7pbr3j ... .capx?dl=0

    I have seen a lot of questions about Local Storage and although I am relatively new to C2, I thought I would offer this capx to demonstrate the basic use of the Local Storage plug-in. It is a simple game where you have 3 students. You push their corresponding button to move them through the school system until they graduate. You can exit at any time, go back in, and see where you left off. A couple notes:

    • I also used a dictionary to show how the 2 can be used together. (I personally would also use some global variables for clarity, but thought this was leaner and maybe easier to follow. I was not trying to write perfect code.)
    • I added a "Clear" button so you can start over.
    • I also used an array to save grade information as I thought this might help some beginners as well.
    • Lastly, I added a text field to show last button pushed just to mix up the types of data stored in the dictionary and local storage.
    • The default preview is set to Chrome.

    Hope this helps some of you . <img src="{SMILIES_PATH}/icon_e_biggrin.gif" alt=":D" title="Very Happy">

  • You were not retrieving correctly. I made some small mods here.

    https://www.dropbox.com/s/yyt2wl382jund ... .capx?dl=0

  • Have you checked this out? https://www.scirra.com/tutorials/450/timers

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Your issue is that it processes so fast that when you set SettingsTrigger to 1, it is being 'touched' so it starts the 2nd fade.

    Instead of checking for SettingTrigger = 1, check for the Opacity of one of the buttons to be 0. This way it will only trigger if the

    options are hidden.

    Instead of checking for SettingTrigger = 0, check for the Opacity of one of the buttons to be 100. This will only trigger once the options are visible. You could also check for >0 if you wanted to allow them to close them before they are 'fully open'.

    Hope that helps. I can send it to you if you like.

  • I came to the forums to look this exact thing up. It would be a nice feature and I do not think people should brush it off as "not a high priority". As someone who has been working in software for 25+ years, it can be the little things that make working in an environment more enjoyable. Commenting one's code is Coding 101. I think with C2's structure, it is often where you run into situations where you have a "lot" of actions from 1 event, but when you do, this would be very helpful. For now, I just tried to break it out into smaller functions for readability purposes.

  • I believe if you are working on a Mac, it is Command-A instead of Ctrl-A.

  • Hello DrageoN

    First, I would recommend that you use separate event sheets for each layout. It makes it much easier to code and to read later. For example, you have multiple "On Start of Layout" events, but it is tough to know which layout you are talking about. As you develop your game, you can begin to use shared event sheets when there are function shared across multiple layouts.

    I'm not 100% sure this is what you are referring to with 1.) above, but it seems once someone loses, their health goes to 0 and you destroy the player. When the player tries to come back in, the event which checks for the health is triggered and you are immediately brought out again.

    Something else I would look at is you set the LevelNumber to 1 as a global variable and then add 1 to it on Start of Layout which would bring it to 2?

CDogs1964's avatar

CDogs1964

Member since 22 Nov, 2014

None one is following CDogs1964 yet!

Connect with CDogs1964

Trophy Case

  • 10-Year Club

Progress

10/44
How to earn trophies