User Tag List

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13

Thread: ini not saving my score

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Mar 2018
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    ini not saving my score

    ok so in my game i set up the ini and i made sure that everytime the player scores it saves but it doesnt work for some reason and i cannot figure it out! could someone please check the file and tell me whats wrong? ive been tryna figure it out for like 2 hours. thx
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module

    Join Date
    Dec 2013
    Posts
    139
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This got me by surprise as well a couple of weeks ago. In the frame editor click the ini object then in the property window uncheck "Windows: Read changes from Disk". After that the application is allowed to write to the file on the fly.

    btw. make sure to not use any always/looped commands to write data as the file as this will wear down hard drives over time.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Mar 2018
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    what loop commands do you mean? are you talking about the loop movements?

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module

    Join Date
    Dec 2013
    Posts
    139
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here is what I meant:

    Use run once events to save and read data from the ini. It will read from the hard drive. Reading and Writing files wears out the physical drives if it is done excessively. (I highly doubt you will reach any limit anytime, but still.)

    Lets say I have 100 enemies moving around and I use "always" event to save each enemy to the ini file and then another "always" event to read from the ini that alone is 200 read/write commands per each frame of your game. So 60fps = 12.000 read/write actions per second. So if I leave the game open for 5 minutes that is a total of 3.6 million file operations. I am not entirely sure about reading so it could be 50% less but still should be kept in mind.

  5. #5
    Clicker Fusion 2.5 Developer

    Join Date
    Mar 2018
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    ohhh so you mean instead of "always" i should use "start of frame"?

  6. #6
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    895
    Mentioned
    120 Post(s)
    Tagged
    0 Thread(s)
    Save your score to a global value - or an alterable value if you prefer.

    Don't save to the ini file during the game - the way you're writing it, it will be saving that to disk 60 times a second and if your game gets busy - it will hang your game because that process is slow.

    Put your line to save the ini file as a End of Frame event - that way when the player leaves it is saved.

    If you use a global value - then that score will be correctly saved all the time - because global values are remembered until the person actually closes down the game. If you use an alterable value of an object, make sure that object will never be destroyed because its value will then be lost. If you want it to continue across frames you can make the object a global object - but still - use a global value, it's simpler.

  7. #7
    Clicker Fusion 2.5 Developer

    Join Date
    Mar 2018
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i actually fixed the ini problem but the ini is the only way i know how to save the game with. are there any tutorials on how to save with global values you recommend?

  8. #8
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    895
    Mentioned
    120 Post(s)
    Tagged
    0 Thread(s)
    The global values you use as you are using the alterable values. If you click on your game name - then click on the tab that says A-Z - you can enter global values and global strings there.

    And you would save them the same way in an ini file when the person leaves the game so that they can carry on from where they left off.

    It's just that when you move from one frame to another, a global value will remember what it's value was and keep it until you close the game. You don't have to do anything more - it's a built-in feature.

  9. #9
    Clicker Fusion 2.5 Developer

    Join Date
    Mar 2018
    Posts
    164
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh ok i didnt know that. ok ill try it out thank you

  10. #10
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export Module
    Janette5's Avatar
    Join Date
    Dec 2014
    Location
    Western Cape, SA
    Posts
    895
    Mentioned
    120 Post(s)
    Tagged
    0 Thread(s)
    There are also built in values for score and lives - look on the row of tabs in your Event Editor for the little joystick. Right click under it - and it will show you options to set a player's score and lives - these will also be remembered across frames.

Page 1 of 2 1 2 LastLast

Similar Threads

  1. High Score Example Not Saving Scores
    By drnebula in forum Fusion 2.5
    Replies: 2
    Last Post: 29th August 2016, 06:50 PM
  2. I need help with saving a name against a score
    By rosse119 in forum Fusion 2.5
    Replies: 3
    Last Post: 3rd June 2016, 07:29 AM
  3. high score not saving on android
    By Harry))) in forum Android Export Module 2.5
    Replies: 3
    Last Post: 4th October 2014, 04:18 AM
  4. INI Saving Highest Score
    By KLiK-iT in forum Guides, Tutorials, Examples, Widgets
    Replies: 1
    Last Post: 21st July 2014, 09:20 PM
  5. Saving a current score with INI and best score
    By KLiK-iT in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 11th March 2012, 05:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •