[Behavior] Parallax background for side-scrolling games

Post your completed addons to share with the community

Post » Fri Dec 18, 2015 6:41 pm

Have you already tried adding parallax backgrounds to a side-scrolling game?

If yes, then you know how much pain it is!

You have to figure out how to position your backgrounds/foregrounds correctly,
... how to apply parallax effects from the bottom of the layout (floating mountains ? Been there!), :oops:
... how to make backgrounds wrap around the screen as the player scrolls in a random direction, :o
... and most of the time you will rage-quit after dealing with lots of layers, each with its own parallax value. :evil:

Using this addon, you can get a nice parallax effect for your game in no time! ;)

Features
  • You can place all your backgrounds in the same layer if you wish.
  • Easily implementable parallax backgrounds that wrap around your layout!
  • You have full control over your backgrounds, they stay exactly where you place them in the editor, no matter how big your screen or layout are!
  • Backgrounds fully adapts to your screen size, zoom, or layout size. Everything stays smooth no matter what you do to your viewport!
  • Ideal for side-scrolling games such as platformers, infinite runners, shooters, … etc.
  • Detailed manual for painless integration in your project.
  • Examples projects provided
  • Can be used with Tiledbackgrounds (in 1.0), but also with animated Sprites (coming soon in 1.1)

Videos
Overview of the features in version 1.1
Demo of version 1.0

Downloads
(latest) Version 1.1 (uploaded: 02 Feb 2017, small bug fix: 15 April 2017)
Version 1.0 (18 Dec 2015)

If you find this addon useful, please consider purchasing a license on the Scirra store: https://www.scirra.com/store/construct2-behaviours/parallax-background-1807


Demo Game (arrow keys to scroll, X/C to zoom) (will be reuploaded soon)

Image

Terms
You are allowed to use this addon in your personal or commercial games, you are not allowed to resell it as is, or as a part of a template or an addon, you are not allowed to distribute it for free in your free templates or addons, instead, please redirect your users/clients to this forum thread or to the product page on the asset store.

For questions or bug-reports, please contact me at [email protected] or post a reply below.
Last edited by Zed2100 on Sat Apr 15, 2017 9:16 pm, edited 5 times in total.
ImageImage
B
43
S
13
G
10
Posts: 164
Reputation: 7,650

Post » Sun Dec 20, 2015 5:03 pm

Gonna try this, looks too good to have no comments so far.
B
41
S
12
G
14
Posts: 1,120
Reputation: 11,259

Post » Sun Dec 20, 2015 5:46 pm

@Zebbi lol, thanks, enjoy!
ImageImage
B
43
S
13
G
10
Posts: 164
Reputation: 7,650

Post » Sun Dec 20, 2015 5:59 pm

It is interesting.
Had a few crashes though - browser having to stop the script. Haven't pinned it down yet, but if I do, I'll post here.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
134
S
30
G
86
Posts: 5,418
Reputation: 59,522

Post » Sun Dec 20, 2015 6:48 pm

kühl, thanks for sharing
B
80
S
29
G
136
Posts: 213
Reputation: 74,077

Post » Sun Dec 20, 2015 7:21 pm

This is possible with layers?
B
10
S
1
G
1
Posts: 63
Reputation: 840

Post » Sun Dec 20, 2015 7:30 pm

Paperbeemo wrote:This is possible with layers?


You can put your TiledBackground instances with the ParallaxBG behavior in the same layer or in different layers if you wish. It works in both cases. You don't need to change the Parallax values of your layers, the behavior uses its own parallax algorithm inside.

zenox98 wrote:It is interesting.
Had a few crashes though - browser having to stop the script. Haven't pinned it down yet, but if I do, I'll post here.


That's probably due to the way recent versions of browsers handle HTML5 features for games hosted on the web. I host the demo on dropbox so I don't know if that's the cause, but that has nothing to do with the behavior though. You can test it in preview mode, I have no such problem on my end.
ImageImage
B
43
S
13
G
10
Posts: 164
Reputation: 7,650

Post » Sun Dec 20, 2015 9:05 pm

Oh thought so, nice plugin btw.
B
10
S
1
G
1
Posts: 63
Reputation: 840

Post » Mon Dec 21, 2015 10:28 am

Wonderful add on thank you friend
B
252
S
39
G
15
Posts: 1,964
Reputation: 40,753

Post » Mon Dec 21, 2015 12:29 pm

Thank you all for your nice words, I'm glad you find this addon helpful.

This addon is production-ready, you may use it in your published game with confidence.

I want to thank some users who bought my Parallax Background template for their helpful feedback. They've inspired me to make this addon.

Please enjoy it, and if you find any scenario that causes bugs or glitches please inform me and I will update the code to handle it.
ImageImage
B
43
S
13
G
10
Posts: 164
Reputation: 7,650

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests