Comments

  • edited January 2017
    Usage tutorial for Tiled and the converter has been added to the wiki:

    Using the TMX to ORX Converter

    (We appear to be in editor season around here! enobayram and I are working in sync :) )
  • edited September 2012
    Hi sausage,

    I've also noticed the editor season :)

    This converter sounds really useful. Nowadays I'm partially working on a game with a tile-based map. Currently, I'm parsing an ASCII file to read the map. This turns an ASCII text editor to a (very) primitive tiled-based map editor. This current solution has always been a placeholder in my mind. I'll look into your solution as soon as I go back to that aspect of the game.

    Cheers!
  • edited September 2012
    Hey, that's a really nice converter you have here.
    I've downloaded Tiled and made a map out of a few tiles, after naming them all and following the tutorial.

    The converter only generates the tiles output (from the tileset) but not the actual level with the tiles, and I get the following error:
    An error occured loading and converting the TMX. Specific Error: Object Reference not set to an instance of an object.

    The output:
    [TilesGraphic]
    Texture		= tileset.png
    Pivot		= top left
    
    TextureSize		= (16, 16, 0)
    [GR@TilesGraphic]
    TextureCorner		= (0, 0, 0)
    
    [BTL@TilesGraphic]
    TextureCorner		= (16, 0, 0)
    
    [BTR@TilesGraphic]
    TextureCorner		= (32, 0, 0)
    
    [null@TilesGraphic]
    TextureCorner		= (0, 16, 0)
    
    [BBR@TilesGraphic]
    TextureCorner		= (16, 16, 0)
    
    [TilesMap]
    

    Any idea on what I did wrong here?
  • edited September 2012
    Ah yep, there's some rules specified in the wiki. These are essentially:

    1) All tiles must be given a property
    2) The property must be called "name". Then the value can be whatever you want to name your tile.
    3) Every tile position in the map must have a tile. No gaps. Need to discuss if this a hindrance or not. No null tile positions supported as yet.
    4) The tileset must be given a name.

    We should discuss 3) because it suits me, but may not suit others.
  • edited September 2012
    Version 0.2 uploaded. Functionally the name but does a better job of catching naming mistakes. https://forum.orx-project.org/uploads/legacy/fbfiles/files/TiledToOrx-091311eae5e4c407f8090b2036224274.zip
  • edited September 2012
    Ah, I feel dumb for having "bush" instead of "name", must come from the test I've done before reading the tutorial, I did not even see it after that.

    Thanks for the help, looking forward to future updates :)
  • edited September 2012
    Not at all. I should have checked for it. I'm glad it's working for you though. :)

    Let me know if you spot anything else.

    Also I'm interested if I should add flexibily to it so that you don't have to paint a tile on every map position. So being allowed to have null tiles.

    I suppose I'd just create a blank [null@TileGraphic] line and the developer would need to handle this in their screen paint routine.
  • edited September 2012
    Hi,

    I really like the idea of using Tiled for map setup. Considered it myself a while ago but figured ScrollEd would be enough. Still using Tiled to define tiles and setup most of a map has a certain appeal :).

    Unfortunately being an Ubuntu user I've not been able to give it a spin. Running .Net under wine was usually a total failure (haven't checked if it is better nowadays). And Mono 2.6 that comes with my dated Ubuntu release does not like .Net 4 at all ;). Guess will have to try newer version but full Windows Forms 4 support is planned for mono 3.0 so chances are it won't work anyway ...

    Any chances for console version targeted at .Net 2? Guess it would be more Mono friendly.

    Guess for now I'll have to borrow my wifes' laptop or setup a VirtualBox :D.

    Cheers,
    Graag

    PS
    I would vote for null tiles feature ;)
  • edited September 2012
    On .Net 4 and mono... I did have that in the back of my mind when I was doing it. Theres only one minor version 4 specific thing in the code and I can change that.

    So I'll change it .net 2.0 and we'll see about mono.

    Let me know if you want the source.
  • edited September 2012
    Speaking of which, I created a orx group on bitbucket where orx will probably migrate soon and where Scroll already is.

    Let me know if you want to join that group and publish your work there. :)
  • edited September 2012
    Yes, please. I'll start an account there and get it uploaded.
  • edited September 2012
    Version 0.2b uploaded. Functionally is the same as 2.0 but some code refactored to only require .NET framework 2.0. https://forum.orx-project.org/uploads/legacy/fbfiles/files/TiledToOrx-e1b833b55a0898fa6d9d4b515f8c61ed.zip
  • edited September 2012
    Tested using mono on Linux and it runs great :)

    Thanks,
    Graag
  • edited September 2012
    Cool, thanks for that Graag. Forgot to ask if you could test that. Saves me installing mono on my Fedora box.

    Let me know if you have any issues.
  • edited September 2012
    Sausage, did you create a bitbucket account? Let me know when it's done so that I can add you to the team. :)
  • edited September 2012
    Just created one... been caught up android and the game... got one now though: sausage
  • edited September 2012
    Just added you!
    Now you have a nice place for publishing TiledToOrx, either using Mercurial or Git. :)
  • edited September 2012
    For null tile support, what would be the right thing to render to INI???

    Which would be more correct?:

    * To render #EMPTY in the map

    or

    * To render #EMPTY in the map, and have a blank matching section.

    For example, which of the following two would people expect where there are empty map positions:
    [TilesGraphic]
    Texture 	= four-tiles.png
    Pivot   	= top left
    TextureSize		= (64, 64, 0)
    
    [TOP@TilesGraphic]
    TextureCorner		= (0, 0, 0)
    
    [BOTTOM@TilesGraphic]
    TextureCorner		= (64, 0, 0)
    
    [LEFT@TilesGraphic]
    TextureCorner		= (0, 64, 0)
    
    [RIGHT@TilesGraphic]
    TextureCorner		= (64, 64, 0)
    
    [EMPTY@TilesGraphic]
    
    [MapLevel]
    Map		= TOP #TOP #EMPTY #LEFT #RIGHT #EMPTY #BOTTOM #LEFT #EMPTY #LEFT #LEFT #EMPTY
    

    or
    [TilesGraphic]
    Texture 	= four-tiles.png
    Pivot   	= top left
    TextureSize		= (64, 64, 0)
    
    [TOP@TilesGraphic]
    TextureCorner		= (0, 0, 0)
    
    [BOTTOM@TilesGraphic]
    TextureCorner		= (64, 0, 0)
    
    [LEFT@TilesGraphic]
    TextureCorner		= (0, 64, 0)
    
    [RIGHT@TilesGraphic]
    TextureCorner		= (64, 64, 0)
    
    [MapLevel]
    Map		= TOP #TOP #EMPTY #LEFT #RIGHT #EMPTY #BOTTOM #LEFT #EMPTY #LEFT #LEFT #EMPTY
    
  • edited September 2012
    By the way, didn't upload to git last night. GIT requires a stack of downloads before it runs.
  • edited September 2012
    I believe your tile could truly be empty:
    [MapLevel]
    Map = TOP #TOP # #LEFT #RIGHT # #BOTTOM #LEFT # #LEFT #LEFT ##
    

    As for git, that's why I stick with mercurial myself! ;)
  • edited September 2012
    Hmm mercurial. Problem is, SVN, GIT, don't think I could install a third source controller. I'll check it out though.

    Great idea on the empty tile thing. That might be the winner.
  • edited September 2012
    And there it is: https://bitbucket.org/orx/tiledtoorx

    Thanks, sausage!
  • edited September 2012
    iarwain wrote:
    As for git, that's why I stick with mercurial myself! ;)

    I'm with mecurial too. ;)
  • edited December 2012
    Version 0.3 uploaded. Changes include:

    * Map Only checkbox to allow the conversion of the map data only when you don't want the other information generated. Good for repeat conversion during development.
    * Large maps are sectioned into 1024 item length lists, ie:
    [MapLevel]
    MapSection1 = F #F #F #F #F..... etc up to 1024 items
    MapSection2 = S #S #S #S #S..... etc up to 1024 items
    MapSection3 = L #S
    

    https://forum.orx-project.org/uploads/legacy/fbfiles/files/TiledToOrx-aa539a81521f36a566c840fd899f7e3c.zip

    (empty tiles is still not supported. This will be in 0.4)
  • edited December 2012
    I checked out Tiled and decided I shall use it for our game. This is where your converter will come in handy, but I have some questions:

    1) Does it work with isometric maps as well as orthogonal ones?

    2) Does it import the layer information too? This would be very helpful for having the level designer place a layer with walkable, wall, interactable, etc. regions in the map and have that info available in Orx.

    3) Can you change it so it uses the tile ID instead of having to name each and every tile?

    I will have a closer look at the code (unfortunately it is currently Windows specific, so I haven't run it... I use a Linux computer). Perhaps, if you would like, I could help with further development of this since it seems like a very handy thing to have around.

    Cheers,
  • edited December 2012
    Hi duenez.

    duenez wrote:
    1) Does it work with isometric maps as well as orthogonal ones?

    No, just flat maps. I probably won't be doing anything isometric, but someone else might change the source to do it.
    2) Does it import the layer information too? This would be very helpful for having the level designer place a layer with walkable, wall, interactable, etc. regions in the map and have that info available in Orx.

    No, just a single layer. Doesn't do multiple layered maps as yet. I might end up adding that but no immediate plans.
    3) Can you change it so it uses the tile ID instead of having to name each and every tile?

    This might be possible. I'll take a look at the file format to see if the information is available. I assume it is. I'll add this to 0.4.
    I will have a closer look at the code (unfortunately it is currently Windows specific, so I haven't run it... I use a Linux computer). Perhaps, if you would like, I could help with further development of this since it seems like a very handy thing to have around.

    graag runs it using mono. Check a few replies up this topic. That's why I converted it from .NET 4 to 2. But yes by all means feel free to grab the source and tinker away if you like.
  • edited December 2016
    See thread for the 0.4 version.
  • edited January 2017
    Version 0.5 is out shortly. Interface has been simplified, and support is being added for multiple layers.
  • edited February 2017
    Version 0.6 is available in the origin post.

    All map formats are now accepted: CSV, XML, Base64, Base64/gzip and Base64/zlib.

    http://orx-project.org/wiki/tutorials/community/sausage/tmx_to_orx
Sign In or Register to comment.