Live data from Hacker News

Doom 3 Source code review

fabiensanglard.net

31–40 of 64 posts

Re: Doom 3 Source code review

#32
post #28

Very respectable of id to release it. I bet the could still get some sold cash from it if they kept it closed.

I get the point you are making and to a certain degree, I agree with you.

Havign said that, they still do get cash from the engine, through existing licensing deals.

I haven't checked this specific license that doom3 was released under, but it's common for the code to be released under a free license for non commercial use, but a paid license would be required for commercial variants.

Re: Doom 3 Source code review

#33
Worth noting here regarding the patent issue with Creative.

John Carmack said [1]:

"The patent [2] situation well and truly sucks. We were prepared to use a two-pass algorithm that gave equivalent results at a speed hit, but we negotiated the deal with Creative so that we were able to use the zfail method without having to actually pay any cash. It was tempting to take a stand and say that our products were never going to use any advanced Creative/3dlabs products because of their position on patenting gaming software algorithms, but that would only have hurt the users."

[1] http://newenthusiast.com/carmacks-reverse-still-an-issue-200...

[2] The patent number 6,384,822, "Method For Rendering Shadows Using A Shadow Volume And A Stencil Buffer", can be read here: http://www.google.com/patents/about?id=Om0LAAAAEBAJ

Here is the patent work-around in the Doom 3 source code. Check out the RB_T_Shadow method in draw_common.cpp at line 1151 [3]:

  // patent-free work around
  if ( !external ) {
    // "preload" the stencil buffer with the number of volumes
    // that get clipped by the near or far clip plane
    qglStencilOp( GL_KEEP, tr.stencilDecr, tr.stencilDecr );
    GL_Cull( CT_FRONT_SIDED );
    RB_DrawShadowElementsWithCounters( tri, numIndexes );
    qglStencilOp( GL_KEEP, tr.stencilIncr, tr.stencilIncr );
    GL_Cull( CT_BACK_SIDED );
    RB_DrawShadowElementsWithCounters( tri, numIndexes );
  }
[3] https://github.com/TTimo/doom3.gpl/blob/master/neo/renderer/...

Further reading on the general topic can be found here: https://en.wikipedia.org/wiki/Shadow_volume

Re: Doom 3 Source code review

#34
post #4

> the variables highlights and the "Command-Click" to reach a definition make the experience superior to Visual Studio. Seriously ? There may be reasons to think Visual Studio is an inferior product, these are not among them.

He mentioned just for code browsing so don't panic. Nobody in their right mind would think XCode compares to Visual Studio. I mean it's 2012 and there is still no refactoring support.

Correction: There is refactoring support in Xcode. But it is quite bad.

Re: Doom 3 Source code review

#35
post #23
post #12

Earlier quoted context omitted.

The images are not loaded until you scroll them into view, so bandwidth is saved if you don't read the whole article.

From sohn, who is dead: "That's bullshit. What if my connection is slow and I want to leave the page loading whilst I do some other things."

Scroll the page to the bottom, scroll it back up, then go do your other things.

Re: Doom 3 Source code review

#36
post #22
post #21

Earlier quoted context omitted.

That's true. It seems like javascript disabling is just not on the minds of web developers. You have to be a special kind of masochist to use noscript these days... I used it for years, but ghostery covers most of what I liked about it.

I don't use noscript (if you mean the Firefox addon). I was talking about the tag. ;) I use Opera with Javascript and Cookies disabled because most things work fine and are much less annoying with that setup.

I did know what you meant by noscript, just using the plugin as an example of non-javascript users :-). No cookies? You are a masochist. Another reason I like ghostery -- it blocks the cookies that I don't like.

Re: Doom 3 Source code review

#38
post #24

Earlier quoted context omitted.

The problem is that comments are often only good the first few times you read them. After heavily hacking on some code for a while, you know the comments. I find the ability to fold comments very valuable.

Unfortunately, that tends to lead to vary stale comments which hinders the next developer.

Yes, I admit that in code reviews, staleness of comments is a thing that tender to get pointed out to me. However, I've since developed a procedure (review comments belonging to any hunk of changes) to prevent that.

Re: Doom 3 Source code review

#39
post #28

Very respectable of id to release it. I bet the could still get some sold cash from it if they kept it closed.

I get the point you are making and to a certain degree, I agree with you. Havign said that, they still do get cash from the engine, through existing licensing deals. I haven't checked this specific license that doom3 was released under, but it's common for the code to be released under a free license for non commercial use, but a paid license would be required for commercial variants.

The engine (idTech4) is released under GPL. Thus, you can use it for commercial use without paying anything. I guess you can also still buy a non-GPLed version.

Re: Doom 3 Source code review

#40

Earlier quoted context omitted.

I get the point you are making and to a certain degree, I agree with you. Havign said that, they still do get cash from the engine, through existing licensing deals. I haven't checked this specific license that doom3 was released under, but it's common for the code to be released under a free license for non commercial use, but a paid license would be required for commercial variants.

The engine (idTech4) is released under GPL. Thus, you can use it for commercial use without paying anything. I guess you can also still buy a non-GPLed version.

Derivative work that uses the engine must be GPL'd too. That is bad for commercial products that intend to be closed source; I guess those are the commercial products that buy the engine.
Post reply on HN