Animated Offset Scroll in Tiled Background *Problem*

For questions about using Classic.

Post » Mon May 09, 2011 10:13 pm

Hi, i was figured out how to make an animated offset scroll without moving the layout screen, i really don't understand how they did this source file:

http://dl.dropbox.com/u/7658043/scrollingback.cap

I recreated an animated offset background, there a 2 .caps
-Good Scroll (i didn't make this, i modified this from scrollingback.cap to study how it works)
-Bad Scroll (Yes, i made this and i didn't want it... i wanted to know how it works from Good Scroll example)

[url:25xnva56]http://cl.ly/1A3c0E300J1S442E1l1O/ScrollProblems.zip[/url:25xnva56]
I wasted 2 hours while i'm figuring out how to make good scroll, would you help me?

Thanks!
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Mon May 09, 2011 10:23 pm

Create a new layer and set it's "scroll x rate" and "scroll y rate" to 0. Then move the tiledbackground objects to the new layer.
B
79
S
24
G
54
Posts: 4,738
Reputation: 40,739

Post » Mon May 09, 2011 10:30 pm

[quote="R0J0hound":r18ksm1b]Create a new layer and set it's "scroll x rate" and "scroll y rate" to 0. Then move the tiledbackground objects to the new layer.[/quote:r18ksm1b]

Ahh, it worked! i didn't know about scroll rate... anyways, thank you! :D
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Mon May 09, 2011 11:06 pm

A little problem... i still don't know how to animate one background image goes to below, i tried to change scroll rate 0 to 100 in this snow map layer (layer 4), but every objects affected incorrect position like bullets and enemies....

http://cl.ly/1B2I123E410Q2w1U181R/howanimatescroll.cap

Edit: is located in "Mission 1" from layouts folder
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Wed May 11, 2011 1:03 am

Bump, I'm sorry!

I bump threads when the problem is still not solved...
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638

Post » Thu May 12, 2011 2:23 am

Layer scrolling only works if your layout is bigger than the screen, and you are moving the camera.

Your game does neither of those things.

You can scroll the Tiled Background texture of the snow and trees the same way you are doing the clouds, by moving the offset, but you have to make your texture size a square power of 2. In other words, it needs to be 128x128, 256x256, 512x512, etc...
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Thu May 12, 2011 6:41 am

[quote="deadeye":1mxcuwm0]Layer scrolling only works if your layout is bigger than the screen, and you are moving the camera.

Your game does neither of those things.

You can scroll the Tiled Background texture of the snow and trees the same way you are doing the clouds, by moving the offset, but you have to make your texture size a square power of 2. In other words, it needs to be 128x128, 256x256, 512x512, etc...[/quote:1mxcuwm0]

It worked!

I made a 512x512 background then it worked like a charm... i didn't know about the size matters. I made a 640x640 image and it didn't work, i guess it should be only for tile backgrounds. Thanks!
B
96
S
25
G
20
Posts: 3,052
Reputation: 22,638


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests