Code Monkey home page Code Monkey logo

Comments (9)

colinvella avatar colinvella commented on June 11, 2024

from tide.

TheBroodian avatar TheBroodian commented on June 11, 2024

Thank you for your reply - I realize that this project hasn't had any updates made to it in quite some time. I've actually been using it for many years, and it has otherwise worked without any issue until now. If this issue is not worth the time to look into it, I do not blame you - I just wanted to inquire with you just in case it interested you.

It does not appear to me that the issue has to do with the map texture file being located in the root of a drive - I have tested this in other scenarios with both the .tide file and the tilemap texture file being nested deeper into a file structure. This error only appears when the tilemap is 3 directories up from the .tide file.

To demonstrate, I have done as you said, and created folder X in the root of D:, and moved the tilemap file into it:

image

Note how tIDE continues to search in the wrong location, but also mistakenly puts the new directory "X" in the path after "B". This seems like some sort of a parsing error? The tide file's contents pasted below:

<?xml version="1.0" encoding="utf-8"?>
<Map Id="test2">
  <Description><![CDATA[]]></Description>
  <TileSheets>
    <TileSheet Id="untitled tile sheet">
      <Description><![CDATA[]]></Description>
      <ImageSource><![CDATA[..\..\..\X\E.png]]></ImageSource>
      <Alignment SheetSize="25 x 18" TileSize="32 x 32" Margin="0 x 0" Spacing="0 x 0" />
      <Properties />
    </TileSheet>
  </TileSheets>
  <Layers />
  <Properties />
</Map>

from tide.

colinvella avatar colinvella commented on June 11, 2024

from tide.

TheBroodian avatar TheBroodian commented on June 11, 2024

Ahh okay, I understand you better now. I've rearranged the files to match your question:

image

image

E.png resides in D:\X
test2.tide resides in D:\X\C\B\A\

Here is the tide file's data:

<?xml version="1.0" encoding="utf-8"?>
<Map Id="test2">
  <Description><![CDATA[]]></Description>
  <TileSheets>
    <TileSheet Id="untitled tile sheet">
      <Description><![CDATA[]]></Description>
      <ImageSource><![CDATA[..\..\..\E.png]]></ImageSource>
      <Alignment SheetSize="25 x 18" TileSize="32 x 32" Margin="0 x 0" Spacing="0 x 0" />
      <Properties />
    </TileSheet>
  </TileSheets>
  <Layers />
  <Properties />
</Map>

And here is the error tIDE outputs when trying to open test2.tide

image

To add some more information, I have another file, "test.tide" that resides in D:\X\C\B, and looks for E.png 2 directories up at the same location as the previous .tide file.

<?xml version="1.0" encoding="utf-8"?>
<Map Id="Test">
  <Description><![CDATA[]]></Description>
  <TileSheets>
    <TileSheet Id="generic tile sheet">
      <Description><![CDATA[]]></Description>
      <ImageSource><![CDATA[..\..\E.png]]></ImageSource>
      <Alignment SheetSize="25 x 18" TileSize="32 x 32" Margin="0 x 0" Spacing="0 x 0" />
      <Properties />
    </TileSheet>
  </TileSheets>
  <Layers />
  <Properties />
</Map>

This file opens, no issue.

Next, I will create another directory one folder further down the structure and follow the same pattern now.

image

<?xml version="1.0" encoding="utf-8"?>
<Map Id="Test3">
  <Description><![CDATA[]]></Description>
  <TileSheets>
    <TileSheet Id="generic tile sheet">
      <Description><![CDATA[]]></Description>
      <ImageSource><![CDATA[..\..\..\..\E.png]]></ImageSource>
      <Alignment SheetSize="25 x 18" TileSize="32 x 32" Margin="0 x 0" Spacing="0 x 0" />
      <Properties />
    </TileSheet>
  </TileSheets>
  <Layers />
  <Properties />
</Map>

Here is the error it returns when trying to open it:

image

From this, I think it is safe to assume that so long as the map is further down the file path beyond 2 directories from a tilesheet that it tries to read, it will fail. However, you raise a good question, I had not yet tested the opposite. I shall test this.

I created a test file in a new directory, D:\Red called 'test.tide'. This new directory has subdirectories as shown below:

image

I added several tilesheets to this tide file to test if it appeared to error when loading tilesheets that were deeper embedded in the file structure:

<?xml version="1.0" encoding="utf-8"?>
<Map Id="Test">
  <Description><![CDATA[]]></Description>
  <TileSheets>
    <TileSheet Id="generic tile sheet">
      <Description><![CDATA[]]></Description>
      <ImageSource><![CDATA[Blue\Green\E.png]]></ImageSource>
      <Alignment SheetSize="25 x 18" TileSize="32 x 32" Margin="0 x 0" Spacing="0 x 0" />
      <Properties />
    </TileSheet>
	    <TileSheet Id="generic tile sheet2">
      <Description><![CDATA[]]></Description>
      <ImageSource><![CDATA[Blue\Green\Yellow\F.png]]></ImageSource>
      <Alignment SheetSize="25 x 18" TileSize="32 x 32" Margin="0 x 0" Spacing="0 x 0" />
      <Properties />
    </TileSheet>
	    <TileSheet Id="generic tile sheet3">
      <Description><![CDATA[]]></Description>
      <ImageSource><![CDATA[Blue\Green\Yellow\Orange\G.png]]></ImageSource>
      <Alignment SheetSize="25 x 18" TileSize="32 x 32" Margin="0 x 0" Spacing="0 x 0" />
      <Properties />
    </TileSheet>
  </TileSheets>
  <Layers />
  <Properties />
</Map>

This file loads properly, and loads each of its tilesheets. This organization of tilesheets-in-relation-to-tidemap appears to have no issues.

No apology necessary! Thank you so much for taking the time to look at this with me.

from tide.

colinvella avatar colinvella commented on June 11, 2024

from tide.

TheBroodian avatar TheBroodian commented on June 11, 2024

Well, it doesn't halt my work entirely, however it does hinder my ability to organize my map files in such a way where I can nest "sub-areas" maps inside of folders belonging to their "parent areas" folders. I'll just have to settle on a simpler organization scheme.

from tide.

colinvella avatar colinvella commented on June 11, 2024

from tide.

TheBroodian avatar TheBroodian commented on June 11, 2024

No problem!

In the event that you do take a look into this, I have one more tidbit of information that may be useful to you: This problem does not persist when a map is loaded and run within an XNA game, it appears to be an issue with the tIDE editor specifically.

from tide.

colinvella avatar colinvella commented on June 11, 2024

from tide.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.