Live data from Hacker News

Jedi Knight 2 And 3 Source Code Released

rockpapershotgun.com

21–30 of 31 posts

Re: Jedi Knight 2 And 3 Source Code Released

#21
There is some interesting code in this release:

  void FuckingWellSetTheDocumentNameAndDontBloodyIgnoreMeYouCunt(LPCSTR psDocName)
  {
          if (gpLastOpenedModViewDoc)
          { // make absolutely fucking sure this bastard does as it's told... //
                  gpLastOpenedModViewDoc->SetPathName(psDocName,false);
                  gpLastOpenedModViewDoc->SetTitle   (psDocName);
          }
  }
My heart goes out to whatever programmer had to meet that deadline. There are a lot more gems in the source tree if you just run:

  egrep -R -i "fuck" *

Re: Jedi Knight 2 And 3 Source Code Released

#22
post #4

Preferring sourceforge over github seems like an unusual choice, I didn't realise anyone still used it. It's a git repo too, I wonder why they did that?

I really don't understand the notion that SourceForge is dead and no one uses it anymore.

  http://sourceforge.net/projects/vlc
  http://sourceforge.net/projects/sevenzip/
  http://sourceforge.net/projects/emule/
  http://sourceforge.net/projects/filezilla/
  http://sourceforge.net/projects/npppluginmgr/
  http://sourceforge.net/projects/mingw/
  http://sourceforge.net/projects/azureus/
  http://sourceforge.net/projects/fceultra/ (Shameless plug) 
Just to name a few. As a project admin of fceultra I cannot say that I'm 100% pleased with the UI of the bugtracker and the sf does have its quirks, but sourceforge has had a much better track record than github in respect to uptime. My question to you is "Why not?"

Re: Jedi Knight 2 And 3 Source Code Released

#24
post #14

Earlier quoted context omitted.

Judging from the `.dsw` file at the base of the code directory, it looks like you need to build it in MS Visual Studio.

There is also the matter of missing assets.

The source code for the engine should compile without the assets. Or at least with some minor modification to the source tree. Take a look at these other commercial games who have released the source code of the engine but kept the assets proprietary:

  https://en.wikipedia.org/wiki/Duke_Nukem_3D
  https://en.wikipedia.org/wiki/Doom_%28series%29 (1, 2, and 3)
  https://en.wikipedia.org/wiki/Quake_%28series%29 (1, 2, 3, and 4)
  
I'm confident that there are others but I can't think of any off-hand. These open source contributions are a gift that allows the open source community to create ports to initially unsupported platforms and to enhance the engine. Have you checked out any of the enhanced doom ports? (http://dengine.net/). There are even user-contributed HD assets for Duke Nukem 3d (http://hrp.duke4.net/download.php).

Re: Jedi Knight 2 And 3 Source Code Released

#25
post #14

Earlier quoted context omitted.

Judging from the `.dsw` file at the base of the code directory, it looks like you need to build it in MS Visual Studio.

There is also the matter of missing assets.

I'd imagine those can't be open sourced: the game studio owns the code, but licenses the likeness in the images.

Re: Jedi Knight 2 And 3 Source Code Released

#27

I know this is terribly pedantic, but seeing the name of the blog like that in the HN title rubs me the wrong way.

It's not pedantic at all, I thought the same.

I have no idea why it's necessary at all. In fact why not get rid of the blog spam altogether and link straight to the code. Yes, I realise RPS isn't exactly a small site and has quite the following (which seems to extend to HN as well, apparently), but their article adds nothing of real value apart from a quote that was pulled from another article on Kotaku.

Re: Jedi Knight 2 And 3 Source Code Released

#28
post #26

Jedi Knight 2 and 3? No. The two games are: Dark Forces 3: Jedi Knight 2: Jedi Outcast Dark Forces 4: Jedi Knight 3: Jedi Outcast 2: Jedi Academy Get it right, people.

Even with your reasoning "Jedi Knight 2" and "Jedi Knight 3" were the games that were open sourced (Outcast and Academy). I would love to see Dark Forces II: Jedi Knight get open sourced by LucasArts however :)

Re: Jedi Knight 2 And 3 Source Code Released

#29
post #22
post #4

Preferring sourceforge over github seems like an unusual choice, I didn't realise anyone still used it. It's a git repo too, I wonder why they did that?

I really don't understand the notion that SourceForge is dead and no one uses it anymore. http://sourceforge.net/projects/vlc http://sourceforge.net/projects/sevenzip/ http://sourceforge.net/projects/emule/ http://sourceforge.net/projects/filezilla/ http://sourceforge.net/projects/npppluginmgr/ http://sourceforge.net/projects/mingw/ http://sourceforge.net/projects/azureus/ http://sourceforge.net/projects/fceultra/ (S…

yea but how old are those projects? I recognise some of those from the 90s

If you were starting new today you wouldnt choose it. It is a clusterfuck. How the owners can't see the writing on the wall and change is beyond me.

For all I know maybe they are

Re: Jedi Knight 2 And 3 Source Code Released

#30
post #11
post #9

Earlier quoted context omitted.

What exactly is wrong about that? The nesting is too deep imho, but apart from that it looks ok. This looks more like a design problem, because there are lots of special cases, but the code style is ok.

Look at the size of that thing That function is almost 1500 lines long, full of complex nested if conditions and commented out blocks. I understand how code (especially game character control code) grows to become like that, and I've probably been guilty of some similar horrors myself, but the most I can do with such code style is excuse it.

Sometimes the program logic consists of hundreds of cases and putting it all into one function is a good solution, since you see the complexity.

I know that object-oriented best practice would suggest a lot of different classes and using dynamic dispatch for switching. That might even be faster. However, I dislike the fact that this scatters the logic across hundreds of files.

The best solution would be to simplify the logic, but this is also the most costly/time consuming variant.

Post reply on HN