Jump to content

Who Wrote The Original Mwo Code?


102 replies to this topic

#101 Darth Futuza

    Member

  • PipPipPipPipPipPipPipPip
  • 1,239 posts

Posted 31 May 2016 - 02:43 PM

View PostTroutmonkey, on 24 May 2016 - 04:25 PM, said:

Unity is C# or Javascript, but only chumps use JS Posted Image

It's actually not, those are just the scripting languages it supports. The engine is written mostly in C++ with a .NET user interface.

View PostEscef, on 25 May 2016 - 12:27 PM, said:

CryEngine's source code was recently released. Now, I haven't done much in the way of coding since high school, a couple hundred or so moons ago, so I didn't personally look into it. But one of my livestream viewers did, and he told me me there are multiple instances of the code having comments in it, from the CryCoders themselves, that effectively said "no idea what this does, look into it later", and he even showed me an example of it. I just sat there looking at it, like, "WTF is this? Who the hell does that?" There's actual code in CryEngine that no one knows what the hell it does... That's just freakin' scary, it's a miracle it works at all, never mind that people can mod it.

I'm not very surprised actually, a lot of engine source code is probably this way. For example Quake3's Fast Inverse Squareroot Calculation:
float Q_rsqrt( float number )
{
long i;
float x2, y;
const float threehalfs = 1.5F;
x2 = number * 0.5F;
y  = number;
i  = * ( long * ) &y;					   // evil floating point bit level hacking
i  = 0x5f3759df - ( i >> 1 );			   // what the ****?
y  = * ( float * ) &i;
y  = y * ( threehalfs - ( x2 * y * y ) );   // 1st iteration
// y  = y * ( threehalfs - ( x2 * y * y ) );   // 2nd iteration, this can be removed
return y;
}

Note: Not my comments, these are in the original source.

I don't do video card drivers, but I'd imagine they're much the same way (eg: look at Nvidia's drivers released for linux that are 'open source', it's just a bunch of binary blob data). Code gets left in because it's fast and effective, even if what it is doing doesn't make sense exactly (at least not without spending a lot of time deobfuscating it and debugging it). We all like clean understandable code, but unfortunately the industry doesn't always work that way.

Edited by Darth Futuza, 31 May 2016 - 02:47 PM.


#102 Troutmonkey

    Member

  • PipPipPipPipPipPipPipPipPip
  • Moderate Giver
  • Moderate Giver
  • 3,776 posts
  • LocationAdelaide, Australia

Posted 31 May 2016 - 05:50 PM

View PostDarth Futuza, on 31 May 2016 - 02:43 PM, said:

It's actually not, those are just the scripting languages it supports. The engine is written mostly in C++ with a .NET user interface.

I meant you write C# or JavaScript when dev'ing for it

#103 Troutmonkey

    Member

  • PipPipPipPipPipPipPipPipPip
  • Moderate Giver
  • Moderate Giver
  • 3,776 posts
  • LocationAdelaide, Australia

Posted 31 May 2016 - 05:54 PM

View PostEscef, on 25 May 2016 - 12:27 PM, said:

CryEngine's source code was recently released. Now, I haven't done much in the way of coding since high school, a couple hundred or so moons ago, so I didn't personally look into it. But one of my livestream viewers did, and he told me me there are multiple instances of the code having comments in it, from the CryCoders themselves, that effectively said "no idea what this does, look into it later", and he even showed me an example of it. I just sat there looking at it, like, "WTF is this? Who the hell does that?" There's actual code in CryEngine that no one knows what the hell it does... That's just freakin' scary, it's a miracle it works at all, never mind that people can mod it.

I'm part of an indie game page and we had a quick look at it. The code base is an absolutely undocumented mess
https://github.com/C....cpp#L1300-2111





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users