Jibble

Author Topic: MODULE: Smooth Scrolling & Parallax v1.7.1  (Read 73532 times)

Icey

  • It's the time of ICEY!!!
    • Icey worked on one or more games that was nominated for an AGS Award!
If you mean you want the camera to stop moving the instant the player stops moving, then I'm afraid that;s not possible. As it is the player stops, and then the camera takes a short while to come to a stop smoothly.

To make the camera and player stop simultaneously the module would have to anticipate when the player was going to stop and start to slow down. I don't know how I'd script that. Also I think the effect would be unnatural, in film a camera operator rarely stops panning the instant an actor stops moving.
I see,but what i mean i want to have it how it is with this add-on, i want it to be were cego is walking & the camera follows like the module then it keeps follow ego so that he does not go off screen or so he doesn't have to get that close to the wall of the window & so it does not pause even time he get to the spot you click on.

basically when ever i click on an area he move to it and the camera follows then while he is walking i may need hime to go up and not left, the camera the pauses for a sec then starts following again

Ali

  • What will become of the baron?
    • Ali worked on one or more games that won an AGS Award!
    •  
    • Ali worked on one or more games that was nominated for an AGS Award!
I can't really understand your writing, is English your first language?

Is the problem is that the camera stops moving when the character is turning? In the demo, Roger will walk down the ladder then turn and cross the screen without the camera stopping completely. Perhaps you could try varying walking speed and scrolling speed so that the camera does not reach the player until he starts moving again. To alter the scrolling speed change the values of targetscrollspeedx and targetscrollspeedy.


Icey

  • It's the time of ICEY!!!
    • Icey worked on one or more games that was nominated for an AGS Award!

Hi

If I want the screen to scroll down as soon as i reach 99 pixels from the upper edge -  where in the script do i change this?


Ali

  • What will become of the baron?
    • Ali worked on one or more games that won an AGS Award!
    •  
    • Ali worked on one or more games that was nominated for an AGS Award!
On the off chance you come back to read this month-late response:

I'm afraid the scrolling threshold is set as a percentage of the screen height rather than at a certain pixel.

EDIT This is no longer true. See below:
« Last Edit: 08 Feb 2011, 16:09 by Ali »

Ali

  • What will become of the baron?
    • Ali worked on one or more games that won an AGS Award!
    •  
    • Ali worked on one or more games that was nominated for an AGS Award!
A PM from hedgefield revealed a bug in the Lucas Arts style scrolling. I've updated module and demo on the first post.

The biggest change is int EdgeX and int EdgeY which are the distance from the edge of the screen which the player must be before scrolling happens. Also, the module now scrolls based on the head of a character when moving up, and their feet when moving down.

If you're using the module please update! (And let me know how it's working!)
« Last Edit: 08 Feb 2011, 16:11 by Ali »

hedgefield

  • Oh snap!
    • hedgefield worked on one or more games that won an AGS Award!
    •  
    • hedgefield worked on one or more games that was nominated for an AGS Award!
A-MAZING. Works perfectly now. Thanks for the speedy fix! :D

Maybe I'm just thick but I've never used modules before :P How do I install/use this in my project?

-cheers

Dualnames

  • Local Moderator
  • Rottwheelers
  • Pretty Badass
    • Dualnames worked on one or more games that won an AGS Award!
    •  
    • Dualnames worked on one or more games that was nominated for an AGS Award!
Maybe I'm just thick but I've never used modules before :P How do I install/use this in my project?

-cheers

There: http://www.adventuregamestudio.co.uk/yabb/index.php?topic=37884.0
No more military army stuff. I'm alive and back.

ah, I see. Simpler than I thought, thanks!

Edit: NVM, i wasn't thinking properly xD fixed it
« Last Edit: 03 Apr 2011, 12:29 by Blobby 101 »

Hi!
Is there a way to disable the slowdown in scrolling? I want to use this nice module, but only the smooth scrolling part, so I want it to be as the default scrolling, just without the choppiness.
I found a commented line:
if (Centring == false && ScrollSpeedX < 0.5 && ScrollSpeedX > -0.5) ScrollSpeedX = 0.0;
       
This helps a bit, and tinkering with taargetspeed and slowdownrange, I also have results, but there's still some backgroundmovement, after the player stops.
Has anyone else experimented with this? Do you have any "best configuration" results?

Timeless Journey

Ali

  • What will become of the baron?
    • Ali worked on one or more games that won an AGS Award!
    •  
    • Ali worked on one or more games that was nominated for an AGS Award!
I'm not sure I understand what you want. How could the movement be smooth without easing in and out?

Incidentally that commented line was designed to get rid of double pixel jumps at the end of a slowdown, but isn't relevant in 3.2 because it moves the screen by single pixels.

Matti

I haven't followed this thread recently.. is this still impossible or are you planning to implement it:

to allow the viewport manipulation in parallax-rooms, so that it isn't depending on the player's coordinates?

It would be quite cool for a room in my current game.

I'm not sure I understand what you want. How could the movement be smooth without easing in and out?

Incidentally that commented line was designed to get rid of double pixel jumps at the end of a slowdown, but isn't relevant in 3.2 because it moves the screen by single pixels.

Hmm, you must be right there. Anyway I wanted to minimize the background movement after the player stops.
Thanks for the reply!

Timeless Journey

Ali

  • What will become of the baron?
    • Ali worked on one or more games that won an AGS Award!
    •  
    • Ali worked on one or more games that was nominated for an AGS Award!
To do that you can lower the slowdownrange for X and Y. Be sure to test it carefully and choose the right targetscrollspeed, because if the balance is off it will wobble to a stop.

qb

Hi,

any chance of reuploading the module? The links don't work, propably due to inactivity. I can also help with mirroring them if needed.

Ali

  • What will become of the baron?
    • Ali worked on one or more games that won an AGS Award!
    •  
    • Ali worked on one or more games that was nominated for an AGS Award!
I've re-uploaded the module and added mirrors thanks to qb. See first post!

This is a great Module, thanks!
"We do not stop playing because we grow old, we grow old because we stop playing."

Joe

  • Anywhere you think I am, I am
    • I can help with scripting
    • I can help with translating
    • I can help with web design
Hey! I really like the smooth scrolling. I'm using it with my game but I'd really like to delete the paralax part. I know I can call the SmoothScroll_PxOn(); function... but I just don't want to have unnecessary code in my game.

Would someone be so kind to make a only-smooth-scrolling module from this one?

Thanks.

Joe
Copinstar © Oficial Site

Ali

  • What will become of the baron?
    • Ali worked on one or more games that won an AGS Award!
    •  
    • Ali worked on one or more games that was nominated for an AGS Award!
I'm not able to do it right now, but I'll try to trim that part out when I get a chance. You are right that the bulk of the module is parallax.

UPDATE:
A stripped down version of only-scrolly is here!
http://www.gamefront.com/files/21076580/Smooth+Scrolling+Basic.scm
« Last Edit: 11 Dec 2011, 17:39 by Ali »