Line scrolling

SGDK only sub forum

Moderator: Stef

Post Reply
Boyfinn
Very interested
Posts: 57
Joined: Sat Aug 08, 2015 12:12 pm
Location: Lapland, Finland

Line scrolling

Post 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.
Last edited by Boyfinn on Thu Nov 23, 2017 11:31 pm, edited 1 time in total.
Miquel
Very interested
Posts: 514
Joined: Sat Jul 30, 2016 12:33 am

Re: Raster perspective for background layer.

Post 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.
HELP. Spanish TVs are brain washing people to be hostile to me.
KanedaFr
Administrateur
Posts: 1154
Joined: Tue Aug 29, 2006 10:56 am
Contact:

Re: Raster perspective for background layer.

Post by KanedaFr »

Some details are available on the infamous Lou's Pseudo 3D page
Boyfinn
Very interested
Posts: 57
Joined: Sat Aug 08, 2015 12:12 pm
Location: Lapland, Finland

Re: Raster perspective for background layer.

Post by Boyfinn »

I found

Code: Select all

VDP_setHorizontalScrollLine
in the documentation.
Does this work the same way?
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Raster perspective for background layer.

Post by Stef »

That is indeed the method to use to apply the horizontal line scrolling allowing that effect :)
Boyfinn
Very interested
Posts: 57
Joined: Sat Aug 08, 2015 12:12 pm
Location: Lapland, Finland

Re: Raster perspective for background layer.

Post by Boyfinn »

any examples how this could be implemented with that method?
Boyfinn
Very interested
Posts: 57
Joined: Sat Aug 08, 2015 12:12 pm
Location: Lapland, Finland

Re: Raster perspective for background layer.

Post by Boyfinn »

Okay i got i somewhat working, however im getting some lines that move and some that dont and they look overlapped&garbledImage
Boyfinn
Very interested
Posts: 57
Joined: Sat Aug 08, 2015 12:12 pm
Location: Lapland, Finland

Re: Raster perspective for background layer.

Post 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.
Stef
Very interested
Posts: 3131
Joined: Thu Nov 30, 2006 9:46 pm
Location: France - Sevres
Contact:

Re: Line scrolling

Post by Stef »

You need to define the scroll mode to vertical tile first.
Boyfinn
Very interested
Posts: 57
Joined: Sat Aug 08, 2015 12:12 pm
Location: Lapland, Finland

Re: Line scrolling

Post 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
Post Reply