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

Global Class Identification #451

Closed
cemalgnlts opened this issue Aug 6, 2023 · 1 comment · Fixed by #477
Closed

Global Class Identification #451

cemalgnlts opened this issue Aug 6, 2023 · 1 comment · Fixed by #477

Comments

@cemalgnlts
Copy link

Hi,

Context

In order not to name the decors for the game every time, I gave the Decor Class from the tile options:
Screenshot 2023-08-06 10 57 08

Then when I add it to my map, it automatically comes up with the same Class name:
Screenshot 2023-08-06 10 57 39

Here's how it looks in the output file:

<tileset firstgid="42" name="Decors" tilewidth="80" tileheight="61" tilecount="8" columns="0">
  <grid orientation="orthogonal" width="1" height="1"/>

  <!-- The class name is given as type instead of class. -->
  <tile id="0" type="Decor">
   <image width="42" height="44" source="../decors/barrel.png"/>
  </tile>

  <!-- The class name is given as type instead of class. -->
  <tile id="1" type="Decor">
   <image width="16" height="21" source="../decors/blue_bottle.png"/>
  </tile>
</tileset>

Proposal

There are already functions like getObjectByType & getObjectByClass in the documentation, but they don't care about global class naming.

@eonarheim
Copy link
Member

Hi @cemalgnlts thanks for the issue!

I totally agree, the existing functions should respect the global class

eonarheim added a commit that referenced this issue Jan 6, 2024
This PR will remove the old xml parser/logic and replace it with a hand crafted parser developed here https://github.com/eonarheim/tiled-xml-parser 

Features in this update
* Parser supports parsing _all_ tiled properties, however the plugin doesn't support rendering all of them in Excalibur
* New file mapping to work with various bundlers
* Tiled Template Support
* External Separate Tileset loading Closes #455
* Infinite Tile Maps!!!
* Actor Factory to provide your own implementations based on Tiled class  
 - Get props passed to objects excaliburjs/Excalibur#2847 
 - Global class identification Closes #451


Fixes
* New Parser - Closes #391
* New Loader - Closes  #387

In addition to replacing the parser this PR also updates the API to be more supportable and friendlier to use.  The old `TiledMapResource` type will be marked deprecated

* [x] Headless mode - Closes #478
* [x] Optional file loader implementation - Closes #478
* [x] Isometric
* [x] Integration tests 
* [x] Unit tests
* [x] New Documentation
* [ ] Update Samples
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 a pull request may close this issue.

2 participants