MonoGame.Extended icon indicating copy to clipboard operation
MonoGame.Extended copied to clipboard

[TIled] Object reference not set to an instance of an object when trying to build map

Open SilenceOfTheLambdas opened this issue 4 years ago • 5 comments

When trying to make a tileset that uses a collection of images instead of 1 image, the following exception is thrown: Screenshot_20201015_125517

This error seems to pertain to the .tsx file, and only the .tmx file if the tileset is embedded into the map.

SilenceOfTheLambdas avatar Oct 26 '20 10:10 SilenceOfTheLambdas

Can you post a project that reproduces this problem.

janfokke avatar Oct 28 '20 19:10 janfokke

Can you post a project that reproduces this problem.

Here is a link to a snapshot of the repo: https://github.com/sudo-make/Capstone-Project

SilenceOfTheLambdas avatar Oct 28 '20 20:10 SilenceOfTheLambdas

Related:

https://github.com/craftworkgames/MonoGame.Extended/issues/475 https://github.com/craftworkgames/MonoGame.Extended/issues/102

lithiumtoast avatar Nov 03 '20 18:11 lithiumtoast

The problem is about assets; currently, there is no middleware to combine collection of images into a single image. This process is better known as "texture packing".

Why is texture packing important? Well, the technical details are that there is a performance penalty for switching textures at runtime when rendering. See https://github.com/craftworkgames/MonoGame.Extended/issues/295

lithiumtoast avatar Nov 03 '20 18:11 lithiumtoast

Looking at this again, there should at least be a better exception message :)

lithiumtoast avatar Dec 14 '20 03:12 lithiumtoast