independant scrolling foreground and background... is it possible???

Started by KANDYMAN-IAC, Tue 27/04/2004 02:36:36

Previous topic - Next topic

KANDYMAN-IAC

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???
"Don't lose the bluecups they may be our only hope....!!1!!!1"

"I'm jealous of all of you guys, which means. I love your work, I just hate you as a person.... wait thats not right."

Gilbert

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.)

Scummbuddy

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
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

Hollister Man

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.
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

KANDYMAN-IAC

"Don't lose the bluecups they may be our only hope....!!1!!!1"

"I'm jealous of all of you guys, which means. I love your work, I just hate you as a person.... wait thats not right."

Gilbert

It's a test of scorpious' parallax plugin, which I mentioned. The plugin can be found here here.

Gilbert

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
(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.

Scummbuddy

heh, i thought it was parallax, but the folder i found it in on my harddrive said parallex, so i went with it.  :D
- Oh great, I'm stuck in colonial times, tentacles are taking over the world, and now the toilets backing up.
- No, I mean it's really STUCK. Like adventure-game stuck.
-Hoagie from DOTT

strazer

Excellent. Thanks Gilbert!
I try to avoid plugins as much as I can, it's just that SnowRain plugin that is sooo tempting... :)

Scorpiorus

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) :)

Hollister Man

Quotethe first version was indead mistakenly called parallex

First parralex and now indead... lol
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Scorpiorus

<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

SMF spam blocked by CleanTalk