Flaming Mitten R&D - Mode7 investigation / Simulating oldskool raster effects

SparkyidrSparkyidr Member Posts: 2,033
edited November -1 in Working with GS (Mac)
Hey guys

I've started looking at approximating something looking like mode-7.

But first, I decided to see how easy it would be to simulate some raster effects

The floor on Street fighter 2, is basically an image what's wider than the screen. And they scrolled each raster line up the screen, slightly slower than the previous. This gives a cool 3d effect to the floor. It's like a really extreme parallax scroll....instead of having say 3 layers, foreground, back1 and back 2, each rasterline is a parallax layer

So I took some images (nicked the street fighter floor) at 6px high (I only took 480 wide though.and then put an actor every 6 px up the screen (I used 8). I set the speed to be the a set amount - the y value. So each actor above is slightly slower than the last.
I then set the image dependant on the Y value using the 8 images I took from the floor image.

Check out the following video...might not look all that interesting, but it's deffo working as it should (I didn't take wide enough images, so I only have a limited field of movement right now.



An interesting side note/bug

The 8 Y values should be :
3, 9, 15, 21, 27, 33, 39, 45

but to get them to line up, I had to set them to :

3, 9, 15, 20, 25, 31, 37, 43

for some reason!

I reckon 6 pixels is probably small enough as long as your initial image is wide enough for your needs. The firther you scroll from your initial centre point, the more jaggies you will get between the layers though. Ideally, you would use 1 pixel...but I fear performance would be a massive issue.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    very interesting. subtle yet effective
  • SparkyidrSparkyidr Member Posts: 2,033
    looking at the video again.....if you had wide enough images, or good level design ;) you could maybe use it to make a passable 2.5d platformer for sure.

    Just depends on how having 8 or so actors per platform will kill the performance.
  • SnowSnow Member Posts: 124
    The only problem with 2.5d in GS is that you can't simply switch layers, instead you have to use painful invisible actor switching. >.< However, this is still a very cool effect. Very nice.
  • DetheDethe Member Posts: 172
    I dont get it
    can someone help?
  • SparkyidrSparkyidr Member Posts: 2,033
    It's a very subtle effect... and probably not all too noticeable in the youtube vid.
    But basically, as the floor scrolls left to right, the front scrolls faster than the back, with varying speeds in between.
    It gives a very subtle 3d (2.5d) effect.

    On an 8 or 16 bit computer/console, you could do this per raster line (1 pixel) using bitmap manipulation
    But in GS, you can't do that.

    What you have to do is.

    1. Have an image that's a lot wider than the scene/object (this is the same as the oldskool way of doing it too)
    2. Split the image into sections from front to back. The bigger the hight of the sections, the chunkier and more jaggy the effect will look. (Ideally, you would make each section 1px high.
    3. Re build the image in GS, but using actors for the sections.
    4. Apply rules so that each section moves slightly slower the further up the screen (and hence further back in the fake z axis) it is.

    you can see a more extreme use of the technique in my 8bit 3d road video :



    That's using the same segmenting technique as I mentioned above, but rather than just scrolling at a slower speed further back into the z axis (fake z axis remember, as we are not in true 3d) I am applying a "SIN" function to the segments so that depending on where they are in the Y axis onscreen, they will move to form a curve when I create a left or right hand bend function.

    Basically........it's a very complex way to make something that was fairly simple to do 20 years ago, in an engine that wasn't really designed to do that sort of thing.

    Basically 2...I am a geek ;o)
  • EatingMyHatEatingMyHat Member Posts: 1,246
    Impressive. great work.
  • heathccheathcc Member Posts: 113
    The fact that it is so subtle is a compliment to how well that is done. Nice-
  • FranzKellerFranzKeller Member Posts: 517
    HADOKEN! and "Prepare to Qualify" (Pole Position)

    Good work there.

    Interesting that later SF games actually abandoned paralax floors?

    until now everything is polygon.

    Tatsunoko vs Capcom - GREAT!
  • UtopianGamesUtopianGames Member Posts: 5,692
    I'm loving your stuff m8...simply amazing.

    Darren.
  • forkliftforklift Member Posts: 386
    I think I just wet myself a little... just a drop... but it was worth it cause that sin curve road was amazing!
  • SparkyidrSparkyidr Member Posts: 2,033
    Here is a better version of the floor demo. I've lowered the number of pixels per segment, and also made a wider image than before. Looks nicer.



    I've also uploaded the Pseudo 3D template to incude this..as well as the 3d road corners stuff.

    http://gamesalad.com/forums/topic.php?id=16974

    :o)
Sign In or Register to comment.