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

Second TMX Overhaul, Part 1 #232

Merged
merged 9 commits into from Mar 4, 2019

Conversation

@TheRamenChef
Copy link
Collaborator

TheRamenChef commented Mar 4, 2019

This pull request adds a number of features that have been missing for some time now, including:

  • Preserving layer ordering (#3)
  • Implementing group layers (#147, merged into #150)
  • A major rewrite of the way map orientations are handled:
    • There is now a single, static MapRenderer that renders every orientation.
    • The MapOrientation enum has been replaced with an IMapOrientation interface, along with a MapOrientations class containing a selection of singleton implementations of that interface for the standard orientations. This includes the isometric orientations, so it addresses #225.
    • Render order is now supported.
  • The removal of StaggerAxis.UNDEFINED and StaggerIndex.UNDEFINED (null works just fine for these)
  • The removal of IEntityProvider, which wasn't really a meaningful interface and could just as easily be passed as a Supplier<IEntity> using provider::getEntity.

I split this pull request into two parts because part 2 requires a number of big changes to the Spritesheet class that I'm not sure will pass. The contents of this pull request stand up on their own, but stay tuned for the following (and probably more) in part 2:

  • Entities bound to map object layers
  • Unified methods to be called after unmarshalling (setting tileset entries, resolving relative filepaths, etc.)
  • "Collection of images"-type tilesets

While errors were fixed in UtiLITI, this pull request will almost definitely cause errors in other existing projects.

TheRamenChef and others added 9 commits Feb 24, 2019
#3 is closed, but that doesn't mean I can't address it.
I don't really see any way to avoid lots of duplicated code here, as
Java doesn't allow multiple inheritance outside of interfaces.
This replaces the MapOrientation enum and many of the MapUtilities
methods with an IMapOrientation interface and a MapOrientations class
containing a selection of singleton implementations of that interface.
It also implements the two isometric orientations.
Also implement render order.
Also, IEntityProvider should be passed as a Supplier<IEntity> or as just
the entity.
@nightm4re94 nightm4re94 merged commit 3cd351c into master Mar 4, 2019
2 checks passed
2 checks passed
Travis CI - Branch Build Passed
Details
Travis CI - Pull Request Build Passed
Details
@nightm4re94 nightm4re94 deleted the tmx-rewrite branch Mar 4, 2019
@nightm4re94 nightm4re94 restored the tmx-rewrite branch Mar 4, 2019
@nightm4re94

This comment has been minimized.

Copy link
Member

nightm4re94 commented Mar 4, 2019

Thank you a lot, these are some great improvements!
However, I've noticed after merging the branch that the AmbientLight is not working for any of the Map orientations anymore (While there were bugs with hexagonal maps, at least it had been working for orthogonal maps previously). Please fix this as soon as possible.

@TheRamenChef

This comment has been minimized.

Copy link
Collaborator Author

TheRamenChef commented Mar 4, 2019

What, specifically, isn't working? Is it crashing? Is it distorted? Is it simply not drawing? I'm not particularly familiar with the AmbientLight class, not the least how it works, but I might be able to fix it if I know what's broken.

@nightm4re94

This comment has been minimized.

Copy link
Member

nightm4re94 commented Mar 6, 2019

I've provided screenshots in a comment on #233 to clarify this.

@steffen-wilke steffen-wilke deleted the tmx-rewrite branch Mar 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.