-
Notifications
You must be signed in to change notification settings - Fork 106
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
Add parallax support #101
Add parallax support #101
Conversation
@perlindgren These changes look good, but unfortunately conflict with the recent reorganization done in c386766. Could you rebase your additions? Btw, this crate has recently moved to the @mapeditor organization so that we can share maintenance between those that use this crate. Let me know if you're interested in helping with further development! |
Just a note, this doesn't work on object layers as is. |
8e62df5
to
a8837d4
Compare
So I fixed it, since the changes were so few and small it was actually easier just to copy/paste my changes into the new repo structure (mainly its in the @bjorn did you have anything in particular in mind regarding the repo development. I played around a bit with Rust Bevy, and implemented parallax scrolling there, but since the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty good, there are just a few minor formatting issues.
That's great, thanks! What about also adjusting Or, rather than duplicating more stuff, we could merge this as-is for now (just addressing the minor code style adjustments) and instead look into refactoring the data structure into an enum? I think we can pretty much copy the structs from https://gitlab.com/flukejones/tiled-json-rs/-/blob/master/src/layer.rs#L79-112.
We'll need to make sure this crate supports all features of TMX and preferably also supports deserializing JSON. Secondly I think we need to make it more convenient to use, while keeping an eye on performance. Is that what you were asking? |
I've addressed the minor code style issues and merged Regarding adding these to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add changelog changes and it's good to go
I'm not sure why those newlines in |
Sorry for being so late, the notification didn't get through. |
Conflicts: src/layers.rs
No problem, it was good to wait with this until you were done with #131. :-) |
A minor update to support Tiled parallax information.
The
asset/tiled_parallax.tmx
provides a map with three layers (Background, Middle, and Foreground), each with different parallax information (Middle being the default Tiled (1.0, 1.0)).The
tests/test
contains an example:The version is bumped to 0.9.6 to indicate the extended information.
Thanks for a great crate by the way!