AGS Support > Modules & Plugins
MODULE: Smooth Scrolling & Parallax v1.7 - Whatchu Lookin' At?
Ali:
The Smooth Scrolling & Parallax module is available here:
Version 1.7
http://ali.agser.me/smooth_scroll_1_7.zip
(Please reply or PM me if you can host a mirror)
Module History:
v1.7 - Added targetCharacter pointer to make camera animation possible without switching player characters.
v1.6 - Added LucasArts style scrolling triggered by proximity to the edge of the screen.
v1.5 - Fixed a major problem with objects not returning to the correct position when leaving and re-entering a room.
v1.4 - Cleaned up script and improved suspension of scrolling effect.
Added this module history!
v1.3 - Added option to switch smooth scrolling off and on.
v1.2 - A wider range of parallax speeds.
Less jerky stopping.
Pixel perfect object movement at slow speeds (not for animated objects, requires a bit of work).
Up to 25 parallax objects.
Smooth sun/moon parallax.
LENS FLARE EFFECT!
v1.1 - Formatted module according to AGS programming conventions.
Old Versions:
http://www.gamefront.com/files/20824317/smooth_scroll_demo_1_6_zip
Mirror courtesy of qb:
http://www.fallen-brothers.com/ags/smooth_scroll_demo_1.6.zip
http://www.gamefront.com/files/20824319/Smooth_Scrolling___Parallax_scm
Mirror courtesy of qb:
http://www.fallen-brothers.com/ags/Smooth%20Scrolling%20%26%20Parallax.scm
Notes:
For better lens flares talk to Mr Ryan Timothy...
'Parallax' may STILL not be spelled consistently in documentation.
The module hasn't been tested pre AGS 3.2, but I think it should work. Let me know if it doesn't.
subspark:
--- Quote ---I would also appreciate suggestions on how to create different layers of foreground objects
--- End quote ---
Do you make your background art in Photoshop? If you do I suggest you work with as many layers as possible and then once your background art is complete collapse as many as you can into groups of background_far, background_close, midground_far, midground_close, foreground.
Note the extreme closup objects like the golf clubs in the following DOTT screenshot:
And the scientific instruments in the foreground of this fate of atlantis screenshot:
The important thing to remember is to build your background environments from the bottom up. From the background to the foreground and not vice versa.
You need the information behind each layer in order for there be something to look at when the objects move from side to side. So if you start with the background and keep adding onto it with new layers, then keep all your necessary layers in tact then you'll have very little to worry about.
Save each layer out with either an alpha channel or a constant background color. You then recompose your scene layers using your sprites in AGS.
Does this make sense?
--- Quote ---Also, objects in the far distance, like the sun in the demo, look very jerky.
--- End quote ---
The reason for this is that they are only moving one pixel at a time. This is generally countered by a technique called subpixel movement where the edges of the sprite will blend into the background (antialiasing) to compensate for the movement. Heres an example:
This is what is happening in your scene:
Your sprites are being shifted as a whole by 1 pixel.
This is what needs to happen in AGS to solve the general jerkyness of sprites:
The same scene has been rendered with sub pixel smoothing in after effects.
Cheers,
Paul.
Iceboty V7000a:
Please don't post images directly from MobyGames, as they won't show up in a post (unless you had visited the page and had it in your browser cache), I think just posting the link to the page that contains the screenshot may work. As I don't know what page your image's from, I can't fix it for you. Please try to fix it.
subspark:
Don't worry Gilbot. I noticed it hadnt worked so I changed it while you were posting. Your message got here first but I didn't notice it until I finished editing my post.
Do you sleep man? You seem to catch me out about 15 seconds after I do something. ;) It's 4pm here in Australia. Where are you based?
Thanks,
Paul.
Iceboty V7000a:
It's 1:00 pm here, and I'm in the office.
Also, the link doesn't work, as you still link to the image directly. You need to link to the page in MobyGames that contain the image to work.
Navigation
[0] Message Index
[#] Next page
Go to full version