I've just started coding my first ever videogame using Monogame/Xna. I've reached a point where I would like to start editing maps and importing them into my game using the program Tiled. After reading through the tutorials for Monogame.Extended, I was able to install version 1.0 using NuGet commands, and configure the content pipeline tool references accordingly. Right now, my packages file looks like this:
<packages>
<package id="MonoGame.Extended" version="1.1.0" targetFramework="net45" />
<package id="MonoGame.Extended.Content.Pipeline" version="1.1.0" targetFramework="net45" />
<package id="MonoGame.Extended.Graphics" version="1.1.0" targetFramework="net45" />
<package id="MonoGame.Extended.Tiled" version="1.1.0" targetFramework="net45" />
<package id="Newtonsoft.Json" version="9.0.1" targetFramework="net45" />
</packages>
And Content.mgcb looks like this:
#-------------------------------- References --------------------------------#
/reference:..\..\packages\MonoGame.Extended.Content.Pipeline.1.1.0\tools\MonoGame.Extended.Content.Pipeline.dll
I have a basic map [Orthographic] that is 64 x 64 tiles of size 32 x 32. The content manager allows me to import both the Map.tmx and Tileset.tsx into the project. However, it will fail to compile with one of two errors:
1) If there is a Tileset.tsx file in the Content Manager:
Couldn't find a default importer for 'C:/Users/*****/source/repos/HeavyMetalMachines/HeavyMetalMachines/Content/maps/Test.tsx'!
2) If there is only Map.tmx file in the Content Manager:
DirectoryNotFoundException: Could not find a part of the path 'C:\maps\TestMap.xnb'.
My Content is obviously not directly under my C:\ drive, so I am confused by the second error. It almost seems as if VStudio is converting the map to binary and then trying to place the converted map under C:? The command I am using to import the content is as follows:
//Tiled Test
private MonoGame.Extended.Tiled.TiledMap lcTestMap;
.
Content = new ContentManager(this.Services, "Content");
.
lcTestMap = Content.Load<MonoGame.Extended.Tiled.TiledMap>("/maps/TestMap");
I would like to know if I missed a critical step in the configuration, or if I am not using these classes correctly. I do plan on strictly using Isometric maps in this game, so I'm hoping that it will not be too different from this test. Oh, and I'm using Visual Studio Pro 2017 with Monogame 3.6 - in case that has some impact as well...
Thanks in advance for any help you might have!
Content.Load("maps/TestMap")
instead. If that doesn't work I'll come back and try to answer the question in more detail. \$\endgroup\$