Search Unity

HexMap Editor for the Honey Hex Framework

Discussion in 'Assets and Asset Store' started by tango209, May 29, 2015.

  1. tango209

    tango209

    Joined:
    Feb 23, 2011
    Posts:
    379
    Howdy Folks,

    The HexMap Editor for the Honey Hex Framework is now on the asset store. It allows you to create and manipulate the excellent Honey Hex Framework maps which is also on the Asset Store. It currently contains the following features:
    • File Management
      • Load Map
      • Save Map
    • Map Generation
      • Generate a random map using HHF's built in algorithm
      • Generate a map from the selected terrain
      • Generate a map from custom script file
      • Generate a map from an image 'heightmap' NEW
    • Debugging Helper Information
      • Hex Coordinates (hover)
      • World Coordinates (hover)
      • Mouse Coordinates (hover)
      • Map Generation Time
    • Terrain Manipulation
      • Random or provided rotation
      • Random or provided blend
    • Terrain Palette
      • Select a terrain hex to use
      • Display the terrain's name
      • Display any tags assigned to the terrain
      • Display any foregrounds their counts assigned to the terrain
    • Rivers
      • Display rivers and their node vectors
      • Delete selected river
      • Delete all rivers
      • Place rivers
    Here's a quick video showing off the features:


    Please feel free to let me know of any improvements you'd like to see!
     
    Last edited: Jun 25, 2015
    overthere likes this.
  2. laf3rs

    laf3rs

    Joined:
    Jan 30, 2014
    Posts:
    5
    The map editor is great. But I am having a problem now. When I generate a map using map editor custom generating function then I spawn a character, I get an error when trying to move it:
    There are no graphs in the scene
    UnityEngine.Debug:LogError(Object)
    AstarPath:StartPath(Path, Boolean) (at Assets/HoneyFramework/3rd party/AstarPathfindingProject/Core/AstarPath.cs:2268)
    HoneyFramework.Formation:GoTo(Vector3i) (at Assets/HoneyFramework/Scripts/Formation.cs:136)
     
  3. tango209

    tango209

    Joined:
    Feb 23, 2011
    Posts:
    379
    Hi,

    I will take a look at this tonight and get back to you.
     
  4. tango209

    tango209

    Joined:
    Feb 23, 2011
    Posts:
    379
    Try adding the following class to a gameobject in your scene. It should initialize the pathfinding system that shipped with the Honey Hex Framework.

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using HoneyFramework;
    4. using Pathfinding;
    5.  
    6. public class Pathfinding : MonoBehaviour
    7. {
    8.   public AstarPath Pathfinder;
    9.  
    10.   void Start()
    11.   {      
    12.     // Pathfinding Setup
    13.     this.Pathfinder = this.gameObject.AddComponent<AstarPath>();
    14.     AstarPath.active = this.Pathfinder;
    15.     AstarPath.RegisterSafeUpdate(this.ActivatePathfinder);
    16.   }
    17.  
    18.   public void ActivatePathfinder()
    19.   {
    20.     HexGraph graph = new HexGraph();
    21.     graph.active = this.Pathfinder;
    22.     graph.ScanInternal(null);
    23.     this.Pathfinder.graphs = new NavGraph[1] { graph };
    24.   }
    25. }
     
  5. tango209

    tango209

    Joined:
    Feb 23, 2011
    Posts:
    379
    Per a request, I've added the ability to generate a map using an image as a 'heightmap'.

    imagemap.png

    To generate a map using an image:
    1. Select an image.
    2. Add lookup entries. upload_2015-6-24_16-44-37.png
    3. Set the color value to associate the terrain entry with. upload_2015-6-24_16-44-37.png
    4. Select the terrain the red portion of the color value corresponds to. upload_2015-6-24_16-44-37.png
    5. Select the ‘Generate Map From Texture’ button.
    Optionally:
    • Default: the generator will use this terrain for hexes outside the images size.
    • T: Toggles between the color picker and a numeric entry field.
    • R: Allows you to use the green value of the lookup color to set the rotation instead of using random. Due to the limited value of a color component (0-255), the value will be multiplied by 2. For example, if you want 90 degrees you would enter 45 in the green color component.
    • B: Allows you to use the blue value of the lookup color to set the blend instead of using random. The values range from 0 (no blend) to 255 (fully blended).
    • Offset X: Offsets the image coordinates onto the map coordinates in the forward/backward direction.
    • Offset Y: Offsets the image coordinates onto the map coordinates in the left/right direction.
     
  6. PiAnkh

    PiAnkh

    Joined:
    Apr 20, 2013
    Posts:
    126
    I just got honey hex framework and this editor. It is working except for the commit changes function.
    When I press the button, nothing happens. It just stays highlighted, The drop changes button on the other hand is working.
    Any idea what the issues could be why the commit changes button is not wokring?

    thanks
     
  7. tango209

    tango209

    Joined:
    Feb 23, 2011
    Posts:
    379
    Hi Caeru,

    Nothing come to mind. Are there any messages in the Console? If you have a small example project that you could get me that would help a lot in identifying the issue. Regardless, I'll take a look at that part of the code this afternoon to see if anything jumps out at me.
     
  8. tango209

    tango209

    Joined:
    Feb 23, 2011
    Posts:
    379
    Looks like I borked the Commit Changes button on that last release. I'll submit the fix today. In the mean time, if someone needs the fix, please PM me your invoice # and and your email address and I can email you the fixed version.

    I apologize for the inconvenience.
     
  9. carpatia89

    carpatia89

    Joined:
    Jan 14, 2016
    Posts:
    1
    Hi tango209,

    Thanks for the Map Editor, I really need a tool like that . I just got honey hex framework and the editor. But what about tutorials? I think that the editor such a successful tool, deserves a well documented tutorial for its users. Basically, how to maintain the custom maps with editors step by step.

    As I m a newbie Map Editor user, I want to create a map of a country's google maps image. At first i decided to start the read documentations and watching video tutorials about the map editor but..... :/

    Be aware that the editor is the most important part of the Honey Hex framework. Also the documentation is very important for a product. Current documentation which is given in .pdf format and the video on Youtube, is not enough for the users. May be soft copy documentation or may be the video tutorials like "Introduction to Map editor" . will be great guide for the users

    These are just my opinions. I hope u appreciate.

    Another question is; because of all math operations are hex-based, the world that consist of lots of small hexes, is always a 'big hex' isnt it? I mean, the world can be another shape?

    The third question, how can i generate a country's map for example USA with map editor?

    Sorry my bad and poor English. I'm really waiting for your answers.

    Thanks.
     
    Last edited: Jan 20, 2016
  10. cdk_web

    cdk_web

    Joined:
    May 2, 2013
    Posts:
    3
    Hi!

    Just trying out all features of the Hexmap editor.

    Trying to generate a map based on the image map feature and i can´t get it to work properly.

    Problems:
    - It seems to just use a little corner of the generated map?, how do i make it use the whole map?

    - Can i use an image map bigger than the original 10x10 example (for more "detail" and bigger maps)?

    Thanks!

    David
     
  11. tango209

    tango209

    Joined:
    Feb 23, 2011
    Posts:
    379
    Hi David,

    1) It should be creating as many hexes as there are in your image, if you've told Honey to create enough tiles to hold them. Can you post a screenshot of the image and the results?
    2) As per 1, yes, just make sure to set Honey's tile fields to make them large enough.
     
  12. GermiyanBey

    GermiyanBey

    Joined:
    Aug 18, 2017
    Posts:
    68
    Howdy,
    I got Honey Hex Framework but I couldn't make use of it due to its coding requirement (I am a Playmaker user) other than generating the map. My second option was, saving the map, its generated mesh and foreground but as they are instanced materials, I was unable to save them without proper knowledge. Then I encountered this nice Map Editor.

    My question is, can I save the map with everything on it (classic Honey Hex visuals) and work on that map in Editor (not runtime), so I can place my buildings, props, characters, etc on the map like how we decorate a classic unity terrain map? I would like to use Honey Hex Map as my new Terrain base.

    Also can we add Roads on Terrain easily by using your editor? (I saw how you added river in video, it is awesome, can we do similar for roads?) I saw there is a builtin Road feature in Honey Hex, but we add/destroy it by mouse gestures it seems, not convenient for me. In Editor, building roads on hexes permanently on ground would be really nice.

    Thanks.
     
  13. tango209

    tango209

    Joined:
    Feb 23, 2011
    Posts:
    379
    Hi GermiyanBey,

    Let me take a look at it tonight when I get home from work. I know I had generated a mesh from it at some point, but can't remember if it ever made it into the release and I need to double check on the road feature.
     
  14. GermiyanBey

    GermiyanBey

    Joined:
    Aug 18, 2017
    Posts:
    68
    Hi Bob,
    Thank you very much for the reply. If both generated mesh, foreground, water can be available to work on Editor, and roads, these would be awesome. I will be awaiting your reply soon. Wishing you a nice day and easy work.
     
  15. GermiyanBey

    GermiyanBey

    Joined:
    Aug 18, 2017
    Posts:
    68
    Also in Support section of your website's "Submit" button does not work. Before I wrote here, I tried to contact you from there first. This can be important, because your assetstore page only provides your website in contacting you.
     
  16. tango209

    tango209

    Joined:
    Feb 23, 2011
    Posts:
    379
    Unfortunately, I was unable to find the prototype where I was trying to get a mesh from the map.
     
  17. GermiyanBey

    GermiyanBey

    Joined:
    Aug 18, 2017
    Posts:
    68
    That's sad news. Can I ask, if you can add such function to HexMap Editor? If answer is yes, I will buy the asset. And I will be happy if you can say when. Because I saw "Save/Load Map" mentions in AssetStore Description, I wanted to double check here.
    If not, please let me know, so at least I will discard possibility of using Honey Hex in a future project. Thanks.
     
  18. tango209

    tango209

    Joined:
    Feb 23, 2011
    Posts:
    379
    I don't think so. The Honey Hex Framework is no longer being updated and it was not working correctly in the last iteration of Unity 5.
     
  19. GermiyanBey

    GermiyanBey

    Joined:
    Aug 18, 2017
    Posts:
    68
    It works nicely in 2017.4.23 for me. I wish if you could add such Mesh support, but I understand. Thanks for clarification.