-
-
Notifications
You must be signed in to change notification settings - Fork 93
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
Second TMX Overhaul, Part 2 #243
Conversation
Conflicts: build.gradle
Add equals, hashCode, and toString, and don't make it extend CustomPropertyProvider
Mainly, I had to do these all at once.
Also, "false" is the default value for "required" on @xmlelement and @XmlAttribute
The "as determined by" already clears up how to resolve tiles for edges using the definition of insideness.
Conflicts: src/de/gurkenlabs/litiengine/environment/tilemap/MapUtilities.java src/de/gurkenlabs/litiengine/environment/tilemap/xml/GroupLayer.java src/de/gurkenlabs/litiengine/physics/PhysicsEngine.java src/de/gurkenlabs/litiengine/resources/ResourcesContainerListener.java utiliti/src/de/gurkenlabs/utiliti/EditorScreen.java
Also, implement file properties. It's important to note that file properties are still somewhat WIP. They work for loading a map made in Tiled, but additions would need to be made for actually setting such a property.
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.
Entities don't have to implement IRenderable
but can still have an AnimationController
that renders them. This commit effectively forces every Entity implementation to also implement IRenderable
which is a breaking change in the way we render our entities. This needs to be reverted. I'm also not sure yet, how the changes related to #172 can be seen in the grand scheme of things, which is why I originally tagged it with "needs-discussion".
From the commit messages and the code that changed, I think most of the changes are reasonable but this pull-request contains so many different pieces including various breaking changes and also just some minor adjustments, it's hard for me to judge the impact that this PR would have on existing code and the engine in general. We need to split it up into various smaller PR such that we can properly test the individual changes. Also, as far as I could see (maybe I overlooked it) there were no unit tests added that check the changed behavior, I think this would be a great addition.
For most of the changes, either a unit test would be infeasible (such as graphics changes) or the unit tests were already there (such as moving resource storage to URLs). With regards to the layer entities, I didn't know that |
Okay, since this part was also just something additional from my side, I guess the topic of unit tests is done for this PR. |
This reverts commit 42c858d.
Conflicts: src/de/gurkenlabs/litiengine/environment/Environment.java
Looking at the code again, it looks like it was just the sorting optimization that was made. I've reverted that change. Also, with entities bound to layers, it doesn't change the way it's rendered if you put the map object layer on the top, or bottom if you’re using the |
Conflicts: src/de/gurkenlabs/litiengine/environment/tilemap/xml/Animation.java src/de/gurkenlabs/litiengine/environment/tilemap/xml/GroupLayer.java src/de/gurkenlabs/litiengine/environment/tilemap/xml/Map.java src/de/gurkenlabs/litiengine/environment/tilemap/xml/TilesetEntry.java
Fix a bug where the serialization process assumed that a MapObject always has to have a MapObjectLayer as parent. Add method overload to load a game resource file from a String to stay backward compatible. Make use of "getEnumValue" to retrieve the light shape. Extend the getEnumValue process to be case insensitive as a fallback.
I did some additions to the new feature of rendering @TheRamenChef Are there any changes to the map format that would result in the engine version ofthis branch being incompatible with previous maps? Maybe you can also have a look at this. |
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.
We need to fix the mentioned issue with the layers not being rendered at all in this branch and then we can merge the PR.
This was causing some awkward log messages.
Conflicts: src/de/gurkenlabs/litiengine/environment/tilemap/xml/TileAnimation.java
I think I found the problem. Maps with these changes have a Does it work now? |
For part 1, see #232.
This pull request adds even more missing features, including:
This pull request was going to have an implementation of JSON maps, but I got stuck on the tile layer data. Actually removing 451348d from the branch proved to be too much of a hassle; if you can do it, go ahead, or don't.