Improved scrolling behaviour

Discussion and feedback on Construct 2

Post » Mon Jan 19, 2015 9:30 pm

Hi there,
This is my first post. First of all - love Construct 2!

I'm playing about with an idea for a platform game, but I didn't like the default scrolling behaviour - I want the player to see further infront of them when running. I tried the lerp scroll to example given here https://www.scirra.com/tutorials/626/making-a-smooth-following-camera but it sets the player close to the front edge of the screen when running forward - I want the opposite.

I created this project which pretty much does what I want (I'm pretty sure the calculations could be improved with lerp or something). I actually really like this behaviour - it's quite snappy but with a smooth effect and gives good visibility of the screen. Thought I'd share it (use arrow keys for controls):
https://dl.dropboxusercontent.com/u/9719255/games/BetterScrollTo/scroll/index.html

Here's the project download: https://dl.dropboxusercontent.com/u/9719255/games/BetterScrollTo/BetterScrollTo.capx

It needs some refinement but I really think this could be a good feature to add to the scroll to behaviour to avoid the requirement to do custom code like this - if scroll to had properties for xOffset, yOffset, cameraAdjustSpeed or something along those lines it could make the platform behaviour wil scroll to a bit more usable out of the box. Would appreciate your feedback - maybe this is already possible in a much simpler way!

Cheers,
Strak
B
3
S
1
Posts: 9
Reputation: 870

Post » Tue Jan 20, 2015 12:10 am

I'm using the MoveTo behavior for the camera in my game, It's work better than the lerp for me.
B
60
S
10
G
10
Posts: 1,013
Reputation: 9,155


Return to Construct 2 General

Who is online

Users browsing this forum: Baidu [Spider] and 6 guests