Live data from Hacker News

Cryengine Source Code

github.com

11–20 of 149 posts

Re: Cryengine Source Code

#11
post #10

Used to work with cryengine some time ago. That is by far the worst c++ codebase i've ever seen.

Generally, things that are not open source are rarely not well written, since there are less programmers who will read your code, and all questions on the code can be done internally, so developers only write code so it works. Open source generally leads to better quality code, since it's the best way to attract other developers to contribute to it. So I'm rarely interested by any accomplished project that opens its…

I disagree with this line of reasoning. I have seen good/bad examples on either side. I think it actually comes down to someone on the developer team having a high set of standards that they push everyone to subscribe to.

Re: Cryengine Source Code

#13
This is on the front page again. Please take some time to read this wonderful function: https://github.com/CRYTEK/CRYENGINE/blob/release/Code/CryEng...

EDIT: That whole function is a minefield. Just taking a quick look:

* 814 lines of code

* goto inside 3 nested for-loops

* macros

* commented out code

* new/delete, with no RAII

* thread specific variables and locks (?)

Re: Cryengine Source Code

#15
post #8

That license looks like a minefield. Any lawyers able to chime in on the reality of becoming tainted? Given their recent history, this is one codebase you really wouldn't want to risk becoming tainted by.

What is their recent history?

Crytek v. Cig, which the court ruled largely in favor of Cig, and even called out Crytek's behavior (which was an absolute circus). Crytek will prosecute given even the most questionable grounds.

The consequences of taint are a very real risk here.

Re: Cryengine Source Code

#16
post #13

This is on the front page again. Please take some time to read this wonderful function: https://github.com/CRYTEK/CRYENGINE/blob/release/Code/CryEng... EDIT: That whole function is a minefield. Just taking a quick look: * 814 lines of code * goto inside 3 nested for-loops * macros * commented out code * new/delete, with no RAII * thread specific variables and locks (?)

[deleted]

Re: Cryengine Source Code

#17

Used to work with cryengine some time ago. That is by far the worst c++ codebase i've ever seen.

Interesting sentiment, I sometimes wonder if a "messy" codebase can have advantages for performance. Many very highly performance tuned applications I saw in the wild would fall into the category of "horrible codebase" when looked at through that lens.

It falls more in the category of having a lot bugs which could've been caught if they used static code analysis, code review, etc...

I understand that you might think that messy could mean it's fine tuned for performance. In this case, I highly doubt it and think it's more reasonable to think it's messy because they had deadlines.

The messy part isn't about performance optimizations. It's more about things that got crammed in there and only works for a very specific subset of parameters. And even then you can't be sure it'll work...

I don't blame the programmers, it feels they had deadlines to uphold from managment.

Re: Cryengine Source Code

#18
post #10

Used to work with cryengine some time ago. That is by far the worst c++ codebase i've ever seen.

Generally, things that are not open source are rarely not well written, since there are less programmers who will read your code, and all questions on the code can be done internally, so developers only write code so it works. Open source generally leads to better quality code, since it's the best way to attract other developers to contribute to it. So I'm rarely interested by any accomplished project that opens its…

> things that are not open source are rarely not well written

I think you got lost in your triple negative there

Re: Cryengine Source Code

#19
post #13

This is on the front page again. Please take some time to read this wonderful function: https://github.com/CRYTEK/CRYENGINE/blob/release/Code/CryEng... EDIT: That whole function is a minefield. Just taking a quick look: * 814 lines of code * goto inside 3 nested for-loops * macros * commented out code * new/delete, with no RAII * thread specific variables and locks (?)

800 lines long. The movement component class in ue4 is about 10k lines. Why do game engines separate their code so much less than in other software?

Re: Cryengine Source Code

#20

Earlier quoted context omitted.

Interesting sentiment, I sometimes wonder if a "messy" codebase can have advantages for performance. Many very highly performance tuned applications I saw in the wild would fall into the category of "horrible codebase" when looked at through that lens.

It falls more in the category of having a lot bugs which could've been caught if they used static code analysis, code review, etc... I understand that you might think that messy could mean it's fine tuned for performance. In this case, I highly doubt it and think it's more reasonable to think it's messy because they had deadlines. The messy part isn't about performance optimizations. It's more about things that got c…

What sorts of static code analysis tools do people here use in their game projects? I know carmack is a big fan of them
Post reply on HN