Author Topic: [BUG][SUPERLEMMINI] SL not saving player progress [FIXED in SLToo]  (Read 10037 times)

0 Members and 1 Guest are viewing this topic.

Offline Charles

  • Moderator
  • Posts: 47
    • View Profile
Re: [BUG][SUPERLEMMINI] SL and SLToo not saving player progress
« Reply #15 on: March 11, 2022, 04:28:10 PM »
All existing records in player.ini, however, are not shown (but nor are they wiped from player.ini, as I accidentally did yesterday when trying a few things out!)

Are you sure all your records are intact?

I've reviewed the records displaying code, and the only thing there is if the level's not complete it won't show any records.  Which is not the same as if the level's available.  The level will always be available if the unlock levels flag it set.

Maybe it's possible the the earlier bug caused only some of your records to be erased?  Look for a level that's not showing records you expect, then check the player.ini file looking for "group#_level#_completed=true".  If it's false (or doesn't exist) then any other records for that level won't be displayed.  Oh, and because it doesn't appear to save the file in any particular order, I recommend opening it up in Notepad++ (or similar) and sorting the lines. In Notepad++ you can do it under Edit-->Line Operations-->Sort Lines...

Online WillLem

  • Moderator
  • Posts: 3348
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [BUG][SUPERLEMMINI] SL and SLToo not saving player progress
« Reply #16 on: March 13, 2022, 01:20:16 AM »
All existing records in player.ini, however, are not shown (but nor are they wiped from player.ini, as I accidentally did yesterday when trying a few things out!)

Are you sure all your records are intact?

...

Maybe it's possible the the earlier bug caused only some of your records to be erased?  Look for a level that's not showing records you expect, then check the player.ini file

Here's my player.ini file with all completion records. When I run SL from Eclipse with the new code inserted, it doesn't display any of these records - they all appear blank. However, if I then play a level from within this newly-opened SL, it saves and displays the records accordingly.

Going back to stable SL (i.e. not from within Eclipse), all records are displayed again (apart from the ones which are broken by the original bug).

It's possible that there's something else going on with my copy of SL within Eclipse. Maybe I've played around with some of the code that I shouldn't have and it's causing this to happen...?

I tried a fresh project using the SLToo source code, and it just spits out this error:



So, I backed up my experimental src folder and placed the original src folder into the project that usually works (titled "SL3"). SLToo would run from the console, but for some reason it won't apply any changes I make. I changed the logo and it can read that, but I tried a bunch of other tests and nothing worked.

So, I placed my backed up src folder back into the "SL3" folder, and now I get this error again >:( >:( >:(:



To prevent launching my laptop across the room, I am stopping working on this now. I'll come back to it tomorrow.
« Last Edit: March 13, 2022, 07:52:18 PM by WillLem »

Online WillLem

  • Moderator
  • Posts: 3348
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [BUG][SUPERLEMMINI] SL and SLToo not saving player progress
« Reply #17 on: March 13, 2022, 10:43:37 PM »
OK, I've managed to set the project up again so that I can make changes and apply code. But, there's something a bit wrong (or at least different) about the way the project is set up. Here's what I had previously:



And here's what I have now:



Obviously, the first setup makes the most sense (to me, at least). If I changed the "lemmini.png" logo image in the src folder, it would display in the resulting program. Now, I have to change the one in the bin folder, which seems unnecessary and messy (especially since these files weren't even in the bin folder previously). I'm not sure what's changed between then and now to make the current setup necessary.

Anyways, at least I can test some code now... I'll have a look at your suggested bugfix @Charles.

Online WillLem

  • Moderator
  • Posts: 3348
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [BUG][SUPERLEMMINI] SL and SLToo not saving player progress
« Reply #18 on: March 13, 2022, 11:39:24 PM »
OK, after a series of tests with the new code:

1. WillLem.ini is now reflected in the level list (so all existing player records are now displayed) :tal-gold:

2. Sometimes (but not always), when playing levels at random from within a bunch of non-completed levels: the very first level played after opening SL will have its records displayed, but no other (randomly-played level)s will. Other times, normal buggy behaviour is resumed; there doesn't seem to be any obvious reason for this :tal-silver:

3. It still seems to be the case that, in order for any level's records to be displayed, it's necessary to play the preceding level in addition to it :tal-bronze:

4. However, as a wierd bonus, as long as the preceding level has been played at some point, the level played after it will have its records displayed - so it's no longer necessary to play them one-after-another :tal-silver:

It is possible that I've entered the code incorrectly. I did copy and paste from this post as suggested, but there could either be something that I'm missing, or maybe I've pasted it into the wrong place within the project (I don't get any errors).

Meanwhile, I'm still struggling with Eclipse. Is there a "what Garageband is to Logic X" IDE out there somewhere, which makes it easier for complete beginners to get started with compiling and working on projects in as simplistic and foolproof an environment as possible, by any chance? When teaching music tech, I always used to advise students to start out in Garageband and work their way up to Logic X when they felt that they had a good grasp on the basics. I wonder if the coding world has introduced anything similar...?

Offline Charles

  • Moderator
  • Posts: 47
    • View Profile
Re: [BUG][SUPERLEMMINI] SL and SLToo not saving player progress
« Reply #19 on: March 14, 2022, 08:35:43 PM »
I'm finding some of the same problems as you with Eclipse, for what it's worth.

It feels really inconsistent as to when it's pulling from src of pulling from bin.  I'm a bit rusty on it, so I don't remember all the nuances of it, I just remember I had a heck of a time when I was constantly updating the root.lzp for a bunch of the updates.

The code as I modified it should show records for the 1st level (always), and any levels flagged as "unlocked" by the large bit integer, and (assuming unlock all levels is turned on) any levels that have a group#_level#_completed=true value in the player.ini.

I'll try and package the updates I did into a new release tonight... then you can compare if your code updates work the same as mine, and we can see if the bug's properly fixed or not.

Online WillLem

  • Moderator
  • Posts: 3348
  • Unity isn't sameness, it's togetherness
    • View Profile
Re: [BUG][SUPERLEMMINI] SL and SLToo not saving player progress
« Reply #20 on: March 30, 2022, 12:05:48 AM »
The latest version of SuperLemminiToo fixes this bug. However, the bug still exists in SuperLemmini, so the topic is still open.
« Last Edit: March 30, 2022, 06:12:47 AM by WillLem »