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
[Tiled] Support for hexagonal map orientation #143
Comments
Do we have a renderer for hexagonal or isometric Tiled maps? |
We currently support Orthogonal and Isometric. We don't currently have Staggered or Hexagonal. |
Whoa. I didn't know we had an isometric renderer. Could definitely use a starter kit / demo example for each type of map orientation. |
Yeah totally. Our demos have improved but we've still got a number of things to add. I'm really excited about having more demos and starter kits. We should probably raise a new issue about starter kits to explain what they are and how they are going to work. |
I've begun looking through the source for adding in Hex support. I've got as far as TiledMapWriter. I have a query
Why the different treatment for these enumerations? I've already added "Hexagonal" to both TiledMapOrientation and TmxOrientation but I have a couple of new enums for StaggerAxis and StaggerIndex to add to the writer class. |
Yeah, that is a rather odd implementation. I suspect the only reason these are inconsistent is because they where implemented by different programmers. Either approach should work just fine, but I think I prefer the In C# an
Of course, the above enums are used when deserializing the XML and they have a one to one mapping with the below enums defined in the core library.
Given they are supposed to be a one to one mapping, the One could argue that defining these numbers in two places is a code smell / maintenance pain but I'm not sure that argument holds much weight. Once these values are defined and tested there's really no reason to ever change them, so having them defined on both ends doesn't really matter. You just have to be careful when adding a new one. So yeah, I'm happy if you want to go ahead and clean up this code to be more consistent. I have a feeling this code could be made even simpler with some thought. If you come up with a completely new way of doing it that's cool too. As long as it doesn't involve moving the XML serialization code into the core library. I don't think that would be a good idea. |
@AndyE0 Btw.. where are you working on these changes. I noticed you don't have a fork of MonoGame.Extended on your github profile. |
Yes - I preferred the Convert.ToInt32 approach as well - the reason for my question as I couldn't see the point of other one and thought I was missing something obvious. I also don't have a problem with the dual definition approach because as you say it keeps the core library cleaner. Regarding my on-going work my GitHub profile is the same age as my post above :-) I didn't have one until then. I've not used git much - I'm a Subversion user at work and I use it at home as well. Initially, all I'd done was download a zip of the source and build it but you know how it is..... I was looking at the source code this morning and before I knew what was happening code was being typed and compiled. I'm guessing to fork it, I just click on the Fork button :-) One further query, although there are classes for ObjectGroups and Objects there is no code for Import/Export yet - is that correct? |
Consider it "forked"..... |
Ignore my query about ObjectGroups and Objects - it looks like the first zip download I made was from master and there are some follow-up changes on develop. |
@AndyE0 Where are you at with this? |
Closing this for now. We can always reopen it if @AndyE0 returns. It would be nice to get this feature done but there hasn't been a lot of people asking for it so it's not really a top priority. |
Andy_E noticed that we currently don't support "hexagonal" map oriendation with Tiled added in version 0.11
I don't think this would be too difficult to add.
The text was updated successfully, but these errors were encountered: