Live data from Hacker News

Show HN: Interactive ECS Systems/Component Explorer for Cities: Skylines 2

captain-of-coit.github.io

1–10 of 50 posts

Show HN: Interactive ECS Systems/Component Explorer for Cities: Skylines 2

#1
Hello Hacker News! Long time reader but first time poster here...

Recently I've been diving into doing mods for Cities: Skylines 2, which been very interesting as it's one of the first games that is using ECS and that I also have a deep interest into. I've mainly used ECS via Bevy before, but this time it's Unity, but many things still work the same way.

In order to help myself and other modders to navigate the ECS Systems and Components from the decompiled code, I created this interactive D3 graph.

You can click on nodes to "navigate" to that system/component, and once you're zoomed in a particular System/Component, you get a sidebar with more details. Ctrl+click also removes nodes in case you want to temporarily filter something.

This is, in short, how it works:

1. A C# program extracts information from decompiled C# code: https://github.com/Captain-Of-Coit/cs2-ecs-explorer/blob/mas...

2. The program outputs that info as JSON: https://github.com/Captain-Of-Coit/cs2-ecs-explorer/blob/mas...

3. Render with D3.js: https://github.com/Captain-Of-Coit/cs2-ecs-explorer/blob/mas...

Basically it helps people to navigate the Systems and Components references for the game.

If you're feeling brave, you can also browse the full graph which has something like ~700 nodes and ~1200 links: https://captain-of-coit.github.io/cs2-ecs-explorer/ (it'll take a while to first load)

A big problem was to figure out how to make the D3 not too messy when there are large graphs, and I don't think I've succeeded very well with this, but everything I tried (link distance based on how many connections, clustering based on namespaces and so on) made it even worse.

Happy to hear what you think and what I could do better.

Show HN: Interactive ECS Systems/Component Explorer for Cities: Skylines 2
captain-of-coit.github.io

Re: Show HN: Interactive ECS Systems/Component Explorer for Cities: Skylines 2

#4
post #3

[flagged]

> it's one of the first games that is using ECS and that I also have a deep interest into

Both, at the same time :)

ECS probably been around since at least early 2000s if not even in the 90s.

Edit: Wikipedia puts Thief as the "pioneer" of ECS:

> In 1998, Thief: The Dark Project pioneered an ECS. (https://dev.to/ovid/the-unknown-design-pattern-1l64) The engine was later used for its sequel, as well and System Shock 2.

Re: Show HN: Interactive ECS Systems/Component Explorer for Cities: Skylines 2

#5
post #3

[flagged]

> it's one of the first games that is using ECS and that I also have a deep interest into Both, at the same time :) ECS probably been around since at least early 2000s if not even in the 90s. Edit: Wikipedia puts Thief as the "pioneer" of ECS: > In 1998, Thief: The Dark Project pioneered an ECS. ( https://dev.to/ovid/the-unknown-design-pattern-1l64 ) The engine was later used for its sequel, as well and System Shock…

I think it's one of the first games heavily using Unity DOTS, which probably also explains its launch troubles.

Re: Show HN: Interactive ECS Systems/Component Explorer for Cities: Skylines 2

#9

What is ECS?

Entity component system. https://en.wikipedia.org/wiki/Entity_component_system

Slightly off topic, but does anyone know what the status is of Unity's patent on ECS? I remember this thread [0] from a few years ago, and it looks like the patent is still valid [1], but I still see ECS all over the place outside of Unity contexts. Is Unity just not interested in enforcing the patent? Do they know they'd lose if they tried? Or am I missing a recent development?

[0] https://news.ycombinator.com/item?id=28447672

[1] https://patents.google.com/patent/US10599560B2/en

Post reply on HN