Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple background layers #266

Closed
Asmageddon opened this issue Aug 22, 2012 · 11 comments
Closed

Simple background layers #266

Asmageddon opened this issue Aug 22, 2012 · 11 comments
Labels
feature It's a feature, not a bug.

Comments

@Asmageddon
Copy link

Most of the time after adding the maps into the game, you add a background. It would be nice if you could add simple image/gradient background layers, with optional parallax to more closely preview how they will look.

As an added bonus it will allow an easier and more intuitive way to embed background data into map files.

@bjorn
Copy link
Member

bjorn commented Aug 22, 2012

Support for image layers has already been added after 0.8.1 and is available on the master branch and the daily builds (see issue #169). Since you can just generate a gradient image, I think that use-case is also covered.

A parallax effect does not exist yet, but I would say that is a separate feature which could be supported by all layers.

A feature that would still need to be added to the current 'image layer' is repetition of the image.

@Asmageddon
Copy link
Author

Ah, I see, sorry. And yeah, tiling would be very, very useful.

As for parallax, it doesn't really need to be a separate feature. While it would certainly be nice for layers other than image layers, how would editing it work? I think that parallax for backgrounds and parallax for actual editable layers are two (somewhat) different things.

@dobesv
Copy link
Contributor

dobesv commented Mar 28, 2013

I think the parallax effect for all layers could work.

Given a ratio of the width/height and when you use the scroll bars to move around the map, the background / foreground layers would move at a different speed.

This might touch a lot of pieces of code, though.

@sfiruch
Copy link

sfiruch commented Apr 10, 2013

Are there any updates on this front? I'm currently working on a game and image repetition and (even more so) parallax for layers would be great. This would at least mean that some layers are repositioned before drawing. In a more complete implementation the layer dimensions would differ too.

Without support for parallax it's very difficult to see where tiles on a second layer will end up at the end.

@bjorn
Copy link
Member

bjorn commented Apr 10, 2013

@deiruch No updates, just haven't gotten around to it. If you want to help me to have more time for Tiled, the Donation page on the website has more details about that. :-)

Recently @spezifanta said on IRC that he will use this feature and may give it some love. I don't know whether that includes adding support for repetition and parallax, though.

@heinrich5991
Copy link

Are there any updates on parallax?

@bjorn
Copy link
Member

bjorn commented Feb 23, 2014

@heinrich5991 No. Maybe you are interested in helping out?

@ketanhwr
Copy link
Contributor

@bjorn what exactly is the meaning of parallax feature? Something which displays all the layers like below?

Parallax

@bjorn
Copy link
Member

bjorn commented Mar 22, 2017

@ketanhwr Visualizing the layers like that is not part of this feature. The feature would be that you could associate a depth or scroll speed factor with each layer, so that you can preview the parallax effect (see this example on Wikipedia).

Note that @Zax37 recently posted on the forum that he was working on such a feature.

@ketanhwr
Copy link
Contributor

Alright, thanks :-)

@bjorn bjorn closed this as completed in 0e7f813 Dec 13, 2021
@bjorn
Copy link
Member

bjorn commented Dec 13, 2021

Thanks to the work by @krukai, the image layers can now also be repeated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature It's a feature, not a bug.
Projects
None yet
Development

No branches or pull requests

6 participants