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

Added ellipses, change how ordering is done for tiled objects and fixed some bugs. #28

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

xenodora
Copy link

Changed the sort order of tile objects to use their bottom edge. The y coordinate of the bottom edge will also be modified by the object's 'z' property (or the tile's 'z' property if not found). 'z' is effectively how many pixels above the ground the tile object's bottom edge is.

These changes are intended to allow the use of Tiled to visually place objects and have the draw order done properly when other game objects are added to the layer.

Added support for loading, saving and displaying of ellipses. Ellipses are new to Tiled 0.9.0 (found in Tiled's Github repository). Their format is like this:

  <object x="320" y="576" width="32" height="32">
   <ellipse/>
  </object>

Some bugfixes:

  • 'Loader.lua' had a call to compactProperties missing the ''.
  • 'Map.lua' didn't calculate the draw range correctly when there are extra wide tiles.
  • 'Object.lua' didn't calculate the bounding box of tile objects correctly.

…he object is used to determine how many segments it will be drawn with.

Changed the threshold for drawing small rectangles as larger ones from 20 pixels to 5 pixels. The undersized dimension will be overridden to 20 pixels.
bugfix: Tile objects were not correctly calculating the bounding box for orthogonal objects.
Tile objects now use the bottom edge to determine sort order. The property 'z' of the object (or the tile itself if not found) is used to adjust the sort order. 'z' is effectively how many pixels above the ground the tile object is.
…le saving a map.

Ellipse objects added to the saving process.
bugfix: Call to _compactProperties from _compactObject() had somehow lost its '_'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant