2
\$\begingroup\$

I'm making a 2D platformer game and I'm having a hard time figuring out how to fine-tune parallaxing objects in-game quickly enough. Problem is I don't even know how to make it faster, so I'm basically looking for standard approaches.

Currently I place a parallaxing object just like a normal static doodad somewhere on a level and then define the parallax offset multipliers (horizontal and vertical). Then I spend from five to ten minutes moving the camera around the location finding three values that satisfy me. So when placing each object takes that long, you start thinking of a way to make it faster, but unfortunately, I couldn't come up with anything better than what I have, so I'd like to learn about other approaches and possibly improve mine with that knowledge.

What are the usual approaches to placing and tuning the parallaxing objects in 2D games?

\$\endgroup\$

1 Answer 1

2
\$\begingroup\$

It sounds like what you're after is a way to streamline and optimise your workflow.

I would take the approach of defining various levels of foreground and then assigning each foreground element an index. You would then use your horizontal and vertical multipliers on a collection of sprites that have been assigned to a certain layer.

Example:

enter image description here

This obviously depends on how you're going about loading your sprites. If you're loading and positioning individual sprites, this is a time consuming process regardless of whether you're dealing with parallax or not.

Depending on the scale of the worlds that you are creating, it might be worth considering building some sort of SDK for yourself; to make the process of creating these worlds easier for you.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .