don't click here

"Multi-Layered" Parallax in Sonic 1?

Discussion in 'Engineering & Reverse Engineering' started by BlackHole, Jun 23, 2009.

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

    BlackHole

    You're going to need MORE than help. Member
    5,847
    854
    93
    England
    Complaining
    I've been wondering this since I played Sonic 3's Carnival Night Zone, where in the background you can clearly see buildings overlapping other, more distant, buildings. This made me wonder if that effect can be created in Sonic 1, seeing as Sonic and Knuckles, of which a disassembly exists, also does it, or if the Sonic 1 engine can not handle it. I'm no good with the technical side of things, so I cannot try it personally.

    The reason I call it multi-layered is because it looks as though it uses more then one layer.
     
  2. Rika Chou

    Rika Chou

    Tech Member
    5,276
    170
    43
    HTZ in S2 has the same effect. I'm sure it could be done in S1 if you know ASM well enough.
     
  3. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    10
    0
    being an asshole =P
    You certainly can do it. What the game does is just changing the tile graphics as the scroll moves. Mushroom Hill and the gumball bonus stages also have this effect.
     
  4. muteKi

    muteKi

    Fuck it Member
    7,899
    149
    43
    In other words it's an animated pattern, much like the oil in Oil Ocean or the tubes in Metropolis -- actually it's more like the backgrounds in some of the later levels of Headdy which have a similar effect that isn't based on horizontal position.

    Actually pretty much all the stages in S3K have the effect somewhere.
     
  5. saxman

    saxman

    Oldbie Tech Member
    If you take a look at Hill Top, you'll see that the section that scrolls "behind" the big mountain tops actually just wraps around itself. Every pixel that disappears from the left side will reappear on the right. It's arithmetic they do that draws it differently depending on the camera position.

    This could absolutely be done in the original Sonic the Hedgehog. Now how to go about doing it is a different question altogether, and it's one I don't have the answer to. But it's definitely possible without a single doubt.
     
  6. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,250
    510
    93
    Japan
  7. BlackHole

    BlackHole

    You're going to need MORE than help. Member
    5,847
    854
    93
    England
    Complaining
    Nice MarkeyJester. Could you possibly give us common members the code please? Or perhaps you could add it to the wiki, as it would make a rather good addition.
     
  8. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,250
    510
    93
    Japan
    I haven't really decided on whether it's a sacrifice I'm willing to make just yet, I guess you'll have to wait until I'm sure that I wont get my arse kicked for giving out such coding =(
     
  9. BlackHole

    BlackHole

    You're going to need MORE than help. Member
    5,847
    854
    93
    England
    Complaining
    Well, if it could give you an arse kicking, then it doesn't matter. I'll try to figure it out myself, as I can see you used Marble Zone for a reason.
     
  10. MarkeyJester

    MarkeyJester

    Original, No substitute Resident Jester
    2,250
    510
    93
    Japan
    I'll asume you think it's due to the animated tiles in MZ XD, funny enough no, I used MZ because on a blank DisASM I need to sepereate the title screen art and the GHZ art and patch the GHZ arts 1 & 2 together, couldn't be bothered to do all that just to get a point through, so I went for the next zone, however it would be a great place to start, seeing at it already has animated tiles designed for that level, but it will take abit of moding to get it to read the camrea's X position other than a continusly running timer (Edit: TWO continusly running timers if I'm not mistaken), anywho, I'll leave you to it. good luck!
     
  11. Eduardo Knuckles

    Eduardo Knuckles

    Not a loved one, but the most hated person. Banned
    414
    10
    18
    Someplace somewhere
    Project S.A.M.G.
    Definitely awesome!
    I hope can see this code available for us soon. But yeah, this appears be hard to work on in a very detailed background.
    Well, is great to see that this thing is possible.
     
  12. Tets

    Tets

    one rude dude Oldbie
    918
    96
    28
    I always wondered how they faked the parallax scrolling in Sonic 3 and Knuckles. It's actually a lot simpler than I imagined it was.

    Not to derail the topic, but I've also been wondering how the water surface effect is done in Hydrocity and Launch Base, in places where you can see the water surface stretch into the background.
     
  13. nineko

    nineko

    I am the Holy Cat Tech Member
    6,369
    524
    93
    italy
Thread Status:
Not open for further replies.