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

Hexagonal map support #167

merged 16 commits into from Sep 18, 2018


None yet
1 participant
Copy link

nightm4re94 commented Aug 24, 2018

This branch includes a series of changes that generalize some tile mechanics to incorporate staggered tile grids (e.g. isometric) in the future.
The core mechanics have been adapted to support hexagonal .tmx maps created with tiled editor.

nightm4re94 added some commits Aug 23, 2018

Store map grid shapes in a Shape[][] for quick access by map.getTileG…

This is necessary because staggered MapOrientations don't have their tiles aligned linearly.

Rename Layer.getPosition() to Layer.getOffset().

Make both grid width and grid height adjustable in utiLITI.
Adjust grid rendering in utiLITI for rendering non-orthogonal grids.

Don't return tiles outside the map with MapUtilities.getTile() (will return [-1,-1] now).

@nightm4re94 nightm4re94 requested a review from steffen-wilke Aug 24, 2018

nightm4re94 added some commits Aug 25, 2018

Actually save utiLITIs grid settings (line thickness, color) in the u…
…ser preferences when setting them.

Return tiles that are not part of the map again. The algorithm for hex tiles is not yet finished.
Add helper Method for checking if a tile row or column should be stag…

Make the getTile()-Method work for hex tiles that are outside the map.
Instead of saving an actual grid of tile shapes for each map, introdu…
…ce a method that calculates a tile shape for tile [X|Y] on the fly.

This approach is more flexible since it also allows to easily get tile shapes outside the map boundaries.
Add tileOffset property for Tilesets. Render ColorLayers with respect…
… to tile offset.

TODO: render grid accordingly.

@nightm4re94 nightm4re94 merged commit 43bd561 into master Sep 18, 2018

1 of 2 checks passed

codeclimate 47 issues to fix
continuous-integration/travis-ci/push The Travis CI build passed

@nightm4re94 nightm4re94 deleted the HexagonalMapSupport branch Nov 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment