Search Unity

[RELEASED]HexPlanet Pro: Spherical HexGrid Asset

Discussion in 'Assets and Asset Store' started by ZAxisTechnology, Oct 21, 2014.

  1. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    Heres the asset store link for convenience:
    https://assetstore.unity.com/packag...net-pro-spherically-tiled-world-builder-65466

    Hey guys,
    Ive been working on a procedurally generated spherical hexgrid for a while now and it finally works!
    It functions by subdividing an Icosahedron and then taking the dual polyhedron of the result to generate a grid on the icosphere composed of hexagons and pentagons. Each Hexagon or Pentagon tile is its own gameobject, so you can attach your own script to the tiles and have them do what you want.
    Ive seen a couple people asking for help with this type of thing and I was wondering if there are enough people interested in this for me to submit my working version on the AssetStore. So far you can dial in the number of subdivisions up to 4 levels, resulting in up to 2560 tiles. There will always be exactly 12 pentagonal tiles for any level of subdivision. Unity tends to freeze up for more than 4 subdivisions, but im working on expanding this.
    If anyone else would like to see this up on the asset store, Id be happy to submit it. My projected price is around 5$ for package. Let me know what you guys think!
    Cheers
    (Sphere with 1 subdivision)
    Screenshot (10).png
    (Sphere with 2 subdivisions: 162 tiles) Screenshot (11).png (Sphere with 3 subdivisions: 642 tiles) Screenshot (12).png (Sphere with 4 subdivisions: 2562 tiles) Screenshot (13).png (Example of what could be done using the package)
    Screenshot (3).png
     
    Last edited: Apr 20, 2018
  2. Kabbs

    Kabbs

    Joined:
    Mar 17, 2013
    Posts:
    4
    Hey,
    I'm interested. Is your package available in the asset store yet?

    Thanks
     
  3. exiguous

    exiguous

    Joined:
    Nov 21, 2010
    Posts:
    1,749
    I'm also interested to purchase it for a reasonable price.
     
  4. McNasty

    McNasty

    Joined:
    Dec 20, 2014
    Posts:
    4
    I would buy it today if it was there.
     
  5. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    You could easily sell it for a lot more if you include helpers for determining n tiles between tiles, direction of shortest arc between tiles, placement of objects on the tiles, a* (or any) path finding along tiles, and arbitrary camera orbiting. That could all be done by the user anyway though. Instant purchase for me either way.
     
  6. JacobDzwinel

    JacobDzwinel

    Joined:
    Dec 19, 2013
    Posts:
    26
    I would love to buy it!
     
  7. Aurigan

    Aurigan

    Joined:
    Jun 30, 2013
    Posts:
    291
    +1 for putting this on the asset store, please let me know if you do!
     
  8. Popcony

    Popcony

    Joined:
    Apr 14, 2014
    Posts:
    17
    I'd love to see this package on the Assetstore. +1

    Would this kit be used to make like a spherical board game? like Chess?
     
  9. hazman86

    hazman86

    Joined:
    Nov 4, 2015
    Posts:
    2
    This is spot on and just what I have been looking for...please tell me where I can get the source code / asset on the store!!!!!!!!!!!
     
  10. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    Hey guys, sorry for being MIA for a while. I didnt realize there was this much interest in this asset!
    If yall are still interested, I can put together a package for the asset store. Im thinking a price of around 3$ would be reasonable? Chime in if you would be willing to pay that amount. (This took a TON of work so Id prefer not to make it free)
    Thanks again for the support!
    Cheers
     
  11. imtrobin

    imtrobin

    Joined:
    Nov 30, 2009
    Posts:
    1,548
  12. exiguous

    exiguous

    Joined:
    Nov 21, 2010
    Posts:
    1,749
    for 3$ you can count me in.
     
  13. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    Great to hear that, Im currently updating it for Unity 5 and Ill submit it to the asset store today. In the mean time, heres a few screenshots from a game I made a while back using the hex sphere
     

    Attached Files:

    IFL likes this.
  14. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    Just resubmitted to the asset store! Should be a couple of days before approval and then its live!
    Hope yall enjoy it, thinking of making a slightly more expensive pro version with pathfinding and some more infrastructure built in to allow for quick game creation.
     
  15. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    As some of yall may have noticed, HexPlanet just went live to the store!
    https://www.assetstore.unity3d.com/en/#!/content/63758
    Hope yall enjoy it and leave a rating and review if you do!
    Thanks for all the support, Ill start another thread to announce updates/upgrades etc
     
    IFL likes this.
  16. exiguous

    exiguous

    Joined:
    Nov 21, 2010
    Posts:
    1,749
    Hey ChicknBoots,
    I have purchased it and wanted to make a review. Before doing so I have some complaints/suggestions you could improve to recive a higher rating ;).
    1) You have exported it as a "complete project" which simply overwrites your customers project settings when importing if not unchecked. So it would be better to leave these out from the package entirely when there is no urgent need for it. I find it quite demanding and invasive fur such a simple asset and restricts it from beeing imported into existing projects.
    2) Importing the package into an empty project spawns 5 warnings (assigned but never used) into my console. I'm allergic to packages which do this since I need my console to display important stuff and don't want to search it in the clutter of "lazy" package creators. So I (and certainly others) would apreciate if my console stays clean when I import your package.
    3) There are no prefabs provided. Sure one can assemble them themselves but why put this inconvenience onto your paying customers? When dealing with a purchased package I expect to provide the functionality in a drag and drop manner and not in "bare bones" where I need to construct everything myself.
    4) When running the example scene I get the error Tag "Tile" is not defined. I guess because I did not import the project settings. This requirement should be mentioned.
    5) In the camera script moving up/down is reverted.
    6) Your code could use some comments. Especially public fields (inspector modifiable) should state what they are used/required for.
    7) Creating a GameObject for every tile is inelegant. And having a mesh collider for each is quite expensive. I thought the whole sphere is one mesh.

    If you fix issues 1 to 6 I could offer you a 4 star rating. But in my opinion the asset is only usable for simple projects due to the performance implications of your "many GameObjects with colliders" approach. I thought it could be improved by "terrain generation" and path finding (fe for strategy games) by myself but I'm not sure its suited for that.
     
    IFL likes this.
  17. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    Given the price, I think I had much lower expectations than @exiguous, but his thoughtful feedback is great if you want to substantially improve the product. If you do implement his suggestions, I really think the price should be increased. Either way, I'm happy with it.

    1. Agreed. If the Project Settings are included to setup the Tags, maybe it should just be mentioned in the read-me that the "Tile" tag has to exist. Or remove the tag reference in the code. I personally won't be using them.
    2. It's not really important to me given the price. If it was >$20 then I'd agree. They're very easy fixes though so maybe it should be fixed.
    3. Would be nice, but see #2.
    4. See #1.
    5. I think the camera is fine. I imagine it like pressing in the direction that you want to "push" the planet away. That said, maybe there should be an option to invert the direction.
    6. Would be nice, but see #2.
    7. I disagree with having just one mesh, but it would be nice to have modes to choose what you want. I modified the script to make each tile have a local space so that I can align surface objects without hassle. That wouldn't be as easily doable with a single-mesh version. I'm divided on the multiple mesh-colliders though. A sphere-collider would be faster, but it'd be dysfunctional on the lower-resolution versions.
     
    exiguous likes this.
  18. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    Thanks for the suggestions! I wasnt aware that it would overwrite your project settings, Im sorry about that and it will be one of the first things I fix.

    I can easily update the package to have a prefab, although its as simple as attaching the main script to an empty and assigning 2 materials. Youre right though, it would be nice to have it drag and drop ready.

    Im going to get around using the Tile tag so you wont have to import those settings or define it yourself.

    In terms of creating a gameobject for every tile, this was the main point of the package: This allows you to change the materials and attributes of each tile independently and makes it much more flexible. If the entire sphere was a single mesh, changing a tiles color would require altering the material of the entire sphere each time. I think its a bit more user friendly to be able to deal with any tile you want individually instead of going through the sphere's script. I was considering something similar to your suggestion, however, by having the planet be a single mesh and each tile being a submesh.

    I was going to put in an option to choose between a mesh collider or something simpler in a future release, but I didnt think the mesh colliders would be too bad considering they have only 5 or 6 vertices.

    In future releases, I do plan on implementing pathfinding as well as some templates for unit movement.

    Thanks again for the reply! Ill be working on these issues and releasing an update as soon as possible.
    Cheers
     
  19. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I think $3 is a bit low. You should raise it to $5, then $10 etc as you polish it up. If only to give you incentive to work on it.
     
    IFL likes this.
  20. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    Im honored you think so! As this was an initial release with fairly limited capabilities, I set the price really low. I am planning to raise the price to 10$ after the major updates are finished.
     
    IFL likes this.
  21. exiguous

    exiguous

    Joined:
    Nov 21, 2010
    Posts:
    1,749
    The planet is quite easy. I'm also talking about the pointer which has many fields to be set correctly.

    If all material colors were in one texture (atlas) you could just adjust the UV's of the desried tiles to represent this change and thus the material itself could remain for the whole lifetime. Updating the UV's each frame for a single mesh from a persisting Vec2 array is not costly at all. And it would be updated less frequently in most cases.

    Thats why the complex functionality should be hidden behind your API so the user just calls a method and this one does all the dirty stuff.

    A mesh collider is always expensive no matter how few vertices it has because Unity must iterate over all triangles and cannot use "optimized" versions like for a sphere for example.
    One idea is to have an invisible UV sphere (custom made because Unity's has some issues at the poles) with a certain layer and do a raycast only against this layer. If it hits something (your sphere) you have the position and then loop through all tiles and do a quick point-sphere distance check with squared distance (root is costly). This should be quite inexpensive compared to your meshcollider per tile approach.

    Sounds good. Since you already have the neighbour list this should'nt be too hard.

    Fine.

    Agreed.
     
  22. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    Hey guys!
    Im so glad that this asset has been downloaded by so many people and the feedback so far has been great!

    As I said previously, Im going to release a much more robust version with a bunch of new features as a separate asset with a price of $10. Heres whats going to be added in the "Pro" version:

    Fast Pathfinding:
    --Find the shortest path between any two tiles, if it exists, and return a stack of tiles indicating the path.
    --Options to set certain tiles as "non-navigable" and ability to specify a navigation matrix so that some units cannot move on certain tiles while others can.

    Enclosed Region Detection:
    --Functions allowing you to select any tile and find all connected tiles of a certain type.
    --Useful for identifying "islands" of tiles surrounded by non-navigable tiles or enemy tiles etc.

    Unit Movement Templates:
    --Scripts which can act as the base class for any units that need to move around the sphere.
    --Handles properly aligning the unit's transform forward to their movement heading and correctly rotates them around the sphere

    Option to build a single mesh
    --As mentioned above, Im going to allow you to specify whether or not youd like the generated tiles to have their own meshes, or if the planet acts as a single mesh

    Support for Multiple Planets:
    --Reorganization of the scripts so that multiple independent hex planets can simultaneously exist in the same scene

    General Optimizations
    --Option to specify collider type and therefore tile raycasting accuracy
    --Faster and more memory efficient planet building

    Please let me know what other kinds of features youd like to see in this new update and Ill try my best to incorporate them!
    Thanks a bunch guys, looking forward to hearing your ideas
     
    Last edited: Jun 19, 2016
  23. exiguous

    exiguous

    Joined:
    Nov 21, 2010
    Posts:
    1,749
    The "separate Asset" thing annoys me a bit. I don't feel like pay again. Whats the reason for this? All the planned features (which are not realized yet) could be used by "normal" (non pro) users too.

    Also for the pathfinding you should include some movement cost. So on streets through grassland you move farther than through high mountains.
     
  24. IFL

    IFL

    Joined:
    Apr 13, 2013
    Posts:
    408
    I kind of agree with @exiguous. Obviously, since it's your asset, you can do whatever you want with it. I just don't really see the point in having the two versions...
     
  25. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    I just realized that I misunderstood how the paid upgrade process works. I would be able to make a new Pro version which contains all the features discussed above, and change the existing version to a Lite version. The new version would be priced at 10$ and the lite version would keep the same price, but obviously I would offer an upgrade price for existing users so that you wont pay the full price. I would then eventually deprecate the Lite version to transition to a single asset.

    I want to be as fair as possible to you guys who have already paid for the existing version, but at the same time, if I dont charge at all for the upgrade between versions, I would be losing quite a lot of money, and the new features required a good amount of work on my part.

    I will of course clean up and optimize the Lite version but as some of you said, 10$ is a more reasonable price for the "pro" features and I wont include them in the Lite version.

    Please let me know what you think of this, as I said Id like to be fair to everyone and I will consider all suggestions.
    Thanks guys!
     
    IFL likes this.
  26. Wavinator

    Wavinator

    Joined:
    Dec 24, 2013
    Posts:
    79
    Very much interested in this, especially if you can support multiple planets.
     
  27. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    Just submitted it to the asset store today. Ive also added a custom editor extension to allow the building of the planet in the editor
     
    IFL likes this.
  28. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    And you can have as many planets as your rig can handle ;)
     
  29. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    Last edited: Jun 28, 2016
  30. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    Hey guys,
    After a long hiatus Ive started updating this asset again and its getting a major overhaul!

    Ive massively simplified and optimized the source code so the planet generation should be much quicker and the code should be quite a bit easier to read.

    Ive also created some demo scripts and a scene to show unit movement and pathfinding in action with no setup.

    Im cleaning up the custom inspector and Tile class and adding some handy tools for selecting all tiles sharing the same properties such as extrusion height, color, pathfinding cost etc.

    Due to popular request, Ive added the option to invert the sphere so that all tiles / meshes face towards the planet center.

    Theres now an option to generate the sphere as a single mesh without creating tile objects. Keep in mind that this removes ability to use navigation / pathfinding and all of the functionality associated with having separate tile objects.

    Theres now an option to toggle the generation of tile colliders as well as a drop down to select collider type (box, sphere or mesh).

    If theres any other features you guys would like, let me know now and Ill try to get them into the next update.

    Thanks all!
     
    Last edited: Apr 11, 2018
  31. ZAxisTechnology

    ZAxisTechnology

    Joined:
    Sep 12, 2014
    Posts:
    68
    Submitted to the store today, it should be out in a day or two!
    Heres a video showing some of the new features:


    Im going to be adding some more features over the next few months so keep an eye on this thread for more info.
    Once again, if you guys can think of any useful features just let me know and Ill try to incorporate them!