Search Unity

Map Graph – Node-based Random Map Generation

Discussion in 'Assets and Asset Store' started by InScatterbrain, Aug 3, 2020.

  1. JuanJSAR

    JuanJSAR

    Joined:
    Feb 21, 2014
    Posts:
    47
    It would be excellent.

    I will look forward to the example, and to be able to implement it in my game.

    Thanks for the attention and the prompt answer.
     
  2. linlinsky

    linlinsky

    Joined:
    Jul 21, 2017
    Posts:
    4
    Hi, how to dynamically generate a new map and connect it with the current map when the player moves on the map?
    It's like a map of infinite size.
     
  3. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    While infinite maps are still a bit of an uncharted territory, there are some things you can do, like instead of creating a single big map, generate different chunks as needed and place those next to each other in your scene.

    Could you share a bit more details about your particular use-case? So I can try to give you a more concrete answer. :)
     
  4. bibaleebu

    bibaleebu

    Joined:
    May 3, 2021
    Posts:
    6
    I was running through the object placement tutorial and I was wondering if there was any way for your generator to actually place objects instead of just throwing additional tiles onto a new map. I was hoping I could use it to randomly place trees for my game. Trees are objects that my player can interact with so just using tiles doesn't really work for this. Any ideas? Thank you!
     
  5. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Instead of adding them as tiles, you can create prefabs for your trees and generate GameObjects from those prefabs.

    It works basically the same as generating tilemaps, but instead of using a tileset and the Texture To Tilemap and Copy Tilemap Data nodes, you can define a prefab set and use the Texture To GameObjects and Replace GameObject Children nodes. There's an example called "3D Prefabs" in the sample project that demonstrates this.

    Alternatively, you can use tilemaps as well, but by using Unity's rule tiles, instead of the default ones. While you may not need the "rule" parts of the rule tiles, these tiles also allow you to add a GameObject to them.

    Does this answer your question? :)
     
  6. bibaleebu

    bibaleebu

    Joined:
    May 3, 2021
    Posts:
    6
    I did manage to figure it out using the example. I'll admit, though, that figuring out I needed a container gameobject in the scene to hold the prefabs took me a few solid minutes. Is there a way to specify which prefab is generated? There's not a way that I can find to select a color that's connected to a prefab. Do I just need to create a new set for each type of prefab? Thanks again!
     
  7. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Thank you for mentioning that, I'll update the documentation to explain this better!

    The way you do this is basically the same as with a tileset, but instead of creating multiple tile types you can create multiple prefab types. So you should only need one set here.

    For example, if you have a graph using this prefab set and named color set:
    upload_2021-5-18_10-41-25.png

    upload_2021-5-18_10-41-55.png

    Using these, Map Graph will generate GameObjects of the type "Wall" for each "Wall"-colored point (black, in this case). It will randomly use either the "Wall 1" or "Wall 2" prefab for this. Floors are generated for each "Floor"-colored point (in this case that's white).

    You might want to link your named color set to your prefab set, as this will automatically keep the named color set synchronized with the prefab set (or any other linked sets). Linking color sets is explained here.

    I hope this clarifies things a bit, please let me know if there's anything else I can help with. :)
     
  8. bibaleebu

    bibaleebu

    Joined:
    May 3, 2021
    Posts:
    6
    Two tiny things. I'm sorry I've got so many questions. Firstly, on the actual map graph object, there is a slot to designate one named color set. Mine currently holds my actual tileset and not my prefab set so I'm not able to actually select them as a color. I added tile types to my tileset with the names of the game objects and the script seems to know to pull the appropriately named gameobjects from my prefab set. Not sure if there's another way I'm meant to do that. Secondly, my gameobjects are spawning slightly up and the the right so I have to reposition the container objects varying amounts to accommodate. Have you seen that happen before? I'll upload my graph so you can have a look. Hopefully you can make it out.

    Thanks again!

    Screenshot 2021-05-18 111341.png
     
  9. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    No worries, I'm glad to help. :)

    It should only be possible to assign a named color set to that particular slot. Tilesets and prefab sets should be passed as input parameters. The Texture To Tilemap and Texture To GameObjects nodes, both use the same named color set to find the correct tiles or prefabs for each color. It sounds like you've actually got this set up correctly, but might be confusing the named color set with the tileset.

    As far as I can tell, your graph looks fine. If your positions are a bit off though, you can check if the width and height of your prefabs match those set for the prefab set:
    upload_2021-5-18_22-22-16.png

    You might also want to make sure that the root object of your prefab is positioned at its center.

    Offsetting your container objects a bit can also be valid solution, but you have to make sure it works for all the prefabs.
     
  10. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    I've updated the online build of the sample project: https://insane-scatterbrain.itch.io/map-graph-demo-project

    I've added an example called "3D Layers". It's pretty basic, but it should demonstrate how to work with different levels/layers pretty well.

    The example will be included in the sample project of the following release (v1.6), which will be coming in the next week or so. :)
     
  11. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.6 is now available.

    The main goal of this update is to create a faster workflow, by introducing a searchable "Add Node" menu and by being able to open the "Add Node" menu by dragging a connection from a port onto empty space. In the latter case, the "Add Node" menu will only show the nodes that are compatible with the port in question and if a new node is created, it will be automatically connected to that port.

    There are a bunch of other changes and node fixes, which you can find below.

    Changes:
    • Adding nodes to a graph is now done through a searchable window, which is accessible through the new "Add Node" option in the context menu or by pressing spacebar.

    • Dragging a connection from a port into empty space, will now open up the "Add Node" menu, showing only the options compatible with that port.

    • If a node is then created, the port will be connected to the first compatible port on the newly created node.

    • The Perlin Noise Fill Texture node now has a Noise Data output port, containing the noise values generated for each point.

    • The Draw Noise Threshold node has been added. It takes Noise Data and draws the given color at each point with a noise value above (or below) a given threshold onto a texture.

    • Whenever a node throws an exception, the graph is now automatically opened in the editor with the failing node centered and marked red.

    • Whenever a node fails a check, the graph is now automatically opened in the editor with the failing nodes centered and marked yellow.

    • The Merge Areas node has been added. It takes two sets of area and merges it into one. Any overlapping areas will be merged into a single area.

    • The Invert Mask node has been added.

    • Added the "3D Layers" sample to the sample project.

    • Whenever a graph asset gets renamed, the title of its editor window, is now updated to reflect the new name.

    • The Areas To Points, Points To Areas and Rects To Areas nodes have been moved to a new "Convert" category.

    • Improved fill percentage accuracy on the Random Rectangles node, especially when overlap is enabled.

    • Fixed a bug where selecting a different graph on the Process Graph node, would add another help (?) button.

    • Fixed a bug where a graph could break when changing the graph on a Process Graph node, while it's still connected to other nodes.

    • Marked Process Graph nodes as not-duplicable for now, as it doesn't work correctly.

    • Fixed a bug where renaming a type in a tileset or prefab set to an already existing name, wouldn't revert the action properly, leaving the set in an invalid state.

    • Fixed a bug where deleting a prefab set or tileset linked to a named color set, would cause that named color set's inspector to break.

    • Fixed a bug where the selection of a color on a Named Color node from a linked named color set, wouldn't persist.

    Check out the complete changelog here.
     
    Last edited: May 31, 2021
  12. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Please note that the documentation doesn't contain all of the v1.6 changes yet. I'll finish updating it soon. In the meantime, please let me know if something's unclear.
     
  13. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    You can now do this using the Draw Noise Threshold node and the new Noise Data out port on the Perlin Noise Fill Texture node.
     
  14. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    I've added two important changes to the list that I forgot to mention before, namely:
    • Whenever a node throws an exception, the graph is now automatically opened in the editor with the failing node centered and marked red.

    • Whenever a node fails a check, the graph is now automatically opened in the editor with the failing nodes centered and marked yellow.
    This should help a lot with debugging your graphs, as it will display the exact nodes that fail in the graph editor, instead of just the warning/exception in the debug log.
     
  15. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    The documentation has now been updated for v1.6. :)
     
  16. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.6.1 is now available.

    Changes:
    • The Process Graph node now uses default values for unconnected in ports, just like regular nodes do.

    • Focus is now given to the first input field of a node, when it's first created.

    • Fixed issue where deleting a parameter from a graph would sometimes throw an exception.

    • Manual: Updated sample project credits section.

    • Manual: Updated node index.

    • Manual: Updated outdated tutorial texts.

    Check out the complete changelog here.
     
  17. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.6.2 is now available.

    Changes:
    • Changed the way the Process Graph node's ports are updated whenever the selected graph's parameters are changed, in such a way that it doesn't have to reload the entire graph editor window each time a parameter is added/removed/renamed/moved. The previous method was slow and caused a bug that would make the Unity editor freeze in certain situations.

    • Name fields will now get unfocused before deleting an item from a list (such as a list of input parameters or tile types), as this was causing the deleted item's name to stay in the name field, causing unintended renaming of the item selected after deletion, giving it the name of the deleted item.

    • In addition to highlighting a node in the graph editor when it triggers an exception when processed, it will now also be highlighted whenever it causes an error to be logged.

    Check out the complete changelog here.
     
    clagrens likes this.
  18. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
  19. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.7 is now available.

    This update contains a bunch of new nodes, among which is the Random Walker node. You can check out how to create interconnected cave systems with it in the manual. You can also check out how to use it to create connected rooms in the new "Roguelike (Equal Rooms)" example that's been added to the sample project. This example also demonstrates how you can use some of the other new nodes.

    Changes:
    • Added Random Walker node.

    • Added the Scale Texture (Vector2) node. It's similar to the normal Scale Texture node, except you can assign different scales for the width (x) and height (y).

    • Added Shift Texture node.

    • Added Draw Grid node.

    • Added Resize Texture and Change Texture Size nodes.

    • Added Areas Centroid Points node.

    • Added Connected Points To Points node.

    • Added the [ExplicitInPortTypes] and [ExplicitOutPortTypes] attributes, which can be assigned to a node class to explicitly register port types on it.


      This can be used to make sure that these nodes show up in the node search menu when filtering by port type, when the ports have not been added using the [InPort] or [OutPort] attributes, but by means of the AddIn and AddOut methods instead. (An example of this are the RandomNode classes.) This will also make sure that you can add input/output parameters of those types.
    • The Max. value for the Random Int, Random Vector2Int, Random Vector3Int nodes are now inclusive, as originally intended.

    • The Draw Connections (Shortest Path) node's Width port now has a default value of 1, when unconnected, instead of being required.

    • Sample Project: Added Roguelike (Equal Rooms) example.

    Check out the complete changelog here.
     
    clagrens likes this.
  20. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.8 is now available.

    More nodes for creating connections have been added.

    The node index hasn't been updated yet to include the new nodes, but here's a description of what you'd want to use them for.

    Area Graph (Random Spanning Tree):
    This node is similar to the Generate Area Graph (Minimum Spanning Tree) node, in that it connects all the given areas together, but where the MST variant creates a graph that's the connected in the shortest way possible, the RST variant connects the areas in a way that's more random.

    Add Random Edges:
    Say you use a Generate Area Graph node to connect areas together, but you want to add some additional connections between areas, then you can now use this node to do so. For this purpose, the Generate Area Graph nodes now have an Unused Edges port that can be used by this node to randomly pick connections from.

    Draw Connections (Biased Random Walk):

    Drawing connections with the other Draw Connections nodes, tends to connect two points using straight lines. While this looks good in many cases, in some cases, if you're working with a cave-like environment for example, this can look a bit unnatural. For this reason the Biased Random Walk variant is introduced. This node draws connections by randomly walking from one point to the other, while slightly (how slight is adjustable) preferring walking towards the other point, resulting in more organic looking connections.


    Changes:
    • Added Generate Area Graph (Random Spanning Tree) node.

    • Added Add Random Edges node.

    • Added Unused Edges out port to the Generate Area Graph (MST) node.

    • Added Draw Connections (Biased Random Walk) node.

    • Moved the Connected Points To Points node to the Convert category.

    • Manual: Added the nodes added in v1.7 to the node index.

    • Manual: Added a section about the Random Walker to the "Basic Map types > Cave-like maps" page.

    • Manual: Added sections to the troubleshooting page and the "Creating your own nodes" page about the proper use of Rng inside a Map Graph node.

    Check out the complete changelog here.
     
    clagrens likes this.
  21. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.9 is now available.

    More nodes and a new example. :)

    Changes:
    • Added Flip Texture node.

    • Added Rotate Texture node.

    • Added Split Vector2Int node.

    • Added Offset in port to the Stamp node.

    • Added Mask support to the Perlin Noise Fill Texture node.

    • Renamed Generate Area Graph (MST) to Generate Area Graph (Minimum).

    • Sample Project: Added RTS example.

    • Manual: Updated the node index.

    Check out the complete changelog here.
     
    clagrens likes this.
  22. DuDuDuDu

    DuDuDuDu

    Joined:
    Jan 13, 2015
    Posts:
    1
    Hi! After I purchase Map Graph and I just play around with it for a while, I found it really useful to generate some map with simple Graph.
    For example:
    Graph.png
    Generate:
    Map Final.png
    Which is pretty nice!
    But I got some problems with map generation after I played with another map generator plug-in in Unity.
    It seems that all map generators are designed for top-down 2d games or 3d games, but the map that I want to build is a horizontal platform game with caves, rooms, and some pre-defined rooms.
    The first thing is I found the horizontal platform game tile rule is much more complicated than the top-down 2d game and I just find something like the 47 Rule Tile(A rule tile with 47 rules) to achieve the image above.

    The second major problem which confuse me is when I trying to do a more complex generation of the map, such as map decoration behind or front of this tilemap(eg. the cave rock background or some dungeon things like jail in the background), also the placement of room interactable item like door, the door switch, the elevator, one-way platform, and ladders.

    I just can't use Random Fill Point Node to fill those items like the top-down game because I just can't let the door place in the mid of the air.

    I just wondering if you have any suggestions about the second problem, like how to exactly know the floor of each room or placement of ladder or door.

    Thanks in advance!
     
  23. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    I can imagine a 47 rule ruletile becoming a bit unwieldy. ;)

    There are ways you can avoid this though, by splitting up the tiles a bit. In your case, I'd probably split the grass from the other tiles, and draw those on a tilemap on top of your existing tilemap. Though I'm sure there are other (maybe better?) ways you could do it. :)

    That would look something like this:
    upload_2021-8-7_20-3-53.png

    You'll probably want to work with multiple layers of tilemaps. Most of the examples in the sample project do this, so I suggest you take a look at those.

    Placing objects on the ground level can be achieved in a similar way as drawing the grass, but instead of drawing onto the cave tiles you can fill the tile above them. You can then use that as a mask to place the items on the right level:

    upload_2021-8-7_20-7-48.png
    (Note how the red tiles now only get placed on the ground level.)

    Placing ladders might be a bit more challenging, but a good place to start would be connecting the ground level tiles (extracted using the method above) using a Draw Connections (Manhattan) node. This method will create horizontal connections as well as vertical ones though, so that's not perfect for ladders. That would look something like this:
    upload_2021-8-7_20-9-16.png

    I'll see about figuring out a better way to do ladders though.

    I hope this helps! Please let me know if something's unclear or if you need more help. :)
     
  24. AlienMe

    AlienMe

    Joined:
    Sep 16, 2014
    Posts:
    93
    Hi @InsaneScatterbrain, is there a way to add Group Nodes, Comment Nodes, o rename the nodes? When the graph become more complex, it's a bit hard to follow. I'm gonna try to split them into sub-graphs, this may help, but even those can become unwieldy. Thanks!

     
  25. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    That not possible yet, no. I'll look into adding something like that next week. Sounds like a useful feature. :)

    I'm not really sure what you mean by Group Nodes though? Sounds to me like that would be similar to a sub graph, but I assume you mean something else?
     
  26. AlienMe

    AlienMe

    Joined:
    Sep 16, 2014
    Posts:
    93
    Great! Thanks!

    Some other small details that would be helpful: Copy/Paste/Duplicate nodes.

    Also had some issues with the serialization of Tileset and Named Color assets. Part of the issue was that I replaced the tile for a previously existing Tile Type. And internally, the Tileset's tilesByTileType still had a reference to the old tile. Restarting Unity fixed this.

    About group nodes, take a look here. This is from xNode.
     
  27. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    This is a planned feature. It won't make the coming v1.10 release, as that's basically finished, but I'll see about moving that up the priority list for v1.11.

    Glad you got the issue solved. Though that obviously shouldn't happen. I'll look into it. Could you describe the steps you took that led to this issue?

    Aah, of course. Thanks for the visual aide. ;) I'll look into adding that, I agree that would be pretty useful.

    In the meantime, I've added the ability to add notes to nodes for v1.10, which should be coming this week.

    upload_2021-8-24_11-53-57.png

    Also, the sub graph system got a bit of an overhaul, so hopefully that will make that a bit easier to work with as well.
     
  28. AlienMe

    AlienMe

    Joined:
    Sep 16, 2014
    Posts:
    93
    Cool. Looking forward to it.

    I don't remeber the steps, I'll try to reproduce it later.. but it was something like this:
    • Create Tileset. Add 2 tile types: Ground (assign tile Ground-Tile), Walls (assign tile Wall-Tile)
    • Use tileset in graph...
    • Go back to Tileset.. click on Ground TileType.. it showed the correct tile (Ground-Tile)...
    • Then drag a new tile (Grass-Tile) onto the same slot used by Ground-Tile..
    After this...it would error out, not finding Ground-Tile in tileset.. (The tileset would show the change correctly...)

    I was using this Tileset as input to a 'Tileset To Texture' node.


    Tha'ts great! This will help a lot.

    Will check it out. We are using subgraphs extensively.

    Thanks!
     
  29. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.10 is now available.

    The sub graph system has gotten a bit of an overhaul. The manual page about that has been updated to explain the new system: https://mapgraph.insanescatterbrain.com/manual/running_a_graph_within_a_graph.html

    Using this new system, Map Graph now comes with a bunch of default graphs that can be used as sub graphs, to perform some of the more common tasks, without having to create the same sequence of nodes repeatedly.

    Changes:
    • The sub graph system has been reworked. Instead of adding Process Graph nodes, graphs can now be added to the node creation menu, so that they can be added as nodes.

      Graphs can be added to the node creation menu by flagging it as such in the graph's inspector.

      Nodes based on graphs are prefixed "(G)" in the node creation menu to differentiate them from other nodes.

      Existing Process Graph nodes will continue to function, but can no longer be added directly.

    • Default graphs have been added to use as sub graphs. These graphs are meant to avoid having to repeat some very common sequences of nodes.

      These are the graphs that have been added:
      • Extract Area Graph (Minimum)
      • Extract Areas & Draw Connections (Biased Random Walk)
      • Extract Areas & Draw Connections (Shortest Path)
      • BSP Rooms Texture
      • Cave System Texture
      • Cellular Automata Texture
      • Perlin Noise Texture
      • Random Rectangles Texture

    • Notes can now be added to nodes, by right-clicking a node and selecting Add Note.

    • Added Use XZ Plane port to the Replace GameObject Children node, which allows gameobjects to be placed on the XZ plane instead of the default XY plane.

    • Input nodes inside a sub graph are no longer considered to be connected, when its port isn't connected in the main graph.

    • Added Mask port to the Empty Texture node.

    • Renamed the "Texture To Tilemap" to "Texture To Tilemap Data".

    • Added a new Texture To Tilemap node that combines the functionality of the Texture To Tilemap Data and Copy Tilemap Data nodes.

    • Added Texture To Child GameObjects node that combines the functionality of the Texture To GameObjects and Replace Game Objects Children nodes.

    • Graphs now get validated (and repaired, if necessary) before they get loaded into the graph editor. This process removes connections to, and duplicates of, nodes that no longer exist (for whatever reason), which would cause the graph to fail to load inside the editor.

    • The node creation menu is now wider to fit bigger node names.

    • Fixed a bug where the editor windows wouldn't load properly if a multiple windows are opened for the same graph.

    • The constant and parameter node categories are now marked with a dot in the node creation menu to make them stand out as categories that aren't sorted alphabetically.

    • Sample project: Example graphs have now been updated to use the default sub graphs.

    • Sample project: The 3D Layers example's gameobjects now gets placed on the XZ plane instead of the XY plane.

    Check out the complete changelog here.
     
  30. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    V1.10 already got approved (normally it takes a few days :)), so you should be able to update now and use the new features.

    Be sure to check out the manual for the new sub graph system: https://mapgraph.insanescatterbrain.com/manual/running_a_graph_within_a_graph.html

    Don't worry about any existing Process Graph nodes. Those will continue to function normally, you just can't add any new ones.

    Thanks for getting back to me about that bug, that should help a lot! :)
     
  31. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    I think I figured out what the problem was the bug you encountered and I submitted v1.10.1 with a fix. So that should hopefully resolve the issue. :)
     
  32. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.10.1 is now available.

    Changes:
    • Renamed MapGraphValidator to ScriptGraphValidator.

    • Validator no longer attempts to disconnect ports that have no connection.

    • Fixed bug where changing a tile type entry would keep a reference to the old tile around.

    • Manual: updated v1.10 changes.

    • Manual: Added manual page about using notes.

    • Sample Project: Removed note from example, instead adding the manual page.

    Check out the complete changelog here.
     
  33. AlienMe

    AlienMe

    Joined:
    Sep 16, 2014
    Posts:
    93
    That's great. I'll check it out. Thanks!
     
  34. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.11 is now available.

    Nodes can now be organized in groups and can be copy/pasted.

    Changes:
    • Added group nodes.

    • Nodes and selections of nodes can now be cut, copy, pasted and duplicated.

    • Duplicate nodes are now referred to as Reference nodes, to avoid confusion with the new duplication options.

    • Holding CTRL while selecting will now exclude edges from the selection. Pressing CTRL+E will do the same for the current selection.

    Check out the complete changelog here.
     
  35. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    The last change in the list might need a bit more explanation, as to why that's a useful feature.

    It has to do with the new group nodes. Some versions of Unity have this weird behaviour where you aren't able to add a selection of nodes to a group, if that selection also contains connections/edges.

    I assume this is a bug, as it seems to have been fixed in Unity's latest alpha version.

    In the meantime, having an easy way to deselect edges seemed useful. :)
     
  36. AlienMe

    AlienMe

    Joined:
    Sep 16, 2014
    Posts:
    93
    @InsaneScatterbrain this version will make a huge improvement in our workflow. Thanks!

    We are enjoying using this asset quite a bit.. we are even using it to generate navigation maps for the UI.
     
  37. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    That sounds interesting! I would love to see the results of that if you're able to share.

    I'm glad you enjoy using Map Graph, please let me know if you've got more feedback. :)
     
  38. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    I've added a page about group nodes to the manual, here.
     
    w409544041 likes this.
  39. AlienMe

    AlienMe

    Joined:
    Sep 16, 2014
    Posts:
    93
    Hi @InsaneScatterbrain , I'll share some pics when we are a bit farther along..The latest version is working perfectly. I'll let you know if something comes up.
     
    InScatterbrain likes this.
  40. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.12 is now available.

    Changes:
    • Added Carve Radius in port to Draw Connections (Biased Random Walk) node behaviour, allowing for drawing connections of varying widths.

    • Added Carve Radius in port to Random Walker node.

    • Fixed a bug where the "Remove Note" option would show up for new nodes, instead of the "Add Note" option.

    • Added the Color To Outline port to the Draw Outline node. Setting a color to this port will outline a specific color, instead of any non-transparent pixel.

    • Added Split Into Manhattan Connections node.

    • Added Extract Points node.

    • Added Extract Points With Neighbours node.

    • Sample Project: Added Platformer example.

    • Changing a group's name to an empty string will now show as "[Untitled]" so that it remains easily selectable.

    Check out the complete changelog here.
     
  41. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    I've updated the web build of the sample project. You can find it here.

    It now includes the "Platformer" example, which is an example of a level generator that generates levels that are viewed from the side, instead of from the top.
     
    w409544041 likes this.
  42. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.12.1 is now available.

    Changes:
    • Fixed bug where generating an area graph would throw a NullReferenceException in certain situations.

    • Fixed auto focus on new constant node fields.

    • Fixed bug where creating connections from a newly added port onto the canvas, wouldn't open the node creation menu.

    • Positions of empty group nodes now get properly persisted.

    • Fixed bug where adding parameters wouldn't update the ports on any open associated graph nodes, if it was the first input or output parameter added.
    Check out the complete changelog here.
     
  43. cowj

    cowj

    Joined:
    Mar 10, 2019
    Posts:
    17
    is this tool gpu base?
     
  44. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    At the moment, no.

    I do plan to look into using compute shaders for some of the heavier tasks, but I can't really make any promises yet on when or if that'll be implemented at this time.

    Is there any specific reason why you need it to be GPU based? :)
     
  45. cowj

    cowj

    Joined:
    Mar 10, 2019
    Posts:
    17
    i am working on project with procedural terrain,it need high peoformance when runtime, it is importan for me
     
  46. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    I haven't heard of any big performance issues, but that depends a lot on your needs, of course. If you want to generate huge levels, for example, that might take a second.

    If you can give me more details about what you're trying to make, I can help you determine whether Map Graph is a good fit for your project, if you'd like. :)
     
  47. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    Map Graph v1.13.1 is now available.

    v1.13 was skipped due to it not being approved yet, before v1.13.1 was submitted.

    This update improves performance and adds a new node and a bunch of new ports on existing nodes, for more options, among other changes.

    Changes v1.13:
    • Improved performance of the Texture To Tilemap and Texture To Tilemap Data nodes.

    • Added Areas Special Border Points node.

    • Added "Min. placements" in port to the Randomly Fill Texture node.

    • Added "Min. Area Size" in port to the Extract Areas node.

    • Points To Areas node now merges connected points into a single area, instead of simply outputting a single area for each point.

    • Added "Connect Diagonals?" in port to the Points To Areas node.

    • Rectangles To Areas node now merges connected rectangles into a single area, instead of simply outputting a single area for each rectangle.

    • Added "Connect Diagonals?" in port to the Rectangles To Areas node.

    • Added "Min. Edges" and "Max. Edges" in ports to the Add Random Edges node.

    • In ports on graph nodes now require a connection if any of the corresponding input nodes in sub graph are connected to a port that requires a connection.

    • Named Color node no longer has the first color as default value.

    • Areas To Points node will no longer output duplicate nodes.

    • Draw Areas node's Color in port is no longer required and will use transparency to draw with by default instead, similar to other nodes.

    • Replace Color node will now log a warning if the find and replace colors are the same.

    • Refactored nodes so that they're no longer directly coupled to a graph object.

    • Various small performance improvements.

    • Implemented more custom exceptions to help with troubleshooting.

    • Updated MIConvexHull to latest version.

    Changes v1.13.1:
    • Fixed an issue where an exception would occur when processing a graph asynchronously.

    • Manual: Updated node index to reflect v1.13 changes.

    Check out the complete changelog here.
     
  48. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
  49. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
  50. InScatterbrain

    InScatterbrain

    Joined:
    Mar 7, 2017
    Posts:
    234
    spryx likes this.