Sonic Background Scrolling Screensaver

Discussion in 'Showroom Archive' started by MainMemory, May 16, 2015.

Thread Status:
Not open for further replies.
  1. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    Perfect. That's exactly how I hoped it would have worked anyways (I tried it before I posted). Thanks :3

    EDIT: Trying that out gives me the following two errors (I'd spoiler them, but I don't know how anymore :C):

    EDIT2: Errors removed for your sake, they were HUGE, and filled up two or three pages worth. Plus, it's been fixed, anyways.
     
    Last edited by a moderator: May 18, 2015
  2. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Sorry about that, it's fixed now. Also I should probably mention that you must define a value for the last line of the image, otherwise the scrolling will wrap around and use line 0's value again.

    Also, Mushroom Hill Zone, first S3K level, first multi-layered level, first level not ported from a disassembly.
     
  3. Pacca

    Pacca Having an online identity crisis since 2019 Member

    Joined:
    Jul 5, 2014
    Messages:
    1,175
    Location:
    Limbo
    Well, since it's possible to make custom background with this now, and I was interested and need a short break from hacking, I made a background for this that is made to look like Merry Meadow Zone from my Sonic 2 hack. So, there's 6 different backgrounds, now :D

    DOWNLOAD
     
    Last edited by a moderator: May 18, 2015
  4. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I've added Casino Night Zone, and Mushroom Hill Zone has been updated to add a fourth "All Seasons" mode, which cycles through the three color palettes with a configurable delay and fade length in frames. If you want to go back to the "Early Fall" palette after the "Late Fall" palette, you can just add a copy of the palette2 line as palette4.

    Edit: I updated MHZ to fix a bug with negative scroll values, and I updated the main download with some functions MHZ needs to run.
     
    Last edited by a moderator: May 19, 2015
  5. M.N.K.

    M.N.K. In the River of Darkness... Member

    Joined:
    Feb 22, 2009
    Messages:
    506
    Location:
    Earth...
    Just gave this thing a go to see how it works [tested with CNZ and DEZ], and I gotta say I love it! it's possibly one of the best screensavers that Iv'e had in awhile. definitely going to be keeping these two as well as seeing what other ones you will be making.
     
    Last edited by a moderator: May 19, 2015
  6. Lazarus

    Lazarus Newcomer Trialist

    Joined:
    Apr 8, 2015
    Messages:
    15
    Location:
    Splatoon Hell
    ​What makes you think that?
     
  7. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Because the "No Way" screen is only 320x224, and computer screens are at least twice that size, usually larger. You could use an algorithm to increase the size of the artwork, but that would have to be done ahead of time, and specifically for your computer's resolution.

    Also, it's not a level, so it would have to be handled differently from everything else.
     
  8. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    I've added Green Hill Zone, which is unfortunately limited vertically like EHZ and S2CNZ.

    I've also fixed the screensaver so that custom music works.
     
  9. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Two new zones today: Marble Zone and Spring Yard Zone. Marble Zone won't display animated torches properly unless you update the screensaver (it's actually a bug in SonLVLAPI.dll).

    Edit: added Star Light Zone because why not.

    Edit 2: With Scrap Brain Zone Act 1 and Scrap Brain Zone Act 2, I've finished all the levels in Sonic 1.

    I've also updated LZ/SBZ3 to allow three settings for water: None, Partial, and Full. GHZ has been updated to add an option for the Title Screen palette (you should delete the GHZ folder before updating it). I've also made the level list in the config dialog a bit larger.
     
    Last edited by a moderator: May 24, 2015
  10. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    So, funny story: I wanted to see what framerate I was actually getting, so I added an FPS display, and even though I had it set to 60fps, it wasn't going over 32fps. When I looked at the documentation for the Timer class, it said "Because the Timer class depends on the system clock, it has the same resolution as the system clock. This means that the Elapsed event will fire at an interval defined by the resolution of the system clock if the Interval property is less than the resolution of the system clock. The following example sets the Interval property to 5 milliseconds. When run on a Windows 7 system whose system clock has a resolution of approximately 15 milliseconds, the event fires approximately every 15 milliseconds rather than every 5 milliseconds." Guess how many milliseconds a frame lasts at 32fps.

    So, I ditched the timer for a loop with a high-resolution Stopwatch, and now I get 62fps on every level... except Marble Zone, for some reason.

    The FPS counter is now an option in the config dialog, though it may be a bit glitchy at first fixed. I've received a report that the screensaver now runs slower on Linux, so sorry to any Linux users.
     
    Last edited by a moderator: May 25, 2015
  11. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Getting back to porting backgrounds, starting with Chemical Plant Zone. I had considered adding water, but decided against it for now, because unlike Labyrinth Zone, CPZ's water doesn't affect scrolling.

    I've also updated several levels to make them run faster, and added some new API stuff to the screensaver (which CPZ uses), so you may want to redownload everything.
     
  12. Slash

    Slash Well-Known Member Member

    Joined:
    Aug 12, 2013
    Messages:
    52
    Is this supposed to happen with Chemical Plant?

    [​IMG]
     
  13. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Last edited by a moderator: Jun 8, 2015
  14. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    [​IMG]
    I've managed to add scaling to GHZ, EHZ and S2CNZ in a way that doesn't hurt the framerate too much. You can change the scale setting in the level's setup.ini, the default is "Auto", which uses the largest integer that will fit on your screen vertically, or you can enter an integer greater than 0 for a constant scaling factor.

    Edit: Oil Ocean Zone, which supports scaling, and comes in two varieties, because I discovered while making it that the game doesn't display the whole background.
     
    Last edited by a moderator: Jun 10, 2015
  15. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Hey, it's been a while, but I got two new levels done: Hill Top Zone and Wing Fortress Zone.

    I have no plans to do Metropolis Zone, because the scrolling is extremely basic and the animated tiles make implementation very complicated, and Sky Chase Zone is not happening because the background is impossible to extend vertically, so essentially I have now finished all of Sonic 2's levels.

    Sadly, S3K levels are probably not happening soon, because the disassembly is not very well documented, and a lot of S3K's levels use tile reloading for fake layers, and look at how long HTZ took me to figure out (and I had to have MarkeyJester help me with it). SCD levels would require a good disassembly.
     
  16. ArcaniaCQ

    ArcaniaCQ Well-Known Member Member

    Joined:
    Jul 18, 2015
    Messages:
    789
    Location:
    Sweden
    Wanted Ice Cap Zone for this after seing Mushroom Hill having one.
     
  17. Unused Account

    Unused Account Well-Known Member Member

    Joined:
    May 10, 2013
    Messages:
    153
    Help, my PC is a broked!!

    Ok, seriously now -
    Upon shutting down my PC, everything closes down and the taskbar and icons on my desktop dissapear... then my background just stays there. My PC never shuts down, I even experimented by leaving in on overnight. In the end, I just held the power button down for a while.
    I'm running Windows Vista, by the way.

    Note: Took a glance at task manager just now to see this. Don't know if this is normal, I'm no tech person.

    [​IMG]

    How would I go about uninstalling this for now so I can shutdown my PC without risk of corruption?
     
  18. MainMemory

    MainMemory Well-Known Member Member

    Joined:
    Mar 29, 2011
    Messages:
    922
    Delete the files?
     
    Unused Account likes this.
  19. Unused Account

    Unused Account Well-Known Member Member

    Joined:
    May 10, 2013
    Messages:
    153
    Ok so when I attempt to delete the files, it says I need permission to perform this action.
    I guessed it's because it was set as the screensaver, so I went to go change it, but clicking 'Screen Saver' on the Personalization menu does... nothing. It pretends to load but doesn't actually do anything.
     
Thread Status:
Not open for further replies.