Infinite Tiled Scroll Paralax

Get help using Construct 2

Post » Fri Dec 06, 2013 8:09 pm

I know how to scroll infinitely horizontally and vertically, and I can figure out how to do them at the same time, however, as soon as I throw parallax 50,50 into the mix, I can't seem to get it right.

Anybody had any luck with this?AnD4D2013-12-07 10:36:32
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717

Post » Fri Dec 06, 2013 11:50 pm

Not sure on the way you are trying it, but there's a plugin called "sprite sheet" that offsets a tiled background, you can use that to create an infinite scrolling bg as well.

B
82
S
39
G
15
Posts: 983
Reputation: 16,714

Post » Sat Dec 07, 2013 9:04 am

@justifun

Sorry I should have clarified. I have no issues making the sprite. My problem is having that sprite loop seamlessly in all directions while scrolling in Construct 2 when using a tiled background and 50,50 parallax.
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717

Post » Sat Dec 07, 2013 9:23 am

Could you explain how you have your events set up, for the way I would choose to do it Paralex wouldn't have any effect on it.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Dec 07, 2013 10:25 am

@LittleStain

Here ya go!

https://dl.dropboxusercontent.com/u/50465867/Construct/Scrolling.capx

Play it as it is, and it should scroll fine. Change the parallax to 50,50 and it breaks.

Also, could you try changing the default movement from bullet to 8 direction or car movement? Does that break the program for you?
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717

Post » Sat Dec 07, 2013 4:23 pm

Ok, gonna bump this one I'm afraid, as I am working on a very tight deadline... SORRY!!!

If anyone can help, it would be greatly appreciated!
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717

Post » Sat Dec 07, 2013 4:59 pm

Here's a quick demo. It's not exactly modular, but it doing essentially what you want to do.

The offset values for moving the background can be applied to enemies too.

http://johnnysix.net/games/infiniteparallax/

http://johnnysix.net/games/infiniteparallax.capx

Image
B
27
S
9
G
5
Posts: 488
Reputation: 11,948

Post » Sat Dec 07, 2013 6:46 pm

Thanks, I ended up just setting the size to crazy high. Not sure what problem that will cause, but will give your method a go if I see some problems :)
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717

Post » Wed Dec 11, 2013 10:53 am

I tried the way posted, and it appears to be overly complicated.

Might there be a simple way to set this up?
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
79
S
12
G
7
Posts: 961
Reputation: 10,717

Post » Wed Dec 11, 2013 12:49 pm

The issue here is the scrollx and scrolly

By changing the paralex of the layer scrollx and scrolly are not related to the layer anymore.

I think your setup would work if you change scrollx with (viewportleft(0)/2) and scrolly with (viewportbottom(0)/2)

the (0) behind the viewportleft determines the position on layer 0 that is in the middle of the viewport, so it should also work if the layer uses different paralex.
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Next

Return to How do I....?

Who is online

Users browsing this forum: davidbox, Mayfly, Yahoo [Bot] and 4 guests