Tuesday, July 04, 2006

Simulated Layered Scrolling

After many hours, I have advanced scrolling working in ProSonic. By advanced, I mean it doesn't just take the background and move it across the X axis at a given speed. It scrolls vertically too, and it can simulate layers. This means that designers will be able to split the background into sections and have each section scroll at a different speed both horizontally and vertically. Most levels in the original Sonic games didn't take advantage of moving different layers at different speeds vertically. It wasn't until Sonic the Hedgehog 3 that this was done (the water in Hydrocity and Launch Base). My engine fully supports it.



Obviously the background looks messed up in the picture, but it's supposed to demonstrate how the sky can be split into seperate sections that scroll at different speeds. Each layer will be able to have it's own filter to use too. This is all done on a single plane which means it won't slow the engine down much at all.

9 comments:

Anonymous said...

WOW!! Sax you're so cool!!

Null Epsilon Vista said...

Niiiiice. Now when I try to do paralaxes, i don't have to physicaly split the background into layers.

Anonymous said...

How many layers is that capable of handling? o.o This is pretty amazing stuff, man.

Damian said...

It's currently capable of handling up to 256 layers. If I find reason for it, I could even support up to 65536 layers, but I'm thinking that would be over-kill.

Anonymous said...

I believe that would be overkill, Sax. 256 layers is more than enough. I suspect only a limited number of ProSonic users would use all the layers.

I have one question - can ProSonic switch from X-axis scrolling to Y-axis scrolling in real time?

Damian said...

I'm not sure I entirely understand the question. But let me try to clarify something: It does allow both X and Y axis scroll, and it can do them both simultaneously. My scripting language... which has been put on hold for now by the way, will allow you to modify the parameters of the background. In the engine code, the layers are actually called "cameras", and so these cameras have attributes, and you will be able to change them using the scripting language. Each level will have a script that will run. You can say "if player is at such-and-such position, set scrolling X speed to blah-blah"... something like that. It'll be very flexible.

Anonymous said...

Excellent. Keep up the good work, SAx.

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

Haha, you haven't learned a thing.