Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

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?

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.