Scrolling background?

For questions about using Classic.

Post » Sun Dec 13, 2009 6:13 am

Hi,

I was using MMF2 Dev for awhile and after just a short time (less than a few hours) with Construct, I believe I'm hooked. I can't believe this thing is free! :)

Anyway, I struggled mightly with proper scrolling in MMF2 Dev, but I was able to make this happen easily in Construct using the "Car" movement for the background. BUT, I wanna know how to do scrolling in the way it was intended.

I'm trying to make one background picture scroll as one character runs across the background:

Character runs right =========>
Background moves left <=======

What Event settings do you use to make this happen?
B
2
G
3
Posts: 42
Reputation: 934

Post » Sun Dec 13, 2009 6:46 am

You should check out some tutorials such as the ghost shooter and platform school. They will teach you how to do all the basics in construct.

As for making scrolling backgrounds just check on center view on me and unbounded scrolling and then construct will make the backgrounds scroll automatically.
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Sun Dec 13, 2009 7:33 am

[quote="Aeal5566":1cnr6e7e]You should check out some tutorials such as the ghost shooter and platform school. They will teach you how to do all the basics in construct.

As for making scrolling backgrounds just check on center view on me and unbounded scrolling and then construct will make the backgrounds scroll automatically.[/quote:1cnr6e7e]

You don't need unbounded scrolling to scroll. Only if you want to scroll beyond the borders of the layout.

Anyway, yeah... Platform School is here:
viewtopic.php?f=8&t=2154

Be sure to read the big, flashing warning message at the top.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Dec 13, 2009 3:18 pm

I did the Ghost tutorial exactly... it didn't work. The character moves to the right but the background never scrolls.

Also, it says to use the Tile object for the background. This makes my background look bad. I'm making a Football game and the background is a complete picture of a crowd of fans. My background has to be one solid picture so the tile effect makes it look awful.

I ran into these same problems with MMF2.
B
2
G
3
Posts: 42
Reputation: 934

Post » Sun Dec 13, 2009 3:36 pm

did you put center view on me on?
is the layout bigger than your screen size?
also for your crowd did you make it so that it tiles?
B
5
S
2
G
4
Posts: 632
Reputation: 2,829

Post » Sun Dec 13, 2009 3:43 pm

[quote="Aeal5566":1yznmhq8]did you put center view on me on?[/quote:1yznmhq8]

Yep. I followed along with the Swedish gentleman's video.

[quote="Aeal5566":1yznmhq8]is the layout bigger than your screen size?[/quote:1yznmhq8]

Do you mean bigger than my monitor size? No. I have the project set to 1920x1080, and my monitor is 1920x1080.

[quote="Aeal5566":1yznmhq8]also for your crowd did you make it so that it tiles?[/quote:1yznmhq8]

I just selected the Tile object like the tutorial says. Initially last night I put the background in as a sprite and it looked fine, but I took that out because I figured maybe the background is not supposed to be used with the Sprite object? Either way, it didn't scroll as a sprite until I applied the car movement to it, but I got rid of that too because of course that's not the proper way to scroll... but if I can't get it to scroll any other way I may go back to it.

I'm really confused as to why it's not working.
B
2
G
3
Posts: 42
Reputation: 934

Post » Sun Dec 13, 2009 4:03 pm

[quote="MaxMan777":u44qliqp][quote="Aeal5566":u44qliqp]is the layout bigger than your screen size?[/quote:u44qliqp]

Do you mean bigger than my monitor size? No. I have the project set to 1920x1080, and my monitor is 1920x1080.[/quote:u44qliqp]





You need a layout that is larger than the size of your window in order to scroll. If your level is the same size as your screen, what is there to scroll to?


(Unless, as mentioned previously, you check Unbounded Scrolling in order to scroll outside the boundary of the layout.)
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Sun Dec 13, 2009 4:05 pm

^^^ Right. Thanks. Let me check that to make sure, I probably didn't set that correctly.
B
2
G
3
Posts: 42
Reputation: 934

Post » Sun Dec 13, 2009 4:35 pm

Yep, you were right deadeye. I had the window property value set too large. It scrolls now.

But the one thing I'm still having trouble with is getting the scrolling to start the moment the player moves. It lags a bit and I suppose it's waiting for the character to reach a predetermined spot before the scrolling begins.

Is there a way to get the scrolling to start immediately as the character moves?
B
2
G
3
Posts: 42
Reputation: 934

Post » Sun Dec 13, 2009 4:37 pm

Is your player close to the edge of the screen? You could start him in the middle of the layout.

Or put a check in the box next to the oft-mentioned "Unbounded Scrolling" option in your layout properties.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 9 guests