Page 1 of 1

Line scrolling

Posted: Wed Aug 24, 2016 10:38 am
by Boyfinn
Im trying to achieve a repeating and scrolling ground that uses rasterization for perspective like in street figter 2
Image
the same effect can be seen in the first level of "The Adventures of Batman & Robin"
https://youtu.be/zz4eQygXpRY?t=1m39s

What would be the most efficient way to approach this? Does anyone have any snippets or examples of how this could be done?
Thanks.

Re: Raster perspective for background layer.

Posted: Wed Aug 24, 2016 5:43 pm
by Miquel
My best guess is this is doing using horizontal scroll per line. Very much like full plane scroll, you apply to every line the same value except the ones which are doing this effect which have higher rations of scroll as they are close to the viewers eye.

Perhaps someone can tell more details.

Re: Raster perspective for background layer.

Posted: Wed Aug 24, 2016 7:10 pm
by KanedaFr
Some details are available on the infamous Lou's Pseudo 3D page

Re: Raster perspective for background layer.

Posted: Wed Aug 31, 2016 1:13 pm
by Boyfinn
I found

Code: Select all

VDP_setHorizontalScrollLine
in the documentation.
Does this work the same way?

Re: Raster perspective for background layer.

Posted: Wed Aug 31, 2016 1:42 pm
by Stef
That is indeed the method to use to apply the horizontal line scrolling allowing that effect :)

Re: Raster perspective for background layer.

Posted: Wed Aug 31, 2016 5:20 pm
by Boyfinn
any examples how this could be implemented with that method?

Re: Raster perspective for background layer.

Posted: Tue Sep 13, 2016 6:00 pm
by Boyfinn
Okay i got i somewhat working, however im getting some lines that move and some that dont and they look overlapped&garbledImage

Re: Raster perspective for background layer.

Posted: Thu Nov 23, 2017 6:01 pm
by Boyfinn
Would anyone here have some example code of how to use VDP_linescroll properly?
EDIT: i got the scroll lines working properly, but now when i'm trying to do vertical tile scrolling using the same method, all the tiles scroll the same amount for some strange reason.

Re: Line scrolling

Posted: Wed Nov 29, 2017 9:36 am
by Stef
You need to define the scroll mode to vertical tile first.

Re: Line scrolling

Posted: Wed Nov 29, 2017 1:53 pm
by Boyfinn
I see, it first didnt work, but then i looked through the docs and found out that the vertical tile scrolling mode is called VSCROLL_2TILE and not just VSCROLL_TILE