The way I see it, it takes 7 steps:

**Step 1 - Populate requiredByThis and enforce basic topological order**

This allows for bidirectional navigation and also helps dealing with dummy vertices, since it will screw edge drawing if I mess around with prerequisites too much. I hitched a ride in this pass to enforce basic ordering, since the game already almost provides it.

**Step 2 - Transitive reduction**

I currently skip this part, but I think it's important in case some modder screw up and add redundant prerequisites.

**Step 3 - Find a topological order compliant with Coffman–Graham algorithm**

I decided to go with Coffman-Graham Algorithm because it's the only one that naturally incorporates the layer width constraint (in our context, window height). Longest Path Layering and Network Simplex were my other options that I quickly discarded.

**Step 4 - Distribute tasks among hierarchical layers**

Step 3 makes this one a very trivial O(|V|+|E|). Here I take the time to apply some specifics, like bringing those lonely projects (Devilstrand, Stone Cutting, etc) to the far left.

**Step 5 - Add dummy nodes to layers, to make edges more visible**

This is essential for the next steps and it got me stuck for some time since I was doing it wrong. Coffman-Graham does not take dummy vertices into account, so my solution was to work with two width constraints, one that considers only orignal vertices and another considering dummies too. There is room for improvement here if I make those dynamic instead of fixed.

**Step 6 - Minimize edge crossings with vertex ordering within layers**

This was the really hard part and I kinda rushed through it to be able to release yesterday, since I was very anxious to do it.

It's also the heaviest part in terms of computation and that's the main reason I believe there is so much room for performance improvement.

**Step 7 - Set X and Y coordinates for each project based off layering**

Also rushed this part and implemented it the dumbest possible way. Also, the

paper I was reading to learn good heuristics for this mentioned that:

*"These heuristics make good layouts quickly, but they are complicated to program and the results are sometimes noticeably imperfect. Further fine tuning is difficult because the heuristics begin to interfere with each other."*So I decided to improve that some other day.

About the offer, I'm very welcoming to your collaboration! Talk to you on discord.