Fog.

For questions about using Classic.

Post » Fri Sep 09, 2011 2:08 pm

So I've got this 256x256 fog 'texture' I turned into a tiled background object, and its image offset is infinitely moving it to the left to simulate slow moving fog.

Well that's great and all, but my levels are pretty big and I can't just stretch this tiled background object across the entire level..some people might get slowdown.

I can't make it the same size as screen and put it in a 0% scroll rate layer either; the fog would move with the scrolling and look really bad. (Can't use 0% scroll rate layers anyway, with zooming and all)

So0o0o how would some of you guys go about this?
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Fri Sep 09, 2011 2:12 pm

Have you tried simply setting the X position of the tiled background to ScrollXLeft in an always event?
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Fri Sep 09, 2011 2:16 pm

I imagine that would achieve the same effect as putting it in a layer with 0% scroll rate; the fog would move forward as you do and that wouldn't look very good!
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Fri Sep 09, 2011 2:19 pm

Ah, so you want it to act like it was stretched out over the whole level, but isn't. Can't you just add the distance from ScrollX to 0(+DisplayWidth/2) to the Xoffset of the tiledbg to achieve that effect?

EDIT More or less like this: http://dl.dropbox.com/u/2306601/offsetfog.capPixelRebirth2011-09-09 14:30:49
B
21
S
6
G
10
Posts: 1,024
Reputation: 7,445

Post » Fri Sep 09, 2011 2:30 pm

Oh hey that worked perfectly. Thanks!
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests