Tidy Tile Mapper: Paint tile-maps from the Editor [Released]

Hi Unicron,

Before I kick into a big explanation, I’ll lead with:

I’m going to be releasing an addon for TTM that provides a bunch of movement scripts - both for players and AI, which will be integrated with the UI. So if anybody is reading the following example and feel a little like this O_O - never fear! :slight_smile:

To get a path through a maze like p6r’s example, you can call:

Pathfinding.GetPath() via a script. This will return a list of PathNodes - which contain the x,y coordinates of the blocks you need to visit in order to move through this maze.

Once you have this list of nodes, you can call GetBlockAt(x,y,z) on the maze map to return the blocks themselves, which will yield the transforms you require to interpolate between.

The arguments aren’t documented yet (I’ve got a tonne of documentation in my “To Do” list) - but here’s a breakdown:

Your function call would look like this:

Pathfinding.GetPath(startX,startY,endX,endY,mazeMap,0,false,false,0,false);

To break that down:

The function is:

Pathfinding.GetPath(int x1, int y1, int x2, int y2, IPathMap pathMap, int depth, bool allowDiagonals, bool randomiseWeightMap, int randomisationAmount, bool pathOverAllBlocks)

x1 and y1 are the starting coordinates
x2 and y2 are the ending coordinates

pathMap is the map over which you wish to find a path (in this case, the maze)

depth is the layer depth at which you wish to path (if you are using a single-layered map, it would be 0)

allowDiagonals is a flag to tell pathfinding whether you want the paths to move diagonally. In a maze, this would be false, because your character would clip through walls on the diagonal movements.

The last three are related to generating levels:

randomiseWeightMap will return an imperfect path, for drawing paths that feel a little more organic
randomisationAmount tells the randomiser how much it should randomise by
pathOverAllBlocks tells the pathfinder to disregard pathing information and just go straight from A to B

In the next few smaller releases I’ll be neatening up the function calls a little, and adding documentation to the functions themselves. There’s so so so much to document, it will be a marathon :smile:

Hope that helps!

-JFFM

:smile:

Your blocks look great! Really keen to see how your project goes.

-JFFM

@ JFFM, thanks for the reply back and for the explanation. I’m definitely looking forward to that movement scripts add-on and will pick it up when it releases. Thanks!

thanks :slight_smile:
It would be a pain without your tool :stuck_out_tongue:
here is a test with textures and some decor:

This tool looks amazing, one question is it possible to have tiles that are bigger? 2x tiles size or 4x tiles size?

WOW ! Looks great, engelik…
Very nice world !!!

6R

Hi Lars,

Definitely, you can set any arbitrary height/width/depth for tiles at map-creation time.

-JFFM

JFFM your game is very good,i like it!!!it’s so funny and easy to play!!

P.S I just put out a little update for Tidy Tile Mapper - I found a strange little bug in which Map Chunks will lose their positioning (but not their data) if you do a series of opens and closes on a project with a map in it.

I was working on a little retro tileset. And now here’s a picture to spice this otherwise boring post up:

-JFFM

hi JFFM
I’ve run into a similar problem where when i add a prefab to a new block I get this error

And the prefabs appear duplicated on the explorer (I only added them once)

Hi Engelik,

Is this error occurring on the latest version of TTM?

-JFFM

yeah, its a bit weird, if I create a new project and try it there doesn’t seem to happen, but working in the one that already has a few maps it has this problem. And for some strange reason when i add a new map he has some weird rotation, again only if it is now a new project. :\

Oh super-strange,

I’m guessing it’s likely a conflict with something I’ve added in one of the last updates. I’ll take a look and add a few lines to stop those errors cropping up.

Edit: Done - I’ve submitted this change to the Asset Store. I estimate between 30 minutes and 24 hours until it’s live. Fingers-crossed it fixes the problem!

With the rotation problem - is this for creating a new map in a new project, or a new map in an existing project?

Edit: Oh Oh Update: Rotations for maps are set based on the position of your camera (Upward-growing maps will always be face the camera, Outward-growing maps will always face flat) - so this would likely be making odd rotations if your camera is set to a jaunty angle.
This was a really old design choice, based on creating side-scrolling platformers, that I suppose isn’t really pertinent anymore.

-JFFM

Hello Everybody,

An update post now, just to keep everything alive and wonderful:

A few updates to Tidy TileMapper coming this weekend:

-I’ve made a bunch of internal changes - invisible to the naked eye, that will pave the way for game logic based on the internal workings of the tile system (things like… procedural generation, adding / removing blocks at runtime, AI movement etc)

-I’ll be releasing the first addon for TTM - “Tidy Maze Generation”. I’ve decided (based on your kind feedback) to keep non-core functions out of the tool and instead put them in optional ‘addons’ - to keep the toolkit pure and focussed.

-I’m going to be adding a “Tiling Group” feature to Blocks, to allow blocks to select the blocks they tile against (e.g act empty toward some blocks, act normally toward other blocks).

-And in the far far future, I’ve been working on the next enormous Addon for TTM… which I’ve not named yet. This will be for adding game events and logic to your maps. Have an early development screenshot, on the house:

I hope everybody is having an excellent week - thanks so much for your feedback.

-JFFM

Hello, I have just caught my eye on this, and I would like some question answered.

  1. Right now I am manually creating levels for my game on a grid, I am using flat planes. Am I able to create just flat planes and not blocks, as shown in the video?

  2. Is this iOS friendly?

  3. What’s the graphical cost of using this? Do these batch?

  4. Is there an in depth tutorial on everything you can point me to?

Hi Jrricky,

Yes definitely, actually one of the tutorial videos uses flat planes (to mix things up a little) - you can see it here.

Good question - I’ve not tested it for iOS since V1.2 - but prior to this it was fine for iOS, and is fine for Android in all versions. I would reply with a conservative “yes”. (The tool doesn’t really add much to your builds - just the blocks that you add and a few utility classes that don’t use any unusual libraries).

You can use both static and dynamic batching - at present I’ve not put any mesh combine logic on the maps, as I wanted to leave it open for people to have tweening blocks etc.

The maps themselves are logically divided into “chunks” - so if you wanted to further combine/batch these up, you could drop the mesh combine script onto each “chunk” (just a gameobject).

Goooood question. I’ve not had a chance to update the tutorials / FAQ since 1.2, but there is a moderate amount of documentation on the website:
http://tools.dopplerinteractive.com along with the video from above (which demonstrates Block Creation - the trickiest part).

I hope these answers were helpful!

And now, have this smile - because it’s Sunday morning (here) and I’m about to have what smells like a delicious coffee: :smile:

-JFFM

Thanks for the response. I went to the website hoping to find the docs, but there is none…? Also for my batching I would be using the asset stores Batching Tools to work nicely with this.

Mesh combining is relatively easy. Marking clusters of blocks as static to have that sort of logic automatically applied to them would be a great feature, though :slight_smile:

Definitely it looks amazing. I’m purchasing it.

By the way, one suggestion for further versions. How about blocks with different slopes? I mean not any given value of slope, but maybe some selected values, so you can build, let’s say, a pyramid like those in the video, but without the staggered look.

I’m looking forward to seeing next add ons :wink:

The ability to remove layers would be nice. I accidentally just created 3 layers when I thought I had painting selected.

Also the ability to have multiple layers enabled at one time instead of just one or all.