Hard Light Productions Forums
Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: The E on August 12, 2012, 03:15:10 pm
-
So, I decided to give Visual Studio 2012's dependency analyzer a try. Gave it the simple task of analyzing all the things in FSO's code.lib.
I did not receive clarity. What I did receive, however, was a glimpse at the shape of Codethulhu (forever closed be his braces).
I wanted to lvlshot this, but decided against it. There's no reason to destroy the sanity of people who are just passing by. However, if you think you posess the mental fortitude necessary, here's a link:
http://blueplanet.fsmods.net/E/pics/depgraph.xps.1.png
-
You guys weren't kidding when you use the adjective "spaghetti."
(http://sourcemaking.com/files/sm/images/spagett.jpg)
-
That's so frikking messed up.
-
Viewing the image and resizing it several times actually managed to completely freeze my computer.
Apparently it is dangerous to even glimpse the shape of Codethulu.
-
Well it doesn't look so bad from afar. Lets zoom in and... OH GOD!!! :shaking:
The blob in the middle... you can't even distinguish which link goes where.
-
Apparently just processing Codethulu has traumatised my computer as chrome just loads a blank white image and Gimp locks up and even now it is running slower than it should :eek2:
-
Oh sweet jesus run away!
-
hah! so this is what unfiltered madness looks like.
I do not envy what you coders got to work with!
-
Ye gods... :eek2:
-
A wild codet̬͇̫̗̠̅ͯ̉̀̈́ẖ̘̞͕͎͋̕u̯͗̂̊͗͋͞l̼̼̯̟ͬ̏̉́̾ͦ͞h̖̒́ͮ̄̕u̠͘ ̡̻̖ą̲p̸̱̥̫̮̩͉̍ͭͬ̃̃ͩͅp̠̬͎̲̫ͥ́͌ͤ͒ͅe͗ͪͮ͛̊̈́҉͕͕̘aͧ͌̄҉͕ȓ̠̩̯̗ͣ͋è͒ͥ̌̽d̙͚̰͖͈̬̠̃̚!̳̅̇ͤͦ
FIGHT
BAG
PKMN
>RUN
-
Dear lord, I'm not even a coder and that looks terrifying. :shaking:
-
Apparently just processing Codethulu has traumatised my computer as chrome just loads a blank white image
Same here. Can't see a thing. :sigh:
-
Open it in Firefox or (God forbid) IE if you have it on-hand.
-
Or just wait a minute or two :P
-
(http://25.media.tumblr.com/tumblr_m5x61mD1Bk1qzscldo1_500.gif)
-
I see the truth now! IA! IA! TAYLOR FTHAGH!
-
Hmm. I must be immune to the effects of codethulhu... :confused:
-
The pic is 14k * 9k pixels. Long load times are to be expected.
-
So, um... What does a professionally programmed piece of software (of similar size and breadth) look like? For comparison's sake.
-
Perhaps StarShatter would be a good comparison, with source readily available?
-
I think it's less about "professionally programmed" and more about "object-oriented".
-
Dman...That blob in the middle?!? :jaw: OH THE HORROR! :shaking:
-
Talk about spaghetti logic. Or in this case, spaghetti lack of logic. :)
-
I think it's less about "professionally programmed" and more about "object-oriented".
Indeed. That blob you see there is the result of 10 years of mostly sound software engineering decisions; this particular form of graph is just the worst possible way of trying to visualize it. If you were to analyze the various subsystems within FSO, the result would look much clearer. It's only when everything is combined into one giant block of stuff that Codethulhu (May his syntax always be valid) appears.
EDIT: For the record, this is Starshatter: http://blueplanet.fsmods.net/E/pics/ssdep.xps.1.png
It looks a lot cleaner to a first approximation, but that cleanness is only due to Starshatter being a one-man project for most of its life, and one that was C++ from the beginning.
-
Damn, that looks worse than a ball of yarn after my cat is finished playing with it!
-
Do homeworld 1!!!!!! :D source is available!
on another note... WTF is that!_ I swear to god I never saw such an atrocity! my eyes are bleeding u.u
-
I think it's less about "professionally programmed" and more about "object-oriented".
Indeed. That blob you see there is the result of 10 years of mostly sound software engineering decisions; this particular form of graph is just the worst possible way of trying to visualize it. If you were to analyze the various subsystems within FSO, the result would look much clearer. It's only when everything is combined into one giant block of stuff that Codethulhu (May his syntax always be valid) appears.
EDIT: For the record, this is Starshatter: http://blueplanet.fsmods.net/E/pics/ssdep.xps.1.png
It looks a lot cleaner to a first approximation, but that cleanness is only due to Starshatter being a one-man project for most of its life, and one that was C++ from the beginning.
Um... There are nodes that are not named. Censorship or conspiracy by VS'12? :nervous:
-
My guess is derp.
-
Codethulhu just about managed to lock up Windows' image viewer. Clearly his evil tentacles have great reach.
-
Um... There are nodes that are not named. Censorship or conspiracy by VS'12? :nervous:
There are things written there which the mortal mind cannot comprehend.
-
Yeah, well at least my laptop's face didn't melt when it opened the .png. :P
-
y'know, the FS2 code looks like something exploding.
-
and i guess somewhere it says "Nuke was here".
-
Aaaaaaaaaaaaaand my Firefox breaks 75% into the picture load.
Is that codethulhu or the Milky Way...~~~~??? :banghead: :lol:
-
Ph'nglui mglw'nafh Codethulhu R'lyeh wgah'nagl fhtagn
-
If you're looking for an example of 'good code', I'd look for volunteer, NFP projects, not built with a budgeted timeline in mind. Deadlines are what lead to the corner cutting that gives you that kind of messy code. Although, Doom 3's source might be a good example, as the engine itself is developed more to Carmack's personal will from what I understand.
-
Just in case someone hasn't seen it...
(http://imgs.xkcd.com/comics/good_code.png) (http://xkcd.com/844/)
Indeed. That blob you see there is the result of 10 years of mostly sound software engineering decisions; this particular form of graph is just the worst possible way of trying to visualize it. If you were to analyze the various subsystems within FSO, the result would look much clearer. It's only when everything is combined into one giant block of stuff that Codethulhu (May his syntax always be valid) appears.
If you're looking for an example of 'good code', I'd look for volunteer, NFP projects, not built with a budgeted timeline in mind. Deadlines are what lead to the corner cutting that gives you that kind of messy code. Although, Doom 3's source might be a good example, as the engine itself is developed more to Carmack's personal will from what I understand.
Reading these gave me an idea: The E, could you try running the dependency analyzer on the original :v: code (or the closest we can get to that), maybe SVN r5 (http://svn.icculus.org/fs2open?view=rev&revision=5)? I wonder how it'll compare.
-
and i guess somewhere it says "Nuke was here".
yea i leave my name all over my bits of code, just so people know who to blame when it eventually goes horribly, horribly wrong.
-
don't feel too bad about it. i believe this is the year we all should realize stuff like this was all for the greater good. otherwise i'd rather blame reds than give you credit. :P
-
... i'd rather blame reds than give you credit. :P
I don't know what you're talking about! :nervous:
-
Oh my god, it looks...it looks...LIKE A REAPER.
...
RUDIMENTARY CREATURES OF BLOOD AND FLESH. YOU TOUCH MY SOURCE HIERARCHY, FUMBLING IN IGNORANCE, INCAPABLE OF UNDERSTANDING. THERE IS A REALM OF EXISTENCE SO FAR BEYOND YOUR OWN YOU CANNOT EVEN IMAGINE IT. I AM BEYOND YOUR COMPREHENSION. I AM FREESPACE 2 OPEN.
-
ASSUMING DIRECT CONTROL
-
That was Harbinger, not a Reaper. :nervous:
-
....
All of my wat.
Harbinger IS a Reaper.
-
DERP. That's what I get for posting at 3AM.
-
And you're both wrong, because I quoted Sovereign, not Harbinger.
-
And you are mistaken, because we were answering to Valathil, who quoted Harbinger.
-
WRONG Harbinger QUOTES ME HOW DARE YOU ASSUME OTHERWISE
-
In soviet russia... oh nevermind
-
... i'd rather blame reds than give you credit. :P
I don't know what you're talking about! :nervous:
you're innocent if you deny that you've holed up your slaves in a gulag so i don't mean you.
-
As a coding noob(never have), the question becomes does Codethulhu impede the engine itself of just the streamlined understanding of it?
-
As a coding noob(never have), the question becomes does Codethulhu impede the engine itself of just the streamlined understanding of it?
Both, really. the fact that nothing is particularly streamlined in FSO makes it difficult to maintain and upgrade. Additionally, there's no telling if the algorithms are the best they can be.
-
Starbreeze studios, the makers of the Riddick games, have used their proprietary engine(which to me is one of the best dx9 engines out there) for roughly 12 years but after the release of "Syndicate", which was released a couple of months ago, they retired the engine and did not upgrade to dx11 citing "code bloat"(of course, the head of the company and lead programmer left as well). Is FSO in danger of this?
-
I don't think so. We are not making an all-purpose engine a la Unreal here; staying focussed on what the engine does best and then adding new gameplay logic, bugfixes, and the occasional graphics features means that we're not in danger of succumbing to big feature creep.
That being said, when looking at Codethulhu (may his memory never leak), it is important to note that the tool used to generate the picture was basically running with wrong settings for FSO's structure; if you analyze any of the bigger subsystems the picture becomes much clearer, and the code much more maintainable.
-
I recently used Codethulhu, or at least his perhaps slightly-less terrifying former self in the guise of the original source code release, as an example of how retail game engines can be a total mess and make fixing certain bugs extremely difficult. Actually the exact example I used was that memorable incident that cost Battman his blood. :D
-
Pssh, I loaded that ***** in like 5 seconds.
Didn't make it any less hideous, though.