Need some assistance with node thingy sorting

0 favourites
  • 3 posts
From the Asset Store
Node Downloader is a plugin for download file for Construct 3 and construct 2 game engine
  • If that's ok with everyone, I would like get some assistance on my current problem/project

    To describe it better I made this wonderful piece of art*, posted below.

    In short. I have made some node based system, which works fine and almost like I wanted it to work. i don't like how it gets messed up if I try to add new nodes in specific places. They will start crumbling, overlapping and breaking everything on the way.

    Then i thought it would be nice if nodes could automatically shift themselves up and down depending on their neighbours position. So they will alway have some space around them and will never overlap itself... and in overall will look cleaner.

    Any help appreciated, and I really mean it!

    (In return I ask my graphic designer to remade your avatar in style of our upcoming game xD)

    And btw if someone have a nice idea to make better deleting nodes system I will be even more appreciated!

    *This image and content of capx file are copyrighted material and cannot be sold or used in any public or private places or application without written permission from the author - me.

    Here's my file.

    Double click on "Big Node" to remove it or add new one. "Small Nodes" are important but they have no functionality in this file - they are here because they need to be

    If something inside will look a bit weird just ignore it. It's a cropped down version of bigger thing. I removed everything not related and left only the important stuff for nodes to work.

    node_help.capx

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Hi,

    I was tinkering with something similar a few months back. I was going for a replication of the way event sheets can be manipulated. What I came up for drawing the tree was have each node know what node was next and what it's first child was.

    In a picture one possible tree could look something like this:

    node -> child -> node
     |                |
     v                v
    next             next
     |                |
     v                v
    node             node[/code:atbyigrr]
    
    Then to draw the tree I start at the root node and recursively position all the other nodes.
    
    In this capx the relevant stuff is in the "tree layout" group.
    [url=https://dl.dropboxusercontent.com/u/5426011/examples27/node_tree.capx]https://dl.dropboxusercontent.com/u/542 ... _tree.capx[/url]
  • R0J0hound

    Ahh I see. Instead of repositioning each node one by one to their grid XY coordinates, like I did, You are arranging them based on the root.

    Nicely done, Thank you!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)