[Behavior] Parallax background for side-scrolling games

Post your completed addons to share with the community

Post » Wed Feb 14, 2018 6:35 pm

AnD4D wrote:@Zed2100 This is a very interesting plugin, however it doesn't appear to be working the way I expected. Is this only for horizontal items?

To test it out, I placed a sprite out, scattered randomly across the layout. Upon running it, however, the plugin pulls all the sprites back to the exact same Y position, meaning they're now all in a line.

Say for example I wanted to create a starmap, with objects all over the place. With this plugin, I can't get it to refrain from setting the Y axis to the same position.

Could you confirm whether or not I'm doing something wrong? Or is this by design?


The behavior takes full control of the Y position of your sprites, it's designed for side-scrolling games (platformers, runners, side scrolling shooters) where backgrounds are supposed to be "grounded", ie their Y position will be computed starting from the bottom of the layout.

I don't know the specifics of your implementation, but I guess you're better off handling the placement of the objects through the event sheet, or by using a parallaxed layer.
ImageImage
B
45
S
14
G
10
Posts: 170
Reputation: 7,822

Post » Thu Feb 15, 2018 2:14 am

Agreed. I found a single event solution for this problem. For some reason I'd never thought about using division for parallax before.
B
94
S
18
G
8
Posts: 1,026
Reputation: 12,378

Post » Thu Feb 15, 2018 12:57 pm

AnD4D wrote:Agreed. I found a single event solution for this problem. For some reason I'd never thought about using division for parallax before.


Glad you found a solution.

Implementing a custom parallax effect can be tricky. In case you wish to further improve your solution, I'm selling a template version of this plugin, I believe it's a good example of implementing a custom parallax effect through the event sheet.
ImageImage
B
45
S
14
G
10
Posts: 170
Reputation: 7,822

Post » Thu Feb 15, 2018 6:43 pm

It's alright! I've got it perfected now. It'll work in all directions and can wrap perfectly, without lining everything up, with just a few events. I never knew how parallax really worked prior to doing this, so I'm glad to have cracked it.
B
94
S
18
G
8
Posts: 1,026
Reputation: 12,378

Previous

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest

cron