Is it a bad idea to have many-layered backgrounds?

For questions about using Classic.

Post » Tue Mar 29, 2011 4:59 pm

I see... but that brings me back to square one: how to make a tiled background(or even just sprites) scroll infinitely. :?
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Tue Mar 29, 2011 5:15 pm

Well, if you're not worried about having a ton of clouds everywhere, you can do the same thing in the .cap I posted but change scrollxleft and stuff to the edges of the layout. That way cloud repositioning won't be affected by your player's current position.

If you really want to use a tiled background object, just use this:

Always: Set cloud value 'scrollspeed' to 'scrollspeed' - n*timedelta
Set cloud offset to self.value('scrollspeed'), 0

Just make sure the cloud uses a pow2 texture.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Tue Mar 29, 2011 5:28 pm

[url:k6r576ih]http://dl.dropbox.com/u/666516/tdclouds.cap[/url:k6r576ih]
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Tue Mar 29, 2011 5:49 pm

Hmm... I think that one should work, newt. My only problem is that those clouds should only be moving when the camera scrolls instead of whenever the character moves, but I'm pretty sure I can set up MagiCam to help with that. I won't be able to try until later, but thanks again to both of you for taking the time to help me. :)
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Wed Mar 30, 2011 12:01 am

B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Sat Apr 02, 2011 7:50 pm

Welp, seems like I can't do that with MagiCam. Oh well.

DtrQ, that's almost exactly what I need. The only thing I'd want to add is that the clouds slowly scroll while the camera isn't moving, too. Sounds easy to do, but I'm not sure how to set that up... Any ideas?
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Sun Apr 03, 2011 1:36 am

B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Sun Apr 03, 2011 3:54 am

Looks absolutely perfect! I'll try to get it working in my project tonight. Not entirely sure how you did it, so hopefully copying it word for word will work. :P Thanks so much!

EDIT: Worked like a charm! Thanks again for your help (and everyone else, too!). Now I can finally move on to the rest of my project. :P
B
20
S
9
G
6
Posts: 607
Reputation: 6,112

Post » Sun Apr 03, 2011 4:14 am

Glad to help :)
And feel free to edit any numbers including pv to adjust scrolling speed you want.
TiledBG's pv "r" is individual scroll rate, btw
B
2
S
2
G
2
Posts: 158
Reputation: 1,366

Post » Fri May 11, 2012 8:41 am

How to make a sprite auto scroll like cloud ? (I'm newbie)
B
3
Posts: 4
Reputation: 438

PreviousNext

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 8 guests