Jump to content
MarkShot

[Released!] SC4 Backup Checkpoint Tool - SC4Ckpt

193 posts in this topic Last Reply

Highlighted Posts

  • Original Poster
  • Posted:
    Last Online:  
     

    Release Notes

    v1.00 on 07/2022:  Gold Master.

    * STABILIZE reintroduced at 3 seconds after zip error code=18.  CROSS WINDOW again reduced to 3 seconds.  Version number unchanged as release still pending.

    * 07/05/22 released.

    v1.01 on 07/2022:  CorinaMarie Celebration - THERE ARE NO FUNCTIONAL CHANGES.

    SNAG-0000.jpg.72d28e80fc8dd232c8bec39855b08261.jpg

    If you wish to upgrade without having to go through configuration again, then follow these instructions:

    (1)  Move all files out of the install directory.  Make sure to save SC4CHKPT.INI  IMPORTANT:  This is your configuration and stats.

    (2)  Download and unzip ... place SC4CkptUser.zip into your install directory, and unzip.

    (3)  Replace SC4CHKPT.INI into the install directory.

    (4)  You can now run SC4Ckpt.exe as always.  Your configuration will be preserved.  And a few missing DLL files will once again be unpacked.

    Never forget Cori!  Thank you.


      Edited by MarkShot  

    v1.01 release

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    07/04/22 - Really, everything here got covered in the documents which will be included on STEX.  Only a single item is worth keeping.  This FAQ if questions are asked beyond the included docs.  We tried to keep them short and to the point.  This is the place for wide ranging philosophical discussion.

    FAQ

    READING THIS NOT REQUIRED.  IT IS FOR THOSE WHO WANT TO KNOW MORE.

    QUESTION:  Why is the UI as it is?

    ANSWER:  Well, UIs are always an interesting topic.  First, I should note that the UI for SC4Ckpt.exe is pretty much exclusively confined to configuration.  Once it's running, you should be playing SC4 and have nothing further to do with it.  Also, there are about 5-7 informational items needed.  Once I have those, you basically are simply launching it in the future and declining to alter anything further.  Suffice it to say the UI is important and had to be well done (taking maybe 40% of the entire project), but its role in your regular use of SC4Ckpt.exe is really trivial.  The biggest part of the program as far as you will be concerned is the creation of checkpoints.  Even CONDENSE is something which might only happen a few times per year if you use it.

    So, your first question might be about the style of the UI.  Specifically, why is it a series of questions rather than a form to fill out?  This is because there are classes of languages that are mainly intended for scripting and process control:  such as WinBatch, AutoHotKey, PowerShell, BASH, etc...  Thus, they were not designed for data collection and presentation compared to something like Visual Basic, Access, and Excel.  Those three have far more elegant built in controls.  But I am constrained by what I can distributed freely.  I am constrained by what I have experience with (I have learned new techniques to do this project, but an entire language is too much time to invest).  Also, I am constrained as to what is best suited for this project.  As I said, the core is NOT user interaction but ZIPing and file system interaction.  Winbatch is superb at that, and I have worked with it since 1995, and Windows 3.  In particular, WinBatch includes a builtin ZIP library, and nothing is going to make this come out better for you than an integrated zip library.  Trying to marry the free 7z with some language is going to be a can of worms.  Why am I so sure?  Because I have married WinZip to roll my personal version; it's a can of worms; my can of worms.

    Lastly, Cori promptly raised ( looking at the mock up) why she cannot have text fields for directory/file and browse buttons side by side.  Well, WinBatch, just does not have that (it does, but really clumsy).  Also, WinBatch's browse tools are really a mess as I had done three mock up versions for Cori.  Then, I went down another path and looked at AutoHotKey's browse tools, and they are decent.  But we cannot do this project in AHK, because there is no integrated ZIP library; so WinBatch is essential.  So, I came up with a way to fairly seamless integrate two languages WBT and AHK to get text fields and file/folder browsing.  The way do this mainly is that they both share the SC4CKPT.INI file.  INIs are a Windows standard that most languages understand.

    Now, Cori originally said to not bother as it was going to be too much trouble.  But this is my gift to Simtropolis.  What is a gift?  If not what you invest of yourself?  So, I want Cori and CB to be pleased with the outcome and worthy of the Simtropolis brand within the technical constraints that exist.

    I think the above covers why the UI is as it is ... except those annoying beeps that were in early build.  Sorry, Cori!  There probably a medical term for that in the DSRM5.  :)

     


      Edited by MarkShot  

    Rewrite done
    • Like 2
    • Thanks 1

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    I can see a merit for this tool as it would make it much easier for me to make before-after shots without moving regional folders back and forth. And I make quite many of these.

    Perhaps it would be better to put a poll at the top of this topic if you'd like to gather opinion?

    I'd like to know what you mean by...

    3 hours ago, MarkShot said:

    ...my personal version requires the purchase of some software licenses.

    Would you care to explain?


    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Feel free to do ask questions.  The code will not go into the public domain, but there is nothing secret regarding its implementation.

    Thanks for your reply.  I don't know how to do a poll.  Could you point to an example?

    I wrote my version years ago, and I already owned a multi-seat license for WINZIP.  Besides this WINZIP has a built in command line launcher and can do FULLs and DIFFERENTIALs as a backup concept based on switches; these are called WINZIP jobs (*.wjf).  Thus, I periodically scan TLM of the REGION dirs and if find an update, I spawn a shell to do a differential with REGIONS being the root.

    For me to roll my own, I will not get this for FULL/DIFFERENTIAL functionality for free, but have to build it by a traverse of all files and find the ones to include and specify it on the invocation API.

    The language I am using is:

    www.winbatch.com

    And it contains, its own zip module which I have used, but not so fancy.  So, there would be not cost to users of SC4Ckpt.exe.  Further as a built-in module as opposed to a spawned process it will be more seamlessly integrated with SC4.  Ideally, you should do an SC4 save, and be unaware of the zip happening in the background.  I am pretty confident of this.  I will demote process priority before we enter the main loop to BELOW NORMAL; that takes care of CPU.  As to file access, SC4 does most of its file access at load of the first city in play.  So, I not expect disk contention, even if we are talking an uncached mechanical disk.

    PS:  I did look at:

    www.autohotkey.com

    which in some ways is superior language choice, I code in this as well, (and open source), but no built-in zip support.

    SNAG-0001.jpg.41b898b51481de7fb16a5a18d6454be1.jpg

     

    • Thanks 2

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Mr. Cricket,

    In your case, if you are not using autosave, then you would do a quick save at places you want your photos.

    Then, go back to the Region level in SC4.

    Copy the appropriate DIFF zip (the filename will have the time stamp) to your REGIONS dir, and UNZIP TO HERE/OVERWRITE  You might need to flip regions to get SC4 to redraw the region map; I haven't looked at this.

    Then, run the city and get your shots.

    Then, follow the same process to get back to your latest work.

    NOTE:  Not only will the active city get zipped, but any neighbor city that the game deems impacted will be in the zip.

    NOTE:  You should find the city load very fast once SC4 has already done the first load of a region.


    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    This is what the checkpoints look like from my private version.  I have done a lot, since I am doing all my major road work and junctions.  I don't have much NAM44 experience.  So, I am saving often.  The naming convention will change slightly.  It will change that the names force sorting by creation.  I didn't really choose the names you see here, because was WINZIP doing it automatically.  So, you might have 3,000 checkpoints after a years work on a region build.  Condense is going to get you down to one final FULL zip per day that you worked on the region.  So, you will have a tight history; maybe from 3,000 -> 220.  (Of course, you can always manual do more deleting and just save a zip per month.)

    SNAG-0000.jpg.d7088b8237f874dbc19d35e87b1768a7.jpg

     


    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    NOTE: WinZip is used to capture these two images.

    Here is a better look at what this is doing.  I launch it and my entire REGIONS directory is zipped to a FULL.  I have two regions EXPERIMENTAL and NEW YORK.

    SNAG-0006.jpg.dda88df877bec30f092d5fdcbeb0ed9b.jpg

    Now, here is the last DIFF that happen when I pressed my pre-programmed SAVE button of my city.  You will notice that North East Heights is the city I am working with.  But it does have two neighbors and their related changes are captured as well.  To go back to any earlier time tonight; just copy a DIFF zips to REGIONS and UNZIP allowing overwrite.

    As you can see, it is possible to have 4 regions you are working on for years, and only roll back a single region to a few weeks ago, and not all.  You just need to do an UNZIP of only one REGION directory.  You can do this via Windows Explorer just using the standard COPY/PASTE tools.

    SNAG-0005.jpg.25c6aed80aa0cdb818def8dab684ea1b.jpg

    • Like 3

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    It appears that 7-Zip - the defacto successor to WinZip after the Windows default program fiasco - and used by quite a few of us, also has the capability for differential backups. Given it's free this would solve the licence problem. I haven't used that functionality myself, but I would be surprised if it's a lot different from WinZip's. Since you've scripted the hard part, it may not be more than a few lines to change to have it use 7-Zip instead.

    • Like 2
    • Thanks 2

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    14 hours ago, MarkShot said:

    SNAG-0000.jpg.d7088b8237f874dbc19d35e87b1768a7.jpg

     

     

    How much all of these folders actually "weigh" in terms of disk space?


    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    What you are seeing is 910Mb, but I am saving like a madman.  I have this irrational phobia of this single NAM delete that like dominoes takes down every connected road in my city!!!  :)

    They are just files with clear dates.  Save as much or as little as you want.  Adjust your third party launcher to save once every 30 minutes.  Go clean up old and unnecessary files.  You really have both an extensive safety net and full control of resources used.

    ---

    Yes, I could build a retention setting into the main loop; I have done this for other logging style programs.  But first show me 100 actual users, and we can talk about more features for Version 2.

    ---

    When I have something to use, I will post it here.  We are not going through the 2022 software model of releasing 50 shades of crap.  What is released will work.  What is released will be what I am on, and my private version retired (this not marketing; it will feature more seamless integration).

    SIDENOTE:  If you go to evaluate a vendor selling MS/Windows productivity tools, but when you visit their shop, you find everyone using MACs or Linux, don't buy from them.  Never buy from anyone who will not use his/her own products.  You can end your vendor evaluation right then and there.

    Keep asking away!  :)

    • Like 1
    • Thanks 3

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    5 minutes ago, MarkShot said:

    Go clean up old and unnecessary files.

    Hm, that gives me an idea of an extra option that would allow a user to decide how much space do they wish to dedicate for saving snapshots of their current region. Much like Windows rollback allows you to decide how much of the disk space should be used to store backups. Once the assigned space nears limit, the oldest checkpoints could be automatically deleted. Of course this may be a toggle-able option.

    While there, you could also put up a message in your tool saying "[THISMUCH] of disk space, will let you save [THISMUCH] checkpoints of a 20x20 region" - a message that would change depending on the settings entered by a user.

    As I understand, 910mb is what you got from just one region, right? In this case, an ability to control how much space we are willing to forego to this tool is essential I would say!

    But... while there, you also have to take into account that someone may leave one region unchanged for a long period of time, enjoying other regions instead.

    Should checkpoints from this hiatus region be automatically deleted then...? :O I'm not willing to decide! But I still believe this may be a useful option.

    • Like 1
    • Thanks 2

    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Mr. Cricket,

    Thanks for your thoughts.

    The thing that really eats up space are FULLs .  DIFFs are very light; at most a few cities.  FULLs only happen when starting your game session.  In theory, they could be put under user control and really cut space usage.  Here is how I, Cori, and CB view the situation ... keep the tool simple and easy to use.  Complexity is the enemy of getting a sizeable user base.  (Both Cori and CB spent a fair amount of time reviewing various UI configuration options.  Cori even gave me code.)  So, we have discussed the basics and will start with a utility knife, and not a Swiss army knife.  But later features (like your requests) are not ruled out.

    On each execution, one can go through configuration again; or you directly edit the INI file with NOTEPAD.EXE.  Yes, it would be possible to allow the user in the configuration to identify the regions which will have a safety net, and which to ignore like I myself have a NAM play ground.

    Another thing to consider about space and quotas ... just like when you do properties in Windows to get space used (NTFS does not manage this intrinsically), I will need to do such in every loop through.  Besides limiting tool complexity, we are concerned with performance.  Usage should be possible on a minimum spec machine without a degradation in your SC4 experience.

    Finally, note I am coding in a Windows scripting language.  These are not known for high performance, but high functionality and rapid development (despite that I can compile).  This is versus assembly language or something like C.  So the cost of file operations might be 100X the cost of the same done by Microsoft programmers in the kernel.  I do have ~2000 laptop in the closet with 2Gb of memory and XP 32 bit.  Even if it might boot, testing on it is beyond the scope of this project.  But I will do my best not to waste CPU cycles or disk space.  It is a key design principle beyond ease of use.

    Good questions!  Ask away!

    • Like 5

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    2 hours ago, rivit said:

    It appears that 7-Zip - the defacto successor to WinZip after the Windows default program fiasco - and used by quite a few of us, also has the capability for differential backups. Given it's free this would solve the licence problem. I haven't used that functionality myself, but I would be surprised if it's a lot different from WinZip's. Since you've scripted the hard part, it may not be more than a few lines to change to have it use 7-ZIp instead.

    Mr. Rivit,

    I had checked 7z for switches, and perhaps I was reviewing outdated or erroneous documentation, but I didn't find what I needed.  I will look again, but I still believe using WinBatch's built-in libraries is the better choice for the user.  (Of course, it would be less coding for me and that's why I first used WinZip for myself.)

    Why is the built-in library a better choice?

    * Seamless integration.  SC4ckpt.exe is running in the background while you play.  If I a command shell for 7z is spawned, it definitely is going to briefly interrupt your SC4 game before focus is returned (after process create, zip, process take down, context switch).  Personally, this is not elegant and is what I have now with WinZip.  But if it stays within the background executable, then you stay in SC4 playing.  All you will know about the checkpoint is you will hear a double beep confirming the creation.  The only way you would perceive SC4Ckpt.exe is if it slows your game.  I intend to drop priority to BELOW NORMAL before we hit the main loop.  That should make your game always go first based on the kernel's scheduler.  We prefer to slow down zips than your game.

    ** If the above is not enough, there are other tricks ... like zipping one by one and sleeping 250 milliseconds after each to hand back the CPU to SC4.  Now, this is how scheduling worked in Win98SE/WinME (called cooperative multi-tasking; as opposed pre-emptive multi-tasking), but I don't think it will be necessary even on non-HT Pentium.

    ** Finally, we do have Mr. Cricket's requests.  Using an external API with switches would make his requests harder to implement.  With in process API, I have full control of file lists passed to the zipping module.

    * This again goes against complexity.  SC4Ckpt.exe has no installer.  Just run and answer some questions and play.  7z ... we are starting with extra downloads and install options like the right click context menu.  I do recommend 7z and have it, but it will not be required for this utility.

    ---

    FYI, I spent 50% of my career on Wall Street.  Banks, ticker services, trading floors.  The other 50% Internet startups ... both as a CTO and a "hire a CTO" through my own company.  I did work for one business that built Web presence for fortune 500 businesses.  Generally, six went out for sales calls prior to contract:  Sales, Tech, and Creative.  The head of each and usually the senior person we would assign to the account.  My job was to go in and represent my tech staff as what we could could do for you, and also make sure Sales/Creative did not promise technology that someone saw in a SCI-Fi movie.  :)

    ---

    Nostalgia.

    Ask away!

    • Like 2
    • Thanks 1

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    6 hours ago, TheMurderousCricket said:

    Hm, that gives me an idea of an extra option that would allow a user to decide how much space do they wish to dedicate for saving snapshots of their current region.

    Just my 2¢. I've never been a fan of the computer making this kind of decision for me since it would then have the potential to delete something I would prefer to keep. With such an option enabled, I would have to make sure what I want safely stored is copied out to some other folder. I'd rather manage the zip files myself and all in one place.

    I believe most SC4 players are much more knowledgeable about Windows Explorer file management than the average computer user.  Also, Mark would have to do more coding and there would be extra processing overhead he mentioned that would cause during each use of his program.

    • Like 2

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    52 minutes ago, CorinaMarie said:

    I've never been a fan of the computer making this kind of decision for me since it would then have the potential to delete something I would prefer to keep.

    This is why I said it could be toggle-able. I must be the opposite of you though, because I just hate it when incrementals pile up in my folders. *;) Given the fact that I usually just need the "past simple" of my region rather than "past perfect" or "past perfect continuous", I just thought that it might be a good suggestion.

    7 hours ago, MarkShot said:

    Good questions! Ask away!

    Ok, let's go...

    If auto-delete is a "to do" type of thing, perhaps a different mechanism of controlling the amount of checkpoints would be more appropriate?

    How about letting the users decide the frequency of saves? This way, one can achieve roughly the same, as saving once per hour will definitely eat up less space than doing save every five minutes or so.

    How about "checkpoint on quit only" while we're at it?

    • Thanks 1

    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Mr. Cricket,

    Let's put aside the fact that The World is talking about big data and deep learning.  Some are heralding the arrival of true cognition and sentience in silicon.  That's all too theoretical for you and me; a couple of old SC4 players.

    Let's begin with when should we write computer programs and when should we not?  In general, computers are very good at redundant tasks, and it's even better when these tasks need to be done at great speed.  But if you have a "one off" situation, it often makes more sense to handle the task manually than via a program.

    Let me give you real world example.  The original FPS, Ghost Recon - Operation Flash Point.  One of the top total mods for the game was "Heroes Unleashed".  I downloaded and installed the mod, and it crashed routinely.  I raised the issue and a site admin (GhostRecon.net) told me exactly what the bug was which was causing the problem, and the authors were not around to fix it.  However, the admin was not a programmer.  About 20,000 text files representing weapons for every player and NPC character's weapon kit needed to be scanned and perhaps an edit made.  In about 4 hours, I had that scripted ... zipped up the 20,000 file hotfix and uploaded it.  This was a good problem calling for automation.  It could have never been done by hand.  However, if the problem was a single file, it would have been wasteful to code for 4 hours what could done in 5 minutes with notepad.

    This gives us our common sense standard as to when and where to write computer programs.  There are things you are asking for which could best be done manually using Windows Explorer, and WinZip, WinRar, or 7Zip.  For example, only create a checkpoint when you are done for the day.  Just use one of these archive programs to create an archive when you are done playing.  All have command line and GUI options, and are not that hard to use.

    The exclusion of regions from check pointing because they are to be inactive for months is easily handled by dropping them into a different (INACTIVE REGIONS) folder via Windows Explorer.

    As for disk space problems ... there are drill down programs (free and pay) which will help you analyze and manage disk space based on date/time, pattern matching, file types, size ... etc...  I used Directory Opus for my file manager.  It is truly superb, but not free.

    https://www.gpsoft.com.au/

    ---

    Now as to your other requests.

    (1)  REQUIREMENT:  Allow the user to determine when a checkpoint is created.  SOLUTION:  Certainly, save (CTRL-S) your city and it will be so.

    (2)  REQUIREMENT:  Allow the user to determine checkpoint frequency.  SOLUTION:  Autosave as stated in Post #1 is neither a feature of SC4 nor SC4Ckpt.exe.  However, Cori/CB directed my attention to two launchers that provide autosave.  I have not tested them, but they appear to allow the user to set the frequency.  They work by running in background (like SC4Ckpt.exe) and send a CTRL-S to the game at regular intervals.  I will provide STEX links below if you care to use them; this will give controllable timed check points.

    ___

    Mr. Cricket,

    I am happy to answer your questions, but let's keep two things in mind.

    (1)  I presented a README file which is a statement of scope.  In the software industry, this is a precursor to a business contract that defines the functionality of the product.  That which is not explicitly included, may be taken to be explicitly excluded.  (Yes, my attorney would have exactly such a clause in the contract before I and client would execute it.)

    (2)  I have presented a rough rule of thumb for contracting software development.  The work and effort saved by the user community must be well in excess of the cost of software development.  (The goal of this project is to provide players with what is new and useful functionality to enhance their passion for SC4.  Given the tedious nature of executing commands, and identifying the files/dependencies involved, it does appear to be a good candidate for automation.)  Cori and CB are very busy people ... I would not waste their time.  But they deem this is worth the effort to move forward on, and so I shall.

    Thank you for your understanding and patience.  Feel free to continue to raise questions.

    • Like 2

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    This project is very interesting. However these launchers we can call them a bit old and it would be ideal to build from scratch a new launcher that includes more options that would be good for the community.

    • Like 1

    Federal Republic of SiculiaFederal Republic of Sonora

       Ain Member  Wiki

    NAM Team - Co-developer of Pedestian Revolution Mod - Railway Department (Hybrid Railway | HRW Expert) - MTA Member - BAT Creator

    Ulisse Wolf YouTube Channel - Ulisse Wolf Mastodon Profile

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    2 hours ago, MarkShot said:

    Thank you for your understanding and patience.  Feel free to continue to raise questions.

    Whoa... some answer there.

    But a very informative one indeed and quite an eye-opener. I didn't really realize that programming or writing a program would be subject to considerations like that. In my gamer's and layman understanding, programming was all about tossing every possible option into the coding stew and serve it on a silver plate. What you say is quite the opposite. Perhaps even a little disappointing... But I get the point.

    2 hours ago, MarkShot said:

    There are things you are asking for which could best be done manually using Windows Explorer, and WinZip, WinRar, or 7Zip.

    Funny you should say that and at the same time mention SC4 Launchers which offer a possibility to switch some plugins on or off... moving them to renamed folders... Something that can definitely be done manually by users themselves... *;)

    But I give this example so you can better understand why am I so... stubborn...

    It's true - I could transfer unneeded plugins to a new folder. I could name this folder somewhat else to tell between unneeded mods and the ones I wish to use for the gaming session. Yes. But on the other hand, I find it super handy and fast to do it by the means of said Launcher, which I find to be a very powerful tool, just because of this "redundant" feature.

    I understand your stance, so I hope you will not consider my reply as a demand to take the action the way I want. I just want to let you know who am I as a user - someone who is happy to use all the possibilities a tool can (and could) offer. This is why I was thinking out loud what could theoretically be possible should this (or a similar) tool came to fruition.

    I hope that you understand my point better now. The last thing I want is you considering my posts as a disrespectful rant show!

    • Like 3

    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    8 hours ago, TheMurderousCricket said:

    The last thing I want is you considering my posts as a disrespectful rant show!

    Disclaimer:  Ideas of software engineering, computing, methodology, and terminology are reflective of various points in time from the 1960s to 2020s.  Unlike some recent YouTube videos I watched, I did not get SC4 for Christmas at the age of 10.  So, my presentation of the software industry may not be consistent with what you may have learned just getting out school now.

    Mr. Cricket,

    Your participation is VERY welcome and appreciated.  I reply at length so that we may all end up on the same page as we embark on the construction of this new community tool.  If I thought of you as a nuisance (troll), I would be quite terse.

    What you say about the free and uninhibited contribution of ideas in the software lifecycle is ABSOLUTELY correct.  There is usually an early phase in which such takes place.  You are not wrong.  The term for this is "brain storming".

    We are however well along in the life cycle (past that actually):  we have a spec and design already, and prototype or proof of concept.  Cori and CB were not offered the opportunity to conceive of what tool might be the most valuable to the Simtropolis SC4 community.  Instead they were offered the possibility to take something I did for myself and turn it into something for the community.  They liked the idea and here we are.

    In my PM to them in the subject, I explicitly used the word "donation".  I have not really considered how many hours I might invest in this.  I have considered how many lines of WinBatch that I might deliver.  I would say about 500 for this project.  I do comment (non-executable statements) quite liberally in my code for clarity.  Also, I would say ratio of core code to support will be about 2:3 versus code I write for my own use which is 2:(0.5).  Effectively, error handling, and clarity need to be much better for the SC4 community than it does for the author.  And I should note WinBatch unlike C does not permit multiple statements per line.

    I think it is wise that software projects should be construed as small concrete deliverables.  Why?  Projects halt for many reasons (often the yanking of budget).  By avoiding "feature creep", it is far more likely that SC4 players will get a complete utility of value.  I recently read a blog by Master Tarkus of the NAM Team.  He said the team is moving to "Agile Development" that although they will not publish a schedule, you will never again see two years go by between a NAM Release.  I think Master Tarkus has exactly the right idea.  (I say Master in the sense it is used in Chinese to reflect someone of great skill, learning, and wisdom.)

    So, I hope to be getting on to the actual coding soon.  It would be wise to get something done and out there.  To be brutally honest, COVID sweeps the land and I have a substantial list of risk factors; I won't survive if my personal measures fail.  A British team did a peer reviewed challenge study of Omicron, and concluded that a single 3 micron drop was sufficient to infect 50% of participants.  (Challenge studies are always tough exercises in ethics.)  Fortunately, the volunteers were all young and healthy and survived their experience.

    So, happily communicate with me here.  But I feel it is time to code.  Thank you.

    • Thanks 3

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    8 hours ago, ulisse said:

    This project is very interesting. However these launchers we can call them a bit old and it would be ideal to build from scratch a new launcher that includes more options that would be good for the community.

    Mr. Ulisse,

    Point noted.

    SC4Ckpt.exe will be easy to coexist with launchers or other resident tools as its primary interaction with the game will be via the file system.  Thus, it will have a very light touch on the game itself.

    Clearly, the program will have a timed main loop, and I am using inter-process communication to know when SC4Ckpt.exe should unload itself.  Given the architecture a timed send of CTRL-S only when SC4 has focus would not be more than another 15 lines.

    Let's get V1 out the door, and we can discuss possible enhancements once we have real experience.  (But I won't be turning this into a full featured launcher or mod manager.)

    Personally, I am surprised that with the number of mods that the SC4 community has not adopted JSGME.  It is a very generic mod manager which came out of the SH3 (Silent Hunter 3) community, but is now widely used by gamers.


    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    If I'm thrust right back into the game after the checkpoint is made, it's not all that intrusive I would say. I could live with that but it would indeed be a nice idea to make it more "silent".

    I also think that running SC4 in borderless mode can be a temporary workaround for this problem as in this display mode SC4 always stays on the top. So one could achieve a quasi-background checkpoint generation after all using this option.

    I'm not sure if this was already mentioned... If it was, sorry for the interruption... But I'd like to know how often do the checkpoints trigger?

    • Thanks 1

    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Mr. Cricket,

    SC4Ckpt.exe detects changes to a region directory, and then finds the city files which caused the alteration and creates a zip.  So, it is YOU who does a SAVE which triggers the checkpoint.  You have full control.

    The main difference of having this utility running is if you only SAVE without it, then you can ONLY RETURN to the last save, by exiting the CITY without saving back to the region and then back again to the CITY.

    With checkpoints.  Choose your point in time.  Go back to the region, and UNZIP TO HERE/OVER-WRITE and you will be taken backwards to any SAVE in time; not just the last.

    Are you with me?

    • Like 1

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     

    Ahhh. I see! :ohyes: Well, that largely resolves the problem of disk space and save frequency I was talking about. In this case, all these auto-operations are indeed quite redundant.

    Well, fox trotting towards the full understanding of the concept being discussed here... but this clears up a lot of confusion.


    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    1 hour ago, TheMurderousCricket said:

    I also think that running SC4 in borderless mode can be a temporary workaround for this problem as in this display mode SC4 always stays on the top. So one could achieve a quasi-background checkpoint generation after all using this option.

    It's my belief that the best way for SC4Ckpt.exe to be well received is not to ask anything of players in terms altering their configurations.  It should simply work no matter the resolution, windowed/full screen, or version of Windows (I don't remember if SC4 ran on WIN98SE/WINME, but I will be shocked if the version of WinBatch I am coding in supports these DOS based implementation of Windows).  I am hoping that we are going to find broad compatibility for SC4Ckpt.exe (really, but for determining if SC4 is running, I am writing a file system utility, and not a game utility).

    Aside from communicating, this is the release thread.  And we will be looking for outliers in terms of their play style of SC4 and their PCs.  Will we find anyone on something older than XP?  Will we find someone not on NTFS, but FAT16 or FAT32?  Will my file operations in WBT be compatible with these very old file systems?  Will we find anyone running SC4 on Linux or OSX using a virtual machine?  That's what we are going to determine and address in this thread.

    Post #1:  Release & Download

    Post #2:  Change log

    Post #3:  An FAQ to be built up out of player experience, from my dialogue with Cori/CB, and, of course, yourself, Mr. Cricket, and other SC4 players.

    I am pleased that you finally see what my vision is for the tool.  It is enhancing your management of SC4 builds over time without removing all the PC management tools which have always been yours.

    • Like 3

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    7 hours ago, MarkShot said:

    Cori and/or CB, can you please download and scan and host this off of Simtropolis (I don't have a YouTube account).  Thanks.

    I viewed the online version (first linky) with no trouble. When downloading the .zip Firefox itself was concerned about it being an insecure linky. I selected Download Anyway and my own MSE said it was fine. Next I uploaded to VirusTotal and it shows zero threats out of 59 scans it did.

    • Like 1
    • Thanks 1

    Chance favors the prepared mind. ― Louis Pasteur  
    Remember, a few hours of trial and error can save you several minutes of looking at the README. -- I Am Devloper (on Twitter)

    Clickable ---> The Best of Cori's Posts  (scroll down a wee bit there)    Something fun: MySimtropolis - Invitation to become a SimCity 4 MySim

    Are you new here? Check out the Introduction and Guide to Simtropolis.

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
    Currently: Viewing Forums Index
     

    @MarkShot

    As you requested I've uploaded your demo video to the Simtropolis server, then embedded it into your post above along with a direct download link. We can do the same for any other videos you have, and just let us know here or even inside the PM convo we've got running.

    I placed the info about it hosted on your site inside a spoiler. (You could edit that out if you wish, but I kept it there so you can decide.)

    • Like 2

    Quick Links

    “SimCity 4 is not just a game, but a tool driven by our own imagination and creativity.”

    Buy me a coffee

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Cori and CB,

    Thank you for hosting the MP4.  My business site is an unknown domain whereas Simtropolis is a name people trust.  (In reality, the business is shut down, but I keep the hosting contract for various reasons.  I suppose this is obvious by the fact that at the bottom of our Website pages, it says best viewed at 800x600.  :) )

    Dear All,

    We have had a lively little dialogue on SC4Ckpt.exe.  I will stop posting following this message; unless to answer questions.  Your questions are always welcome; especially yours, Mr. Cricket.

    As of today, coding on the release version begins in earnest.  There will not be updates, videos, and screenshots.  From your perspective, either you have and it works; or it is what we call "vaporware".  The release is intended to be fully functional.  Nothing POs me more than game companies releasing on Monday a severely bugged product (that they know) and promising a patch by the weekend.  Simply, disgraceful.

    I have decided on one change since we last spoke.  In part, due to a comment by Mr. Ulisse (BTW, I tested with some of his NAM rail stations; beautiful - highly recommended).  It seems the ancient launchers (and thus, autosave is not in wide scale use).  However, I have watched many YouTubers with autosave in other games turned on.  It's handy.  Since I will be in the module today that builds/edits the configuration information, I will add a relevant prompt for autosave, but in the release version, the code to actually trigger autosave will likely be absent.  (to be added)

    I have found SC4 saves to be lightning fast on a modern PC with memory cache and SSD.  In fact, it is the command key and dismissing the confirmation that takes your time.  The value of autosave will be greatly multiplied with the checkpoint feature.

    I must say SC4 appear rock solid stable as games go (even with mods).  But on the other hand, our electric company enjoys flashing the power on and off to remind us that current is not a right because we pay our bills, but a privilege that we enjoy at the good graces of the powers (pun intended) that be.  So, they have managed to make every game unstable.  :)

    Until we meet again, may you find good grades for all your road construction and more!

    • Like 3

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites
    Posted:
    Last Online:  
     
    14 hours ago, MarkShot said:

    We have had a lively little dialogue on SC4Ckpt.exe.  I will stop posting following this message; unless to answer questions.  Your questions are always welcome; especially yours, Mr. Cricket.

    Thank you for the nice words. I can only hope that the dialogue was indeed productive and the input was of the kind you have indeed anticipated. :yes:

    I guess you want to be on your way now, coding the next Simtropolis masterpiece. I have a glass of cider right next to me and shall drink to your success! Cheers!

    • Like 3

    The "SimCity 4" vanilla Opera House is the most evil thing in existence. Avoid.

     

    My city journals! *:read:
    - SimCity: Tribalism - seven urbanization concepts clashed together
    Saving Magnasanti... - the most depressing city in history being revitalized

    Also worth checking...
    - "TMC's Drawing Board" - my city designs and plans.
     

    Share this post


    Link to post
    Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     

    Our FAQ is born (see post #3).  Coding is going as one would expect.  Many lines written in one hour, and then another hour stuck on a single line unable to figure why it won't work.  Don't chose a career in IT, if you don't handle frustration well!  :)

    • Like 3

    SC4Ckpt.exe ----- Lead Programmer (okay ... yes, there was only one programmer)

    SC4Ckpt: Backup Checkpoint Tool

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections