Ok, i've been playing broken sword 2 recently, and noticed that in a lot of (if not all scenes) there is a forground that scrolls independantly to the background...
Is this possible to create in ags?? i have made some sketches and want to use it myself but can 't figure how to script it.
it logically should work like this... the background is actually the interactive scene, the foreground is shorter in width, and takes up very minimal amount of space, but gives the illusion of the room having definiate shape all around.
when the character walks along a long room the foreground (that is shorter than the background) scrolls at the same time as the scene the character is walking through, but at a slower speed to compensate. So that the foreground doesnt run out before the end of the screen.
How would i accomplish this???
Well, use an object/character/graphics overlay that's placed on top of the screen, and control its position via script.
(Or use plugins, I think the parallax scrolling plugin is for this sort of things, but as I never care for plugins, I'm not sure.)
its called parallex scrolling. Someone, who didn't mention themselves in a readme file, nor in the global script, made 'Parrallax Demo View v1.0' which I have and is not out of date. I also seem to be missing a .dll file associated with this. Basically the template shows mountains being moved.
Heres a zip file of everything I had with this previous download.
Parallex scrolling (http://www.2dadventure.com/ags/Parallex_scrolling.zip)
That's parallax, with three a's, not all in a row. (Well, that's how my programming class book recorded it.)
I think the idea KM is looking at is slightly different, actually the opposite. Where regular parallax makes objects in the distance appear to be moving slower, KM is talking about a "frame," such as if someone were looking through a window. They could always see the frame, but could also "scroll" their view around inside the room.
Hollister man has got it quite right....
It's a test of scorpious' parallax plugin, which I mentioned. The plugin can be found here here (http://geocities.com/scorpiorus82).
Alright, I tried and hacked the demo to not using that plugin. You may try it out if you like:
http://s11.yousendit.com/d.aspx?id=8ECB6BDD09E2ADD19E19A8CC3B93C2A7 (http://s11.yousendit.com/d.aspx?id=8ECB6BDD09E2ADD19E19A8CC3B93C2A7)
(7 days left ;D)
(You may need at least V2.6sp1 to compile it)
EDIT: didn't see the frame comments, but for a frame, it's even simpler, just use a overlay or a GUI as the frame, and it won't scroll automatically with the background.
heh, i thought it was parallax, but the folder i found it in on my harddrive said parallex, so i went with it. :D
Excellent. Thanks Gilbert!
I try to avoid plugins as much as I can, it's just that SnowRain plugin that is sooo tempting... :)
Quote from: Scummbuddy on Tue 27/04/2004 07:24:43
heh, i thought it was parallax, but the folder i found it in on my harddrive said parallex, so i went with it. :D
hehe, the first version was indead mistakenly called parallex. I had corrected the mistake but forgot to update the plugins page (done now) :)
Quotethe first version was indead mistakenly called parallex
First parralex and now indead... lol
<offtopic>
Heh, this time it's 'a' instead if 'e'. Well, I should sleep a little more... and I wish I had a chance.
~Cheers