18 Levels!

I know many of you have been at the edge of your seat awaiting more gem finding fun! Now there are 18 levels and a scrollable level map! Adding newer levels is going to be simple and I’m in a good place to add more meaningful progression into the game.

I’m going to spend a little time now figuring out what is going to be next and I imagine it’s going to involve getting some reward for beating levels and something to spend your reward on. I realize I should also make it a goal to keep adding levels at a specific interval. Maybe 18 new levels every month.

After that I’m going to think of additional twists in puzzle solving. I have a few ideas involving different kinds of bombs, but maybe mashing up other puzzle game elements will come into play.

As always, thanks for all the friendly support and feedback!

Unity TileMap Bug

I’ve run across a mildly infuriating issue that I finally resolved. If you look carefully at the roof of the windmill in my level selector, you’ll notice that it disappears when I scroll up and reappears when I scroll down.

I’ve done many a Google / StackOverflow / UnityForum searches to no avail and it wasn’t clear to me how to solve the problem. I originally though it was an issue with me using a ScrollRect with a TileMap, but I took the content out of the ScrollRect, manually moved the camera to still see the same artifact.

It seems the actual problem is the hidden bounding box/size of the TileMap. In the inspector view of the TileMap, you’ll see no properties allowing you to see or change the size.

However, I was finally able to identify the actual problem by sheer luck. I randomly inserted another object further from the original tile that I had drawn, delete that same new object and retested the scene. With that, the tile somehow correctly persisted and displayed.

Looking at the source diff in version control I then saw the hidden delta in the actual scene file. It turns out that the TileMaps have a size property, so when I added and deleted the test object, it changed the size to accommodate the tile that I added.

Tilemap:
  ...
  m_Tiles:
	... tile details ...
  ... more Tilemap properties ...
  // Here's the magic
  m_Size: {x: 1, y: 10, z: 1}
  // Above!
  ... even more Tilemap properties

Before I added and deleted the random object, the m_Size property was {x: 1, y: 1, z: 1}, notice now it’s {x: 1, y: 10, z:1}

My guess is that Unity has some definition of the TileMap size to be efficient about only rendering what’s on screen. I eventually report the issue, but I have a workaround for now. I hope this helps someone else chasing the same issue of disappearing tiles in TileMaps!