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

More examples in documentation #40

Open
ghost opened this issue Oct 16, 2024 · 5 comments
Open

More examples in documentation #40

ghost opened this issue Oct 16, 2024 · 5 comments
Labels
documentation Improvements or additions to documentation

Comments

@ghost
Copy link

ghost commented Oct 16, 2024

Hi

I'm a beginner with this library.
Could you please provide in the docs a Tiled example map that has:

  • different tile types: grass, water, stone, ...
  • collision layer
  • ...

Then provide a full code example using DotTiled to load the map and show code to get the tile type and handle collisions?
Basiczally a full code example showing all features of DotTiled on an example Tiled map.

thx

@ghost
Copy link
Author

ghost commented Oct 16, 2024

Please use latest Tiled version for this

@dcronqvist
Copy link
Owner

Hi!

While that could be a good idea and of good help to many using this library, I do believe that the existing examples at DotTiled.Examples should provide enough information about how to retrieve which tile is in which layer. The Godot example project has code that retrieves tile id's and places them in correct locations. That should give you enough of a start to get going.

I'm not sure that there is enough information provided here to give you an example map and logic + rendering implementation. Are you expecting a full-blown example of a small-scoped game? I believe that smaller examples with code on specifically getting correct tile id's, placing them in their expected positions, etc. are a better way to convey how to use this library. However, if enough people end up wanting an example like this, or find using DotTiled too difficult to use for its intended purpose, I'll make sure to find the time to provide one.

I will keep this issue open as a reminder, and a way for others to potentially provide more feedback on what kind of examples they would like to see.

@dcronqvist dcronqvist changed the title request: add more docs More examples in documentation Oct 27, 2024
@johannes-el
Copy link

@dcronqvist Yes I totally agree with the suggestion.

As it is now, I don't think DotTiled is very usable.
The examples you showed don't really elaborate on what the code does [too few comments].

Also I'm not sure how I would integrate this with my monogame project, since I want to separate my textures and my .tmx files.
The code is hard to read and the documentation is sparse. This is not meant to be an insult, that's just how it is.

I would appreciate a full blown monogame example, because as of now you can only really guess what the functions do.

@dcronqvist
Copy link
Owner

I understand where you are coming from, and I will make sure to provide official MonoGame examples in the future.

Until then, to make sure that you can keep working as you need to using DotTiled with MonoGame, may I suggest you take a look at differenceclouds/NuTiled? It seems to be a working example of DotTiled with MonoGame. Please let me know if this is sufficient for now.

@johannes-el
Copy link

@dcronqvist Yes that is very helpful. Thank you.

As a side note:
I would suggest renaming Color to something else. This namespace collision with monogame Microsoft.Xna.Framework.Color is very annoying.

@dcronqvist dcronqvist added documentation Improvements or additions to documentation enhancement New feature or request and removed enhancement New feature or request labels Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants