[Behavior] Parallax Background Addon for C2/C3

  • I’ve been using the built-in parallax system for a long time, it worked fine for 1 or 2 backgrounds, but when you try doing anything serious with it, it feels incomplete and painful to use.

    I needed to have multiple backgrounds, each with its own scrolling rate. So I had to make like a hundred layers and fiddle with their properties. No way, that’s way too tedious!

    I needed my backgrounds to stretch across the screen to give the illusion that the game world was infinite. After many hours wasted on the event sheet, I was so frustrated and my code could barely work. What a pain in the a$$!

    I needed my backgrounds to look good no matter the zoom level, but as soon as I changed the layout size, everything went bonkers, and I needed to re-write my events from scratch. How aggravating!

    I also wanted to add animated torches and smoke in the background. I needed single objects that don’t stretch or tile around the screen like the sun, a windmill in the distance or a planet in a top-down space game.

    I needed more control over my backgrounds. And I believe you do too.

    The Parallax Addon for Construct 2 and Construct 3 will help you painlessly add layered, parallax-scrolling backgrounds of all kinds in your game.

    The addon is made of 4 behaviors. They were designed with ease of use and simplicity in mind.

    It feels amazing finally being able to have beautiful layered backgrounds in your game without spending like a gazillion hours juggling events and layers.

    List of Features

    • Includes behavior files for Construct 2 (.c2adon) and Construct 3 (.c3addon).
    • Supports animated (Sprite-based) and non-animated (Tiledbackground-based) backgrounds.
    • Supports horizontal scrolling, vertical scrolling, and top-down scrolling in all directions.
    • Supports screen wrapping in all directions in two distinct modes: stretching and tiling.
    • Only requires 1 layer. You can have hundreds of backgrounds in one layer.
    • Accomodates runtime screen size changes.
    • Accomodates runtime layout scale changes (zooming in and out).
    • Supports all full-screen scaling modes, all layout/screen sizes and all layout scrolling modes (bounded and unbounded).
    • You always have full control over your backgrounds at runtime: you can move them, rescale them, change the tile size, and the addon will react to your changes and keep everything looking nice and good.
    • Initially made for horizontal scrolling games, now it works for vertical scrollers and top-down games as well.
    • All properties are fully exposed in the debugger.
    • Supports saving and loading.
    • Blazing fast performance on browser and mobile.
    • Demo projects that cover horizontal scrolling, vertical scrolling, auto-scrolling and top-down scrolling.
    • A detailed and easy-to-read manual to quickly get you started.

    Without your support, this addon wouldn't exist

    Purchasing a license on the Scirra store keeps this addon alive and always evolving.

    If you did purchase a license, thank you for your support!

    If not, then it's okay, you still get to use all the features available in the paid version for free.


    Overview of the features in version 1.1

    Demo of version 1.0


    (Latest) Version 1.2.0 (April 27, 2018)

    Version 1.1 (April 15, 2017)

    Version 1.0 (December 18, 2015)


    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 gameplaypassion at gmail.com or post a reply below.

    Want more?

    Health completely manages the energy systems in your game, from health, mana to armor and the whole chebang! It's packed with features: health/mana/energy regeneration, invincibility, damage and death conditions, and a lot more.

    Finite-state machines are the backbone of more advanced games. They take away the headache of organizing your events. FSMs are incredibly useful to organize your game menus and GUI, and also your enemy AI. The solution I made is lightweight, simple to use, and it will get the job done while keeping your events sheets nice, clean and organized.

  • Gonna try this, looks too good to have no comments so far.

  • Zebbi lol, thanks, enjoy!

  • 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.

  • kühl, thanks for sharing

  • This is possible with layers?

  • 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.

    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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Oh thought so, nice plugin btw.

  • Wonderful add on thank you friend

  • 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.

  • Thank You

  • Why this behavior changes the width of background object?

  • Why this behavior changes the width of background object?

    The behavior uses the original texture's width. It sets the object's width to N times the texture width. Where N is computed so that the background will cover the entire screen.

    For example, if the texture is 100 pixels wide, and the screen is 800 pixels wide, then this behavior will set the background's width to 1000 pixels.

    Why? Because that's easier than using the initial object's width, or a custom property, instead of the texture width.

    I want to avoid scenarios where a user might add this behavior to one of her backgrounds and forget to set its width properly, causing the background to not wrap seamlessly at runtime.

    The behavior is specific to side-scrolling games. I could have implemented a lot of possible scenarios and added a lot of parameters, actions, conditions, etc. However, in practice, most developers would want their background object to display the whole texture.

    If the texture itself is not tileable, it would be useful to have the ability to tell the behavior which width to use in an action or as a property. But then again, most developers will use tileable background images made by an artist who spent a lot of time making sure the texture is seamless, so there is no need for the behavior to handle this case and over-complicate things for the user.

    I hope I answered your question

  • Thanks. It seems that this behavior only suitable for tile background object only, background made by sprites would have problem since the width had been extended.

  • Thanks. It seems that this behavior only suitable for tile background object only, background made by sprites would have problem since the width had been extended.

    Yes, I designed this behavior to be mainly used for TiledBackground objects. I have not tested it with sprites.

    Thank you for checking it out!

    Edit (2018): Now the behavior supports Sprites as well.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)