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. Jay-Pavlina

    Jay-Pavlina

    Joined:
    Feb 19, 2012
    Posts:
    195
    All of my assets are 2D sprites which are only visible from one side, and all of the block previews being generated are black. I believe it's taking the picture from the blank side of my assets. Is there any way to change which side it generates the preview from? Thank you.

    Edit: Are the X and Y offsets in the Block Editor working? They don't seem to be having any effect.

    Edit 2: I'm seeing the following warning in the console:

    No block found at: Assets/Tidy Tile Mapper/Blocks/GroundNormal.prefab.meta
    UnityEngine.Debug:LogWarning(Object)
    DopplerInteractive.TidyTileMapper.Utility.TidyEditorUtility:RefreshCurrentBlockList()
    DopplerInteractive.TidyTileMapper.Editors.TidyBlockMapCreator:RefreshWorkingBlockMenu()
    DopplerInteractive.TidyTileMapper.Editors.TidyBlockMapCreator:DrawWindow()
    MapCreatorWindow:OnGUI() (at Assets/Tidy Tile Mapper/Editor/Editor Windows/MapCreatorWindow.cs:21)
    UnityEditor.DockArea:OnGUI()

    I have Meta Files enabled for version control setting in Editor Settings.
     
    Last edited: May 1, 2012
  2. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi Exploding Rabbit (that felt weird to type!),

    I've got a big update of the preview-generation system on the way - it will add controls for offset, lighting and such to the Advanced panel in Block Editor. Stay tuned for that one!

    I noticed this (re: x/y offsets) - I'll add it to my To Do list. I believe I made a change to the manner in which prefabs are generated and it is bypassing the offset logic. I'll put a fix up for that with the next release.

    Ah, I didn't anticipate meta files. I'll remove or suppress the warning for *.meta files (but retain it for *.prefabs).

    Thanks for the heads-up!

    -JFFM
     
  3. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Exciting news everybody,

    Jessica (@TheDopplerDuck) - the artistic half of the Doppler Interactive team, has just finished "Tidy Tile Pack #1", which is now live on the Asset Store for $25 - there are 15 blocks with a total of 59 variations, with all of the Block orientations / prefabs pre-generated and included in the package - so you can buy it, install it, copy your Blocks across and experience the glory.






    Enjoy!

    -JFFM
     
    Last edited: May 1, 2012
  4. rstehwien

    rstehwien

    Joined:
    Dec 30, 2007
    Posts:
    101
    Excellent, I'll pick it up tonight.
     
  5. JFFM

    JFFM

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

    Busy week on my side of the screen! Getting through a good list of things to add and modify for TTM. Polishing up Tidy Controllers and making sure they work on all fronts.
    In a little downtime, I put together this video that should hopefully get everybody up to speed on toot-sweet.

    In this video I give a rundown of top-down mapping in Tidy TileMapper, and go over block orientation and such.

    Remember - you can see all of our videos and such on the website: http://tools.dopplerinteractive.com



    Enjoy!

    -JFFM
     
  6. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hey hey everybody,

    Because I hate leaving everybody wondering: Today is my big "Character Controller" day. I'm doing all of our final regression testing, painting up the demo characters, and prepping this bad boy for release into the big wide world.

    Hang tight, I'm ultra excited!

    -JFFM
     
  7. Mcg

    Mcg

    Joined:
    Mar 28, 2012
    Posts:
    112
    awesome stuff so far , do you guys plan to add anymore art assets in packs other than textures? :)
     
  8. rstehwien

    rstehwien

    Joined:
    Dec 30, 2007
    Posts:
    101
    I can hardly wait for controllers. So I content myself with learning about procedural generation methods I can use and how I could implement roguelike FOV.
     
  9. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Oh man, if you come across any good resources, feel free to link them up here.

    Tidy Tile Mapper was my big "once I've done this, I can spend my days making procedural content" framework.
    But now it's my "now that I've done this, I can spend my days updating it" framework :D

    I swear I saw a Unity procedural level generation video come up in my Twitter feed - but I stupidly didn't bookmark it.

    Edit: Oh oh oh, and I have a video for you. I recognise your name :D It will be "Painting components". I'll do a walkthrough to get you up and prototyping mega quick ;)

    -JFFM
     
    Last edited: May 8, 2012
  10. JFFM

    JFFM

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

    We're definitely considering it. We have so so so many assets just... lying around (like all the stuff you see in the promo videos). We're going to see how Tidy Tile Pack does, and then get cracking on some follow-ups.

    Is there anything particular you'd like to see? Sow the seeds in my brain!

    -JFFM
     
  11. rstehwien

    rstehwien

    Joined:
    Dec 30, 2007
    Posts:
    101
    Here are some links I collected... still processing them so I cannot say which are the best. Basically I saved anything that looked like I should read further after spending a few min reading. My interests are focused on Terraria like 2d biome generation, roguelikes, and procedural platformers. Will likely go for roguelike generation first since it is so well documented and easy to find examples.

    http://pcg.wikidot.com/
    http://notch.tumblr.com/post/3746989361/terrain-generation-part-1
    http://www.dungeonleague.com/2010/04/27/biome/
    http://www.dungeonleague.com/
    http://gaming.stackexchange.com/questions/26531/how-do-minecraft-biomes-work
    http://www.noelberry.ca/2011/04/procedural-generation-the-caves/
    http://www.gamasutra.com/blogs/Adam...2/Procedural_Level_Generation_for_Artists.php
    http://topsecretblogx.blogspot.com/2009/03/algorithm-for-procedurally-generating.html
    http://www.cs.hmc.edu/~pmawhorter/r...regulated_extension-Mawhorter_Mateas-2010.pdf
    http://www.reddit.com/r/gamedev/comments/eq2db/procedurally_generated_2d_platformers/
    http://stackoverflow.com/questions/155069/how-does-one-get-started-with-procedural-generation
    http://code.google.com/p/jetblade/
    http://gamedev.stackexchange.com/questions/2230/how-to-generate-random-level-from-a-seed
    http://www.emanueleferonato.com/2009/06/02/understanding-roguelike-dungeons/

    I got tile mapper a while ago because I thought "hey I could do that roguelike I was thinking of" but stuff came up (babies take a bunch of time ;) ). Now I'm back and TTM is on the verge of having those exciting controllers.

    Thanks!

    I'd love the code for a couple of your videos because they do a bunch of what I want... but I could figure it out.

    Streaming Tilemaps... an excellent beginning to doing FOV (field of view) as well as keeping the app performant by reducing the number of objects
    http://youtu.be/g7rvN_gJiG0

    The API Demo... because it isn't far from a basic mining app
    http://youtu.be/gArJrIFAB-I

    I did have a question. Can you use the runtime API to generate editable maps like the maze generator? Probably could write a way to serialize the runtime map.

    Second question was using the water/fire blocks from tidy wave mesh like you did in one of the videos. I tried creating a block from one of the wave mesh prefabs and when painting it appeared huge (like a full chunk for one block). Maybe I just need to review making my own blocks... likely did something basically wrong.
     
    Last edited: May 8, 2012
  12. AlexEvangelou

    AlexEvangelou

    Joined:
    Sep 15, 2011
    Posts:
    11
    Hmm I'm curious how in your streaming map demo you calculated which blocks should be on screen at a given moment. It looks like you might just use some radius from the center of the camera's location and by knowing the block size calculate which should be showing?

    The reason I ask is I'm just not sure if there's some better Unity based way to do it involving a trigger collider on the camera or something.
     
  13. JFFM

    JFFM

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

    Tidy Controllers are pending review! So that's a small exciting piece of news.

    Also, I've put this tutorial video together at the request of one of our friendly users - I thought it might be illuminating for any new users coming across the thread.



    Enjoy!

    -JFFM
     
  14. JFFM

    JFFM

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

    Ah, there were a few things at work there.

    I give the streaming map a "radius" within which it should display blocks. It actually loads a small amount beyond the bounds of the camera because:

    Everything that should be loaded / deleted is placed in a queue, and it's done over the space of a few frames (so there are no shudders). I load beyond the bounds of the camera to cater for a "terminal velocity" so Blocks don't pop onto the screen.

    To find the blocks I want to display / hide, I take the "Focus point" (the character) - and mathematically create a list of all tile coordinates that fall within the radius around this point.

    I compare this list to the list of all currently-displayed blocks, and take those that are not currently displayed.
    These get added to the "create" list.
    I then take the currently-displayed blocks list that are not in the new list, and I add these to a "destroy" list.

    (When I say 'list', I mean 'hashset').

    So the logic is really falling in the radius given to the streaming map - there's not much automation in terms of determining what is currently seen by the camera. It's more a "test a few times, see if the block load/save is invisible to the user... if so.. beautiful!" proposition.

    Hope that makes a small amount of sense!

    -JFFM
     
  15. JFFM

    JFFM

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

    Man, apologies for the delay in replying. Usually I get an email to say there have been posts. Conspiracies abound!

    Send me an email (to the support email in the readme.txt) - I'll sort you out on all fronts.

    -JFFM
     
  16. JFFM

    JFFM

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

    Looks like Tidy Controllers has been approved! If you update your Tidy Tile Mapper package, and maybe hit 'refresh', you should see the controllers in your swatches panel.

    Check it out, I look forward to your feedback! Documentation is pretty light at present, so give me a little and I'll comment all the base classes up.

    In other news, I've released an update to Tidy Wave Mesh to include the water and fire blocks you may have seen in other videos. If you pop those into a Block in your Block Editor, you'll be home-free.

    And in ooooother other news, I've been working on a new feature for Tidy Tile Mapper that you may be interested in.

    It's called "Tidy Functional Overlays", and it allows you to add arbitrary scripts to your map from Scene View - separated from the Blocks themselves. These scripts receive events (e.g Entity entered Block / exited block) so can be used to... do anything really.

    And here's a very early development screenshot.



    That's about all from my side of the screen.

    Enjoy!

    Regards,
    Joshua McGrath
     
  17. numberkruncher

    numberkruncher

    Joined:
    Feb 18, 2012
    Posts:
    953
    Neat stuff! keep up the great work
     
  18. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Also I was considering adding a "set empty tile to x" option - so at publish or runtime, all empty blocks are replaced with a mesh (of your choosing) and combined into a large piece of geometry.

    In this manner, you don't have to worry about painting floors or backgrounds into your maps, it will just.... do it.

    Is that something people would get some use out of?

    (I'm looking at you, @rstehwien)

    -JFFM
     
  19. JFFM

    JFFM

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

    I've gone ahead and put together a video introducing the features of the new Tidy Controllers - how you can use them, how they're composed etc.

    Hope it's enlightening!



    Furthermore, I've gone ahead and added a "dynamic mesh creation" option for creating floor/background meshes without having to place a billion tiles. I'll throw together a dev video for those of you interested in that sort of thing, and it should be live within a week.

    -JFFM
     
  20. orb

    orb

    Joined:
    Nov 24, 2010
    Posts:
    3,037
    With this you basically have a game builder within the game builder. Great stuff.
     
  21. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
    Absolutely fantastic !
    Hope I can add my enemies now using this new controller system !!!

    Thanks for your great work and perfect customer service...

    6R
     
  22. markhula

    markhula

    Joined:
    Sep 3, 2011
    Posts:
    630
    Hi,

    It's all looking good. I am wondering though do we have an idea when we will start too see multi-block objects integrated?
    I think TTM has almost split into 2 paths:

    The basic build a game; as with the character controller's just recently added which will undoubtedly suit some people and of course the other path of a 3d tile based editor.

    it's all good but so desperately need multi blocked (but single game object!) tiles :)

    Cheers
     
  23. PiNPOiNT

    PiNPOiNT

    Joined:
    Oct 26, 2010
    Posts:
    32
    I've come across a bug (not sure how to reproduce it sorry). But my blocks that i've added no longer show up in the block pallet. So i can't paint with them anymore.

    They are still listed in the Project folder "Tidy Tile Mapper/Block", but even after hitting refresh, they don't show up in the tidy mapper tab.

    They DO show up in the block editor when you load that up, Its just where you pick which one you want to paint with they dont.

    Any work around?
     
  24. JFFM

    JFFM

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

    There certainly is a workaround. If you open your Block Editor and find the Block in question (its preview in the left should have disappeared owing to this bug) - open the Block and toggle the "Default" box on your Default block on and then off again.

    It seems to be related the "default" flag being lost at some stage during the edit process. I've been on the hunt for the root of this one for a while!

    Hope that helps!

    -JFFM
     
  25. JFFM

    JFFM

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

    It's in-progress :D I think it will take me a little while - since there are quite a few elements touched-upon by the multiblock addition.
    I'll keep you posted.

    -JFFM
     
  26. rstehwien

    rstehwien

    Joined:
    Dec 30, 2007
    Posts:
    101
    I am liking the idea of dynamic backgrounds and floors. I'd been considering using 2d Toolkit to tile stuff on the background when I get around to dynamic maps with biomes.

    Really liking the controllers for quick prototyping. Was a bit confused since the player controller doesn't use the standard Horizontal and Vertical inputs (or Jump... it uses jump) already defined in Unity so nothing worked until I defined left, right, up, down, and renamed jump to Jump.
     
  27. JFFM

    JFFM

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

    Just two small "heads-up":

    1) I've accidentally made the height of the character controller component on the Player Controller and the Platforming Controller objects a little too high to fit through single-block gaps - so they'll try (bless their hearts) - but they won't succeed. I'll fix it in the next release, but you can change it right now in your prefabs folder by modifying the height on the controllers directly.

    2) Just a note that the Player Controller and Platform controller aren't suitable for use on a forward-facing map (they're designed for platformers).

    -JFFM
     
  28. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Man, to this day I'm not sure why I did it. I think it's because I was transferring controller code from the Digging demo across (and it had a few custom controls all rolled up). I'll probably change it to the standards inputs in the next update.

    Oh good idea on the 2D toolkit front. That's a great marriage of tools.

    Also I've just finished playing Terraria (I came very late to the party): what a game! How did I not play this earlier?

    -JFFM
     
  29. rstehwien

    rstehwien

    Joined:
    Dec 30, 2007
    Posts:
    101
    Thanks.

    Hope it will be. First to finish porting this cool maze generator but with a growing tree algorithm
    https://github.com/jamis/theseus

    But then I need to make some changes to make it more of a platform layout with doors and keys. So much to do and not enough time on the weekend. One thing on being back to C# is that I notice how much more verbose it is to get anything done when compared to ruby, coffeescript, scala, clojure... Verbosity with little benefit.

    Terraria is one of my favorite games and very inspirational to me. I enjoy it much more than Minecraft because it is (to me) more of a game than just a building sim.... plus I actually prefer the 2d platformer feel to the 3d one.

    Haven't finished it though.... no boss fights or anything. Since I lost my save game moving over to the new machine I'll have to start over (unless I can find the save in my backup).
     
  30. JFFM

    JFFM

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

    I've just submitted a quick update to make a few small changes to the controllers (now uses Axis instead of buttons, shortened the character controllers). That should be live within a day or so.

    -JFFM
     
  31. AlexEvangelou

    AlexEvangelou

    Joined:
    Sep 15, 2011
    Posts:
    11
    Found a bit of a bug: I have a block which only has 1 orientation, center_alone, and it's set as default. It has several variants in that default orientation. When I try to use SetVariation() to programmatic change the variation it doesn't do anything. It seems like it's checking for variations on whichever orientation that block might be in the map (center_surrounded for example). I haven't quite found a way around it yet.

    On the subject of 2D Toolkit I've been using it with TTM quite well so far. I just add Sprite prefabs as orientations for blocks and everything works as it would using the two on their own.
     
  32. markhula

    markhula

    Joined:
    Sep 3, 2011
    Posts:
    630
    Hey jffm

    :)
    Forgive my lack of patience :)
    It will be so cool and so much more efficient
    Will patiently wait

    Cheers
     
  33. JFFM

    JFFM

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

    Oh interesting. I'll check it out and report back.

    Done.

    Calls to SetVariant() and RandomiseVariant() don't trigger a refresh on the block alone, they just set the internal variant index. The Block itself should change once you call RefreshBlock (either via block.RefreshBlock() or BlockUtilities.RefreshBlock()).

    This is done so that you can make a tonne of changes to a map in say... a loop or function, and just refresh at the end (and not have to pay all of the instantiation costs).

    Fingers-crossed that does the trick! If not, holler back and I'll dig a little deeper.

    -JFFM
     
    Last edited: May 14, 2012
  34. PiNPOiNT

    PiNPOiNT

    Joined:
    Oct 26, 2010
    Posts:
    32
    Just popping over from the playmaker forums where i've been looking forward to getting some TTM related actions for it, but they mentioned you will be making some drastic API changes and they are holding off until then. What version of TTM will have those new changes in it based on your roadmap?

    Thanks
     
  35. PiNPOiNT

    PiNPOiNT

    Joined:
    Oct 26, 2010
    Posts:
    32
    I'd like to vote for the controllers to work with the forward type map setup if at all possible :)
     
  36. AlexEvangelou

    AlexEvangelou

    Joined:
    Sep 15, 2011
    Posts:
    11
    I actually was already refreshing it, however I was using old enums by accident, whoops! Who knew there weren't 63 variations of my block? Good to note though: If you set a variation to something beyond the number it actually has it defaults to 0.

    Another question to pick your brain on:

    I have some block B being displayed on the map.
    I set its variation to 1. The prefab for 1 gets added to the block enabled and prefab 0 gets disabled.
    I set its variation to 2. The prefab for 2 gets added to the block enabled and prefabs 1 and 0 are disabled.
    Now I remove the block with AssetPooling enabled.
    At some point later I request a block from the AssetPool and it gives me B again.
    This time when I add it to the map 0, 1 and 2 are all enabled. I tried setting the variation manually but this doesn't seem to disable other variations.

    Any clue if I'm doing something wrong?

    Another interesting part about this situation is that say Block B gets put somewhere set to variation 0 but with 1 and 2 on it and enabled. Say I set some other block C to variation 1. It will take the unused-but-enabled prefab instance of 1 from block B and add it to C. Which actually makes sense because the Pooling is working correctly, it knows that 1 is unused despite whatever reason it is enabled on block B for.

    [Edit: Actually it's almost like "enabled" is getting inversed when thrown in the pool, If 0,1,2,3,4 are disabled and 5 is enabled. I remove the block. When it get's pulled from the pool and added to the scene later 0,1,2,3,4 will be enabled and 5 will be disabled.]
     
    Last edited: May 15, 2012
  37. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Definitely. I feel like I've neglected the forward-type map a little in the initial release of Tidy Controllers - so I'm going to put together two more controllers just for top-down. I'm thinking... a grid-style movement system like Pokemon, and a free-form movement controller using physics.

    -JFFM
     
  38. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    That should be very very soon. I've had "Email Playmaker man" on my white board for so long now. I think once I've made this upcoming change, everything will be solidified, and Playmaker integration will be full steam ahead.

    -JFFM
     
  39. JFFM

    JFFM

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

    Edit: Oh oh oh. I know what the problems is.

    But before that, an anecdote:

    I was sitting on my balcony, drinking a cup of tea and smoking a delicious cigarette. Thinking about just nothing in particular. And then bam - suddenly I get a vivid picture in my mind of what is going wrong.

    Isn't it weird how that works sometimes?

    The problem is with the AssetPool - it deactivates the object but doesn't parent it to an arbitrary transform - it just leaves it where it is.

    As a result, since both the Block objects themselves and the variants are subject to pooling, if you have pooled the variant on a Block, and then pool the Block itself, when it is reactivated, the deactivated (pooled) objects that are parented to it will reactivate and appear.

    I'll add an arbitrary "AssetPool" gameobject and parent inactive instances to this - that will fix it up toot sweet.

    -JFFM
     
    Last edited: May 15, 2012
  40. PiNPOiNT

    PiNPOiNT

    Joined:
    Oct 26, 2010
    Posts:
    32
    Awesome sauce !
    I'd love to try both setups for my game i'm developing. Keep up the great work!
     
  41. Jay-Pavlina

    Jay-Pavlina

    Joined:
    Feb 19, 2012
    Posts:
    195
    Hello. I posted two weeks ago mentioning 3 problems:

    1. Block preview is black for 2D sprites.
    2. X and Y offsets do not work.
    3. Using meta files generates a warning.

    None of these issues have been addressed yet. I was wondering if I can get an estimated date of when they will be working. My level designer is just sitting around waiting for number 1 and 2 to get done. I understand you're adding new features, but it'd be great if you can get the old features working first.

    Also, is it possible to remove blocks from the block editor? I don't want all the defaults on there. Thank you.
     
  42. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi Exploding Rabbit,

    Fixes for all of these issues are in the next update - which should be out very soon.

    Edit: To clarify, when I say "very soon" it will likely be submitted this evening or tomorrow morning.

    You can delete Blocks by removing the prefab from the "Tidy Tile Mapper\Blocks" folder in Project view.

    I apologize for the delay - I pride myself on my ability to turn fixes around quickly, but sometimes things tend to get buried (particularly on the forums).
    Please feel free to harass me via the support email in the readme.txt (it goes to my phone) if you come across any issues in the future.

    -JFFM
     
    Last edited: May 17, 2012
  43. JFFM

    JFFM

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

    As a general hot-tip regarding preview images:

    Preview images are refreshed when a Block is changed in the Block Editor (if the preview in question is the Default block) - and that is generally all. So if you wish to refresh your previews en'masse - you can delete the desired previews located at:

    Tidy Tile Mapper\Editor\Visual Assets\BlockPreviews

    This will prompt a refresh of all preview images. If you experience issues with previews, often a refresh in this fashion will be enough.

    (Note: This feature isn't included in the toolkit as a "Clear Previews" button because I was very wary of getting into deletion. It seems like an area rife with peril)

    -JFFM
     
  44. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
  45. JFFM

    JFFM

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

    The newest update to TTM has been approved and is live... right now.

    It contains a handful of bugfixes and a tonnes of foundation code for the next release.

    Bugfixes that come to mind are:

    -Standardised camera behaviour
    -Reimplemented offset and rotations from the Block Editor
    -Removed warning when non-block objects are found in the Block directory
    -AssetPool now creates an arbitrary gameobject under which to place pooled objects

    Check it out and please feel free to email me if you find any abnormalities.

    Note my last post in order to correct any black previews you may have!

    -JFFM
     
  46. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Love your work @p6r!

    Also your avatar cracks me up. :D

    -JFFM
     
  47. Jay-Pavlina

    Jay-Pavlina

    Joined:
    Feb 19, 2012
    Posts:
    195
    I still don't understand how to do a preview image for a 2D sprite. I still get black previews even when I generate new ones. I thought you said there was going to be a way to adjust the camera or something, but I do not see any settings for it.

    Everything else seems to be working. :)
     
  48. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,158
  49. JFFM

    JFFM

    Joined:
    Nov 13, 2010
    Posts:
    336
    Hi Exploding Rabbit,

    I found that the automated camera had the added bonus of informing the user (via the preview generation) if their tile was valid or invalid (as invalid tiles will generate black previews). Since the camera orients the same as the Blocks, this was a nice little 'tell' on the part of the tool.

    Could you please email (to the support email address) a package with your tiles? I'll test on my side.

    -JFFM
     
  50. rstehwien

    rstehwien

    Joined:
    Dec 30, 2007
    Posts:
    101
    I've got my runtime maze generation working using a very customizable growing tree algorithm... which I need to tune some more to make more platformer like levels, create biomes, implement field of view, etc. Below is a screenshot, the red blocks represent places where the maze weaves under itself... they will be teleporters going N/S, E/W (you can turn off weaving or lower the chance of it occurring... eventually I'll allow weaving of longer distances). Click for larger image.


    But I'm having a runtime error when trying to add a controller block (for player and monsters).

    This works fine for blocks:
    Code (csharp):
    1. b = GameObject.Instantiate(wallBlockPrefab) as Block;
    2. BlockUtilities.AddBlockToMap(createdMap,b,false,0,false,x,y,0,false,true);
    But this causes an error
    Code (csharp):
    1. b = GameObject.Instantiate(playerBlockPrefab) as Block;
    2. BlockUtilities.AddBlockToMap(createdMap,b,false,0,false,x,y,0,false,true);
    I've also tried this to set the map.
    Code (csharp):
    1. b = GameObject.Instantiate(playerBlockPrefab) as Block;
    2. PlatformerPlayer pl = GetComponent<PlatformerPlayer>();
    3. if (pl != null) pl.parentMap = createdMap;
    4. BlockUtilities.AddBlockToMap(createdMap,b,false,0,false,x,y,0,false,true);
    In either case I get the following error
    Code (csharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. Entity.InitializeEntity () in D:\Users\Public\Documents\Unity Projects\TidyTileProcedural\Assets\Tidy Tile Mapper\Tidy Controllers\Controllers\Entity.cs:91
    3. Entity.Awake () in D:\Users\Public\Documents\Unity Projects\TidyTileProcedural\Assets\Tidy Tile Mapper\Tidy Controllers\Controllers\Entity.cs:36
    4. UnityEngine.Object.Instantiate (original={Mister_Tidy_Player_Controller (UnityEngine.GameObject)}) in C:\BuildAgent\work\300357e52574df36\Runtime\ExportGenerated\Editor\UnityEngineObject.cs:59
    5. BlockSet.Show () in
    6. OrientedBlock.SetBlockOrientation (orientation=BlockOrientation.Top_Left, refresh=true) in
    7. OrientedBlock.OnRefreshBlock () in
    8. OrientedBlock.OnBindToMap (x=1, y=1, depth=0, blockMap={Width: 1 Height: 5
    9. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    10. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    11. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    12. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    13. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    14. }) in
    15. Block.BindToMap (x=1, y=1, depth=0, blockMap={Width: 1 Height: 5
    16. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    17. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    18. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    19. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    20. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    21. }) in
    22. BlockMap.SetBlockAt (x=1, y=1, depth=0, block={False,False,True,
    23. False,True,True,
    24. False,True,True,
    25. }, destroyImmediate=false) in
    26. DopplerInteractive.TidyTileMapper.Utilities.BlockUtilities.AddBlockToMap (map={Width: 1 Height: 5
    27. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    28. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    29. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    30. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    31. DopplerInteractive.TidyTileMapper.Layering.ChunkSet
    32. }, b={False,False,True,
    33. False,True,True,
    34. False,True,True,
    35. }, randomise=false, variation=0, refreshUponAddition=false, x=1, y=1, depth=0, destroyExistingImmediate=false, addEmptyWhenNull=true) in
    36. CreateMazeDemo.GenerateMaze () in D:\Users\Public\Documents\Unity Projects\TidyTileProcedural\Assets\ArcaneArcade\Scripts\CreateMazeDemo.cs:98
    37. CreateMazeDemo.Awake () in D:\Users\Public\Documents\Unity Projects\TidyTileProcedural\Assets\ArcaneArcade\Scripts\CreateMazeDemo.cs:51
    I debugged into what I could but the parentMap is just not being set. Entity.InitializeEntity() with no params is called 3 times on startup (which seems like too many times) and Entity.InitializeEntity(BlockMap map) is never called. Even calling it myself didn't help.