Search Unity

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

Discussion in 'Assets and Asset Store' started by JFFM, Jan 21, 2012.

  1. Tonmy

    Tonmy

    Joined:
    Mar 28, 2012
    Posts:
    5
    Well, I've been using Tidy Tile Mapper and it's a fine plug-in, but I think there needs to be some necessary improvements.

    Problem 1) I'm also having the same problem while building large maps. Unity becomes extremely slow and can't handle nicely around 50 chunks or more (5x5 tiles per chunk).

    Suggestions:
    As far as I've seem, tidy tile mapper spawns every GameObject tile of a custom block to each chunk tile and just deactivates the ones that are not being used, right? Wouldn't it be better to destroy/instantiate new objects? This might help performance over large maps, I guess, but might not be as fast to paint.

    In my tests, there are 15 deactivated tiles on a block and just 1 activated. I'm not even using 15 different tiles, just 5, I just used the same tiles over different orientations.
    If the map gets large enough, no doubts there'll be performance problems.

    Another issue that might be dropping performance over large maps is that when paiting a map, we have to selecte the map object, so unity selects also all the child objects, therefore it selects all the deactivated and active objects, all the tiles and all the chunks, and draw all the colliders from each tile. Painting the tiles when selecting a chunk (instead of selecting the map) might give a good performance boost on this.

    Problem 2) Also, one thing that could be improved and I think is one of the most important issues is to use Prefabs as tiles. ***** (very important)

    Suggestion
    I'm using Prefabs GameObjects as tiles in my tests. It seems Tidy tile mapper copies the prefab to the custom block and doesn't actually use the prefab at all. If I change the prefab after painting the map (actually, it is after creating the custom block), I have to redo all the work: recreate all the custom blocks and repaint all the maps. This is pretty bad, it will slow down a lot a complex game development. I might say that the plug-in is unsuitable for large projects due to this restriction.

    Changing it to link to prefab and instatiante the prefabs, instead of copying to customs blocks, might help performance at problem 1).
    There could be an option when creating custom blocks, if the user wants to just link to prefabs, or create custom blocks with copying Game Objects (as the plug-in does in the most recent version).

    -----------------------------------------

    Apart from this, congratulations for the great plug-in. For all I've tested, it has some great advantages using it, I can draw easily and the automatic tile selection is awesome (*applauses*). I've built my level very quickly and the worlkflow is great, aside from problem 2).

    If I could request an update, I would request to take a look at (2), as this is a very important issue. (1) also, but I might get around with your suggestion of splitting the map into separate smallers maps.
     
    Last edited: Mar 28, 2012
  2. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Hello Tommy, I don't know if this will be of help to you but perhaps:

    I have found that the editor does become very slow when editing large maps. So instead I use multiple tilemaps per scene. This does make the maps easier to work with. I then publish each of the maps into a prefab and run my combiner script on them. I then import these optimised prefabs into my real scene file which then performs well at both runtime and in the editor.

    It is a lot of messing around, but it does the trick for me at the moment.
     
  3. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi @amaranth,

    Yeah, I would definitely not recommend 100x100 chunk sizes. I'm not sure if it freezes or takes a very long time to think, but it's a lot of blocks to create in a single cycle.

    Generally a 5x5 chunk size is fine performance-wise - as you near the upper bounds of map sizes you'll likely see a slowdown as the prefabs are bound, but within normal bounds it's fine.

    What sizes of map are we talking about - where you are noticing system slowdown?

    -JFFM
     
  4. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi @Tonmy,

    Both of these things were issues I looked at both at the start of creating Tidy TileMapper, and post-3.5 when the new Prefab system was introduced.

    Initially, Blocks were simply links to prefabs that created/destroyed the orientation that was required in order to show for this particular orientation. However, this broke the connection to the parent prefab - so when creating blocks, your edits wouldn't persist onto the children.

    It's something that's on my mind, and I'll be looking for ways to optimise as development goes on.

    For problem 2, I'm not sure you need to repaint or recreate your custom blocks. If you change a prefab that a tile is based on, you should be able to open the Block Editor and remove the old prefab and insert the new one. Once you save, the block changes flow on to the map.

    Thanks for your feedback!

    -JFFM
     
  5. Tonmy

    Tonmy

    Joined:
    Mar 28, 2012
    Posts:
    5
    Actually, it is not showing anything. I have to paint the tiles with empty block and then repaint those tiles.

    http://youtu.be/_S2q2c2FpgA

    I recorded a video showing the problem.

    Thanks in advance
     
  6. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Ah cool, I think I see what's happening there. It looks like the block is not refreshing in the map.
    I'll check it out on my side.

    Also, if you see the problem again try clicking on the "Refresh Map" button in the Map Management section (when you've got a block or something belonging to the map selected). I'm interested to see if that pops everything up.

    -JFFM
     
  7. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hello Again friends,

    I've just submitted a new update to the Asset Store - making a few modifications to the internal workings of the Runtime API, and correcting the use of CalculateMathematicalCoordinate() over Editor-created blocks.

    Everything is looking pretty nice on that front, now.

    I've also added another script and scene to the API Demos folder - this time providing an abstract class (LevelGenerator) that will take a bool[,] and turn it into a map at runtime.

    I've included an example class using it - it generates levels using Perlin Noise to get nice, rolling hills.

    Have a picture! (from the Asset Store screencap):



    So definitely - after you've updated, extend LevelGenerator.cs and post up a screencap of what you've done!

    Procedural level generation is fun :D

    -JFFM
     
  8. Tonmy

    Tonmy

    Joined:
    Mar 28, 2012
    Posts:
    5
    Refreshing did not correct the problem, but publishing the map and hitting the play button did. Also, reseting unity also worked.
     
  9. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Ohhh interesting. This may indeed be related to the storage and refreshing of prefabs. The plot thickens!
    I'll check it out. Thanks :D

    -JFFM
     
  10. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hello again everybody,

    Another media-rich update from my side of the screen.

    It's step one of my "Tidy Character Controllers" adventure: NPC controllers for platform-styled games.



    I'm aiming to end up with a set of "Blocks" - each of which contain either... the player-character or NPC types or such, and you can happily paint characters within your map (just as you paint tiles right now) - and once you hit play... "BAM!" it's a game!

    Trust you're all having an excellent end-of-the-week.

    -JFFM
     
  11. Hoegbo

    Hoegbo

    Joined:
    Jan 21, 2012
    Posts:
    62
    I really like where this is going.
     
  12. Tonmy

    Tonmy

    Joined:
    Mar 28, 2012
    Posts:
    5
    sometimes I get this error when publishing map

    any hints?
     
  13. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi Tonmy,

    I'll take a look and release an update to fix this (and the other issues).

    I swear, errors that actually throw messages are the best to fix. Better than the ones you have to spend a day hunting around for. :D

    -JFFM
     
  14. Alex-Chouls

    Alex-Chouls

    Joined:
    Mar 24, 2009
    Posts:
    2,660
    I might be missing some context, or misunderstand the problem, but could you parent the prefab instance to an empty GameObject that you use for orientation, leaving the prefab connection intact...?
     
  15. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    That's exactly what I was thinking :D

    I'm going to run a few prototypes, and if it looks OK, I'll put it out as part of a larger '1.4' update.
    I'm trying to avoid making large, fundamental changes (that will require re-making of blocks and projects) until I've got some extra feature to release to sweeten the pill.

    -JFFM
     
  16. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Well record time :D

    I've gone ahead and changed all of Tidy TileMapper to run on prefabs:

    Running tests over the core functions (painting, publishing, editing blocks and the Runtime API) everything looks good thus far.

    Changes to prefabs will be reflected upon click of the "Refresh map" button (which should remove issue #2 from our friend @Tonmy's list).

    I've got an enormous amount of regression testing to go through - making sure it still works nicely on mobile, testing all of the Runtime functions and generally putting it through its paces, but I think on the whole - it will be a nice, positive framework change for Tidy TileMapper.

    So... watch this space for an enormous TTM update in the near future!

    -JFFM
     
  17. Tonmy

    Tonmy

    Joined:
    Mar 28, 2012
    Posts:
    5
    nice, can't wait to check it out.

    and by the way, congrats, the support is being great.
     
  18. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hello Everybody!

    I'm about to submit a massive update to Tidy TileMapper that will modify the internal workings of the tool quite extensively.

    These changes include:

    1. Blocks are now links to prefabs, as opposed to links to deactivated blocks. This will give a tighter link between Block and the prefab on which it is based.
    2. "Asset Pooling" is now integrated internally within the tool. When using the Runtime API, you can now opt to pool your blocks and prefabs as opposed to Creating/Destroying them at runtime. Net result: Massive performance boosts all around!

    I've also added an "Update news" window that will the display the first time you run a TTM update. This will alert you to any drastic changes that may need your attention (I realised a lot of people aren't on the forums, and I don't want them to miss out on important news like the thing I'm about to say)

    The changes in this update to TTM are not backward-compatible. So they will - unfortunately, break your existing Blocks and Maps. I tried very hard to find a way around this, but as the changes are quite core and fundamental, there is no way around it.

    However, to sweeten the pot - I'll be releasing the Character Controllers / Streaming API and AI controllers as a free update to the tool very soon, so I think that should hopefully offset this inconvenience.

    That's the news from my side of the screen!

    Hope you're all having a smashing lead-up to Easter.

    -JFFM
     
  19. botumys

    botumys

    Joined:
    Apr 16, 2009
    Posts:
    707
    thx for that!

    Is the character controller based on unity's character controller ?
     
  20. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi botumys,

    Yep, they use the CharacterController component so far (for the side-scrolling controllers).

    I'm going to structure them kind of like the "MonoBehaviour" class:

    You can extend from them to get access to all of the events (OnBlockEnter, OnBlockExit, OnCollideWithPlayer) and that should form an awesome basis for making... anything really.

    I'm pretty psyched to finish them up and have them released.

    -JFFM
     
  21. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Done and done!

    I've submitted Version 1.3 of Tidy TileMapper to the Asset Store for approval.

    Oohh I'm excited and nervous. It makes some big (internal) changes, but overall I'm very happy with the outcome.

    I expect it to be live within one working day.

    As always, please feel free to email the support address in the readme, or post here if you find any issues.

    From here on, I think it will all be UI tweaks and tonnes and tonnes of game-specific functions.

    Up next: Streaming maps, controllers and what I'm calling 'functional overlays'.

    -JFFM
     
  22. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    I estimate that... a message I just posted will be repeated 400 times...

    Am I a modern-day nostradamus?

    We'll see.

    -JFFM

    Edit: I was correct. :D
     
    Last edited: Apr 4, 2012
  23. markhula

    markhula

    Joined:
    Sep 3, 2011
    Posts:
    630
    Hi,

    This looks great!. But not sure if it's for me.
    I am trying to produce a Zelda'esq type game in 3d and decided some 'modular' block approach would allow quicker level design and also re-usability of meshes etc.
    Is it suitable for this?. Do all 'blocks' on a map have to be the same dimensions?

    thanks in advance
     
  24. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi @markhula,

    Man, what a timely message. Now that Tidy Tile Mapper core development is almost complete, I'm starting to work on my "baby" game project. (You know, that project that might never finish, but it's your baby and you love it and will spend a million years on it regardless).

    In any case - my "baby" project is styled around Harvest Moon / Pokemon / Animal Crossing. It's 3D and has the same block-restricted movement system (which is great for AI pathing and such) - and I'm using Tidy TileMapper to develop it into the future.

    But to answer your question instead of waxing lyrical about unrelated things:

    Yes, I think it's suitable for this. I think there will be some clever things you'll need to do (with the placement of your terrain below your blocks) - but Tidy TileMapper will handle all of the mapping / grid-restriction aspects which is ultra-handy.

    Your 'blocks' can be any size you like - the block size you specify when creating a map is really specifying the... size of the grid on your map. So you may have, for instance... a house that is 5x2 on a 1x1 grid - this will work fine.

    If you'd like to send me an email using this ultra fancy website I put together (http://contact.dopplerinteractive.com) I'll ask you a few more questions to get a better idea of your project, and I can give you a good recommendation.

    Whoa. This turned out to be a long message.

    The dangers of using the forum over breakfast!

    -JFFM
     
  25. Hoegbo

    Hoegbo

    Joined:
    Jan 21, 2012
    Posts:
    62
    seems like soft selection doesn't work on the latest release. Is it just me or does anyone else have this issue?
     
  26. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi Hoegbo,

    It looks to be working to me - just be sure that you're selecting the "Block" (which has the green collider) and not the model mesh below it (which will be selected by default). You'll have to climb one higher in your hierarchy to select it.

    Once you've got that, soft selection should be fine.

    Keep me posted!

    -JFFM
     
  27. Hoegbo

    Hoegbo

    Joined:
    Jan 21, 2012
    Posts:
    62
    that did the trick. thanks !
     
  28. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
  29. b3y0nd3r

    b3y0nd3r

    Joined:
    Oct 5, 2010
    Posts:
    27
    Nice game numberkruncher

    It definitely has to look great on the iPhone ;)
     
  30. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Looks very nice, numberkruncher...

    6R
     
  31. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Awesome work @numberkruncher! Congratulations on releasing it in time for Easter!

    -JFFM
     
  32. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Thank you all for the complements, much appreciated :-D
     
  33. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    So TTM, bug? This is after new version. Empty blocks are not scaling to the size used in advanced editor, only the outer(edge) ones and showing the size scaling. Small nitpick, but I noticed...

    http://dl.dropbox.com/u/4585058/TTM%20Chunks.png
     
  34. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Excellent, thanks Jrricky - I must have commented something out accidentally when I was converting the system to use prefabs.

    Edit: Nope. It turns out I just changed something in the actual setup of the empty block prefab. I've fixed it and submitted an update. Lightning-fast!
    Edit: And then, as is the way, I am sitting - drinking my coffee, thinking about nothing in particular, when BAM! I realise I introduced a bug. So I've fixed that and submitted yet another update.

    -JFFM
     
    Last edited: Apr 10, 2012
  35. crafTDev

    crafTDev

    Joined:
    Nov 5, 2008
    Posts:
    1,820
    LOL Thanks!!
     
  36. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi Everybody,

    I went ahead and released a small update yesterday - adding a new "Layer Lock" feature for painting layered maps.

    You'll notice that there are now checkboxes beside the buttons in your "Map Visibility" panel.

    When unchecked, the corresponding layer will be 'locked' (not able to be painted upon), when checked, it will be 'unlocked' (able to be painted upon). The default setting is a check next to the very top checkbox (beside the map name) - which is the equivalent of "Unlock All".

    This is a small update that should make it easier to paint multi-layered maps without having to hide/show layers frequently.

    Enjoy!

    -JFFM
     
  37. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Aaaaand I've also just put out a minor update to fix a "Missing key" error with the dictionary component of the new feature.

    -JFFM
     
  38. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hello again friends,

    I'm busily putting together the next huge release for TTM - and in that vein, thought I'd share this video with you.



    Not too much left to add and test until this badboy is out and live.

    Should be fun!

    -JFFM
     
  39. rygaar

    rygaar

    Joined:
    Mar 28, 2009
    Posts:
    63
    Will the AI Controllers require pro for pathfinding?
     
  40. markhula

    markhula

    Joined:
    Sep 3, 2011
    Posts:
    630
    Hey JJFM,

    Sent you an email via the company address; did you get it???

    Cheers
     
  41. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi Rygaar,

    Pathfinding works across both Indie and Pro (it's all an internal implementation of A*, doesn't use Navmesh).

    -JFFM
     
  42. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Oh man I don't think I did - let me check my spam folder.

    Edit: Oh man, it did go to my spam. Google is disrespecting you man, don't stand for this!

    I'll get back to you now.

    -JFFM
     
    Last edited: Apr 14, 2012
  43. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    A use of the Tidy Wave Mesh for Tidy Tile Mapper :

    With the Megafiers plugin and the Tidy Wave Mesh, you can make your racing track. By using the "Bend" parameter on the block, you can have all the angles you need for the curves :



    6R
     
  44. nab477

    nab477

    Joined:
    Jun 14, 2011
    Posts:
    46
    hey JFFM,

    I'm sorry if this was answered already, (didn't really read 13 pages to find out)

    is there a button for removing blocks ? (eraser maybe)
    or should I just paint over them with the empty block ?
    (even then, the empty block has a collider appears in the map)

    so, should I just publish the map, delete it from heirarchy then take it from Tidy Tile Mapper/Maps then delete all empty blocks by searching for them ? will this allow me to edit the map later on ?

    (I think you need a tutorial from a new scene until the level is usable/walkable).

    also, is there a way to bypass the absolute paths ? (I like to keep 3 folders "Plugins", "Editor" "Resources" put a folder per plugin inside each)
     
  45. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi @nab477,

    I'll copy out your questions to answer them:

    Is there a button for removing blocks?

    You can remove chunks but not blocks. Painting the desired space with the 'Empty' block will remove this at runtime. If you wish the empty block object (an empty trigger for game logic purposes) to not appear in your published map, you can publish with the "Strip Empty Triggers" stripping level in publishing options.

    is there a way to bypass the absolute paths?

    There's no way to bypass these unfortunately. Tidy TileMapper has a lot of references to its own hierarchy in order to save/load blocks and maps and load prefabs and such.

    Hope that helps!

    -JFFM
     
  46. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Love your work p6r! You're a madman! :D

    -JFFM
     
  47. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hello again friends,

    I've been taking advantage of the quiet time post-Asset Store Madness to do a tonne of work on Tidy TileMapper - including a thousand tiny little things, and then a handful of enormous, massive things.

    Ch-ch-ch-ch-check it out. Exciting stuff!



    That's all from my side of the screen for now.

    -JFFM
     
  48. rygaar

    rygaar

    Joined:
    Mar 28, 2009
    Posts:
    63
    This is looking very nice. I am starting to implement enemy AI into my game, so am keen to get my hands on this to see how flexible / customisable the character controller stuff is.

    Keep up the great work!

    cheers
     
  49. RandAlThor

    RandAlThor

    Joined:
    Dec 2, 2007
    Posts:
    1,293
    Is everything i can see in the video in the actual asset i can buy in the asset store?
    I mean the character controler like the one i can stear my character with keys and the other character stuff ?
     
  50. uublive

    uublive

    Joined:
    Apr 18, 2012
    Posts:
    6
    How does tidy relate with multi platform development? Is there any best practice you'd advice?