Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We are updating our Terms of Service for all Unity subscription plans, effective October 13, 2022, to create a more streamlined, user-friendly set of terms. Please review them here: unity.com/legal/terms-of-service.
    Dismiss Notice
  3. Have a look at our Games Focus blog post series which will show what Unity is doing for all game developers – now, next year, and in the future.
    Dismiss Notice
  4. Join us on Thursday, September 29, for a day with Unity's SRP teams here on the forum or on Reddit, and discuss topics around URP, HDRP, and the Scriptable Render Pipeline in general.
    Dismiss Notice

✅ Tycoon Tile: The terrain solution for your Tycoon game!✅

Discussion in 'Assets and Asset Store' started by Vanamerax, Nov 5, 2019.

  1. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    Hi @discordbotstudio!

    If I understood your feature wish correctly, this is already possible and implemented with the included scripts. In the included demo scene (or the online web demo), you can select the smooth terrain editing mode in the terraformer tool to do this.


    By dragging the highlighted selection upwards, it will create a smooth terrain in neighbouring tiles:


    This tool uses the DecreaseHeightSmoothConnectedOperation and IncreaseHeightSmoothConnectedOperation operations to accomplish this.

    If you have any further questions, please let me know!
     
  2. discordbotstudio

    discordbotstudio

    Joined:
    Aug 2, 2020
    Posts:
    4
    Thanks for the quick reply. What I mean was similar to what you are showing, but when only selecting a single vertex on the "corner" of a tile.



    In this image you can see how the one vertex is raised, but the tiles around it do not recalculate their triangles to match, as if they are not sharing a common vertex in that corner.
     
  3. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    Ah I see. This should be easy to accomplish by making a new terrain operation or by modifying the standard one. The TileHandle and CornerIndex classes contain some helper functions to easily access neighbouring tiles and/or tile corners. If you need specific details I'd be happy to assist!
     
  4. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    Hi there!

    I have just released Tycoon Tile 1.3.1 on the asset store!

    This release fixes a problem that generated chunk colliders with 1 tile overlap on each side of the chunk.


    Also with this release comes the availability of the online documentation! There is also an API reference available.

    Enjoy using Tycoon Tile!
     
    Dev-4U likes this.
  5. glutexo

    glutexo

    Joined:
    Mar 23, 2018
    Posts:
    1
    Hi,
    I'm considering to use this asset.
    But I have a question. How complicated is it to add Tiles which support tunnels?
    And can I use your tile grid to easy implement a node based pathing algo?
    Thank you!
     
    AldeRoberge likes this.
  6. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    Hi Glutexo!

    The mesh generator is an isolated part of the package, which makes it easy to customize for your own needs. As long as you know which 'tile positions' and which side/direction of the tile requires a tunnel, you could simply skip generating triangles for that cliff or surface or generate a different mesh there. I don't expect you to run into specific problems here, but it depends on your specific requirements I guess.

    There is no explicit support for node based navigation built in, but using terrain operations makes it very easy to query the tile grid and 'navigate' through the grid by the tile neighbors and positions. I have also seen some customers integrating the Unity navmesh system with success, if that is what you are looking for. Again, this depends on your specific requirements and game rules, which is why there is no built in and standard solution for this within the product. Tycoon Tile does aim to provide an easy to use API surface which is also easy to extend, such that these features can be implemented as desired.

    I hope this helps! If you have any further questions, please let me know! :)
     
    AldeRoberge likes this.
  7. EricDaily

    EricDaily

    Joined:
    Dec 31, 2012
    Posts:
    16
    Does it support infinite, procedurally generated terrains at this time?
     
  8. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    Hi @EricDaily,

    Thank you for your interest in Tycoon Tile!

    At this time, Tycoon Tile does not support infinite dimensions within the same terrain object. You can however define quite large terrain objects and use multiple objects within the same scene. Working out cross-object modifications or placements however would require some extra effort to work correctly, but is certainly doable.

    The demo scene comes with a procedural terrain generator included. You can customize this generator to your desire.

    I hope this helps!
     
    EricDaily likes this.
  9. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
  10. Elibion

    Elibion

    Joined:
    Apr 1, 2020
    Posts:
    8
    Hello Vanamerax!

    I have some question for you.
    Are you planning on making further update on this asset? And if the answer is yes do you have any idea when?

    Also one of the shader stops working on the new Unity versions. Do you have any idea why? (TerrainGridShader). There is no direct errors but it's rendering pink.

    Happy holiday season to you too!
     
  11. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    Hi Elibion!

    Thank you for your interest in Tycoon Tile!
    To answer your questions:

    Yes I do have updates planned. On the top of the roadmap is better in-editor support for saving/loading/viewing/modifying the terrain. Most of it has been implemented but I do not deem it production-ready enough yet for public release. I cannot tell you a release date on that unfortunately, as Tycoon Tile is a product that I run besides my full time job and development on Tycoon Tile is not fulltime. I do try my best to provide any support as requested, but I advise to purchase Tycoon Tile solely on the notion of the product being as-is at the moment of purchase.

    As for the shader, are you using a scriptable rendering pipeline by any chance? The sample shader only supports the builtin rendering pipeline at this moment. The grid shader only serves as an example, you can use any shader compatible for your rendering pipeline as you like. Refer to the tile type assets to change your shaders.

    Happy holiday season!
     
    Elibion likes this.
  12. Dev-4U

    Dev-4U

    Joined:
    Nov 2, 2021
    Posts:
    23
    Good to know you're still on it!
    I wanted to report a couple issues that I had when getting started with TycoonTile, but unfortunately emails to support@tycoontile.com don't go through. I keep getting automated responses that the email couldn't be delivered.

    A few issues with the current version 1.3.1 and Unity 2021.2.7. Missing URP support is a bummer, but you mentioned that already.

    The main issue is: the package is not built correctly. Unity says it's a "complete project" package (probably by right-clicking the "Assets" folder?) and importing it could cause issues, see below:

    Trying to import package:
    upload_2021-12-26_16-51-31.png

    After choosing "Import" option from above:
    upload_2021-12-26_16-51-47.png

    Choosing "Install/Upgrade" will install package dependencies such as Collections. However, it results in errors originating from com.unity.package-manager-ui which I did not even want to try and resolve, because the issue is with Package Manager's dependencies and that seems fishy when this happens in an internal package. Possibly the Package Manager UI package was downgraded as a result of importing the TycoonTile package.

    Choosing "Skip" will install the package without dependencies: Mathematics and Collections. Collections has to be installed by identifier "com.unity.collections" since it's still in preview. So that's annoying but fixable by adding those two packages.

    The alternative option to "Switch Project" unpacks TT into a new, temporary project. From there I could export the package and re-import the new package in my project. That then behaved the same as choosing the "Import => Skip" options above.

    Finally, in OperationResult.cs(27) the three uses of .Length need to be changed to .Count() and then you're set.

    In result I got it working (in legacy RP) but with a lot of friction. I hope this helps others in the meantime until an update with fixes to these issues gets published.
     
    AldeRoberge likes this.
  13. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    Hi deprecatedperson,

    Thank you for reporting the issues you are having. The support email not coming through is a new one for me, I will check with my hosting, thanks!

    The issues with the package manager are known problems. Installing Tycoon Tile will require going back and forth with the package manager for a bit. I haven't found a reliable way to always get it working on first import. Importing and exporting from a different project does work indeed (but is obviously not an import process I can facilitate from the asset store). It is a very unfortunate and unexpected behaviour of the package manager, but the issue does seem to happen because the version of the package manager is also saved with the project, effectively downgrading it on install. I don't think there is much I can do to prevent this as long as I intend to support the 2018 LTS version. Given that that LTS will soon reach end of life, I will increase the minimum version to 2019 once the 2021 LTS version drops, which should hopefully resolve the issue.

    The Length/Count() is also known, again an issue that I simply cannot provide a fix for. Unity has decided to remove one of the properties and rename it, but didn't bother to provide a precompiler directive that allows me to switch the usage based on the installed package version. Should also be resolved once I upgrade the minimum version to 2019 LTS...

    Again, thank you for reporting the issues on the Unity forums. I would've gladly fixed them if I had a way to do so, but Unity lets publishers in the dark with changes like these. Plan is to resolve the problems in 2019 LTS, since minimum package versions there should be more compatible.

    I'm sorry that you had to endure the rough import process, but I am glad you found a way to get it imported. Enjoy using Tycoon Tile!
     
  14. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    Hi Everyone,

    I have pushed an update to Tycoon Tile that should improve the importing procedure. The minimum Unity Editor version will be 2019.4 LTS from this point on.

    Let me know if anyone still experiences problems importing Tycoon Tile into their projects!
     
    AldeRoberge likes this.
  15. MaxHeyderArt-GoldenSkull

    MaxHeyderArt-GoldenSkull

    Joined:
    Aug 14, 2013
    Posts:
    49
    Hello,

    I have purchased your solution today and am starting to look into it and evaluate it for my project.
    One of the biggest issues I have is that I wish to see the terrain in pause-mode and in editor as well, is there any way this can be easily accomplished? I find it a bit of a bummer to only be able to see the terrain during play-mode. This makes iterating and a couple of other things a bit of a nightmare.

    Also: do you have discord or easier ways of communication about the tool?
    I am aware you are working on this on the side, I have full sympathy for that and can relate, but maybe you are interested in potential deeper communication/support on this.

    All the best.
     
    Last edited: Mar 4, 2022
  16. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    Hi @MaxHeyderArt-GoldenSkull,

    First of all thank you for purchasing Tycoon Tile!

    Indeed, Tycoon Tile does currently not support viewing the terrain during edit time. While there has been work done to get editor support functional as an upcoming release, progress has been mostly halted due to personal circumstances. I do not have an estimate on when I can devote more time to the project yet. I can however provide you with the current state of that feature branch if you would like. It is still work in progress, functional, but not as bug free as I would like (hence not released yet). It should provide you with a great starting point however. Let me know if this is of interest to you.

    I do not have discord, that is correct. I would prefer to keep communication on the Unity forums either in this thread, or you are welcome to DM me if there are any specific non-public details that you would like to discuss.

    Hope this helps!
     
  17. polimerjones

    polimerjones

    Joined:
    Jun 11, 2018
    Posts:
    4
    The multi tile buildings dont check for level ground in all cases. Also. Tried to leave code as-is and swap out the house for a different prefab and the preview spawns/displays 10 or so tiles to the right for some reason.
    upload_2022-3-13_20-39-18.png
     
  18. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    Hi Polimerjones,

    Is your own prefab zero'd on the transform? It may help to create a root transform for your object and scale all visible meshes accordingly under that root node.
    In the default setup, the overlay on the terrain is what is being registered as the occupying terrain tiles, which is also the area that is checked for being level. Make sure the width and length are configured properly in the Constructable asset such that the area to check is well-defined.

    Hope this helps!
     
  19. T_dev

    T_dev

    Joined:
    Nov 13, 2019
    Posts:
    4
    Hi, Vanamerax.
    Once again I need your help.

    I'm looking for a way to change the material for each water source.
    (example, creating independent blue sea and muddy swamp water sources.)
    Since these water sources seem to be batch rendered by the Terrain tile renderer, it may be complicated to achieve what I want to do.
    If you have any good ideas or tips, please let me know.
     
  20. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    Hi @T_dev ,

    Having different materials for each water source is not supported by Tycoon Tile out of the box, however I understand your usecase.

    What you would need to do is modify the TerrainRenderer component and the water surface generation jobs it uses to account for different water materials. Probably needs some form of floodfill searching to 'match' different water tiles as a single body. There are some jobs which use this technique to 'remove the whole water body at once' included. When you click on a flat bottom of a water body it removes the entire body for example. You would also need to keep track of which water body uses which material somehow. And what happens when you 'connect' two different water bodies by lowering the terrain edge between them? These are things you probably have to account for.

    Hope this helps!

    Vanamerax
     
  21. AldeRoberge

    AldeRoberge

    Joined:
    Jun 23, 2017
    Posts:
    22
    Hello! Really cool asset. Just a few questions :

    Is there any plan for Tile Texture Blending?
    Is there any plan CTRL + Z support?

    Does the system automatically generate a Collider for the terrain?
     
  22. AldeRoberge

    AldeRoberge

    Joined:
    Jun 23, 2017
    Posts:
    22
    One more thing I would need from this asset, is the ability to change the 'visible width' of the top face.
    How hard would it be to do?

    upload_2022-5-27_14-24-6.png
     
  23. Elibion

    Elibion

    Joined:
    Apr 1, 2020
    Posts:
    8

    Tile texture blending would be awesome!
     
    AldeRoberge likes this.
  24. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    The included materials do currently not support tile texture blending. However, you can customize the renderer to your liking and use any material you wish. Certainly possible!

    There is no CTRL + Z support currently, no. Changes are handled in a centralised place though, so you could get this to work with some modifications. I will add it to the wishlist.

    The terrain does automatically generate colliders for the terrain, yes.

    I will also add it to the wishlist then :)
     
    Elibion likes this.
  25. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    You can use any material you would like to use for the surface and for the cliff meshes separately. In this case, you would need to have a shader where you can define some rendered width bases on vertex attributes. Then you would have to set these attributes on the cliff mesh vertices in the terrain renderer code, based on distance from top of the tile.

    Example: You set the uv1 attribute (or any other) of the two top vertices to 0 and set it to 'the distance from the top' for the bottom vertices. Then you interpolate between these values with a cutoff to either render the 'top edge' or the 'cliff texture' in your pixel shader.

    You could even use the uv0 attributes which already get mapped by the renderer to make an approximation, but then your 'edge width' would not be a fixed width but dependent on the height of the cliff face (it will stretch)
     
  26. AldeRoberge

    AldeRoberge

    Joined:
    Jun 23, 2017
    Posts:
    22
    Is the wishlist (project roadmap) public? I'd like to see what's on the schedule!

    I know you have mentioned that we should have no expectation, so I will say this under reserve, but if you can develop the top texture height width feature I'm willing to pay twice as much for this asset.
     
  27. AldeRoberge

    AldeRoberge

    Joined:
    Jun 23, 2017
    Posts:
    22
    Is it possible to not render tiles below a certain threshold?

    upload_2022-5-31_21-2-24.png

    I want to not render tiles below the water level (0). Is it possible to skip rendering tiles below a certain height level? Right now the tiles under the water are rendered, making a square. I do not want those tiles to be rendered, as I want a circular world.
     
    Last edited: Jun 2, 2022
  28. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    The wishlist/roadmap is not public, no. It is my internal wishlist/roadmap. I don't want to create any expectations for future development as I can not reserve to time to spent on further development at this moment. Although I would love to do so in the future.

    Buyers should decide on their purchase based on the current state of the product, which in my honest opinion is still a very good deal. Support will be provided within the scope of the asset as anyone could reasonably expect.
     
  29. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    You can modify/inherit from the TycoonTileRenderer component and use your own job implementation to customize the way the terrain is rendered. Rendering is decoupled from the other logic in Tycoon Tile. Easiest would be to either change the included implementation of the rendering jobs or copy the implementations and start from there.

    You basically skip rendering tiles based on their x/z position (for example using a formula based on distance from center, resulting in a circle) or you check the water heights and use that as a mask for your positions in the job.
     
  30. roh032

    roh032

    Joined:
    Sep 6, 2014
    Posts:
    3
    Hello, if i may, i would like to use edit terrain during editor mode. So, can you please send me mentioned branch also?
    Thank you.
     
  31. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    I have sent you a message
     
  32. Elibion

    Elibion

    Joined:
    Apr 1, 2020
    Posts:
    8
    Any idea on how to make edge of different ground material blend together :) ?
     
    AldeRoberge likes this.
  33. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    There are multiple methods to do this. You may use a fixed number of textures to blend between (usually 4 or 8) and use that for most tiles. If you have more tile types, you could split the terrain mesh in multiple meshes that use different materials to blend between. Alternatively you could use a texture array and blend between any textures.

    Blending will either way be determined by 'weight' values as attributes on the vertices. Using a uv1 or similar would probably be the most convenient. You would have to implement a custom terrain renderer component that sets these vertex attributes appropriately. The vertices on the edge would essentially be a 50/50 weight between texture A and neighbouring texture B. The center vertex could then be assigned a 100% weight of its own texture.

    Hope this helps!
     
    Elibion likes this.
  34. AldeRoberge

    AldeRoberge

    Joined:
    Jun 23, 2017
    Posts:
    22
    Would it be possible to add this as a built in functionality? I think a lot of people would benefit from this feature.
     
  35. Vanamerax

    Vanamerax

    Joined:
    Jan 12, 2012
    Posts:
    930
    That would certainly be possible, but unfortunately I currently do not have the time available to implement this feature as built-in functionality. Maybe in the future though, who knows :)
     
unityunity