• Editor
  • Future request: Parallax Background

Related Discussions
...

I wasn't sure where to post future requests, so I decided to try my luck at here. Please tell me if this isn't the right place.

Any game need a background, many of them are moving and have different animations.

Here is a good tutorial making a parallax background.

I see it like this. In the studio in setup mode I need to set a screen area and place on it all my graphics assets. Than in animate mode, I only need to set the speed of those elements moving from side to side. You will be responsible to duplicate them and make the parallax effect.

Also in case we are building a super mario style game, so we need to control over the movement of the background, it should be something like: gotoFrameAndStop(integer) method.

Hope you like it and willing to implement it.

Ilya

Many games have parallax, but I'm not sure it is a good fit for modeling in Spine. It's more of an application specific.

If this was ever implemented I don't think we would target it for parallax layers directly, but rather expressions which you can do far more with since these can be used for many other things as well. However there are still so many other things we have to do first.

This seems more like something you'd do in the engine through a 3D camera or in 2D as calculated movement based on the camera and has little to do with Spine's focus of entity (character, effect, prop, menu) animations. You wouldn't make parallax backgrounds in Spine for export any more than you would in AfterEffects, Max or Maya. You'd model them there though, for the game engine to handle.

just imo.

5 ans plus tard

I was thinking about making parallax backgrounds in spine and found this old thread.
I want parallax backgrounds with animations in each layer, like grass waving and such. Would it be better to have a skeleton for each layer and then set up the parallax in engine, or to have one skeleton with all parallax layers and have the parallax effect come from transform constraints on the positions of the layers, with the frontmost layer as the target?
I'm also curious what the expressions Shiu mentioned might look like and be capable of, and if they're still a potential future feature.

I would suggest to do all parallax computations in engine. It's easier to experiment with, and also lets you combine it with visuals not created with Spine. Using transform constraints to simulate parallax is of course also possible, but imo a little less flexible.

I think Shiu was speaking about general scripting abilities in Spine itself. This is not a planned feature at the moment.