JACoders / OpenJK

Community effort to maintain and improve Jedi Academy (SP & MP) + Jedi Outcast (SP only) released by Raven Software
GNU General Public License v2.0
2.03k stars 614 forks source link

Building the Jedi Outcast executable? #179

Closed B-Keeper closed 11 years ago

B-Keeper commented 11 years ago

Is it just me, or it's not possible to build the JK2 engine with the project files in codeJK2? There are at least 5 errors (and about 10-15 warnings) for each file the compiler starts to build.

And besides, if the aim of the project is to "not attempt to rebalance or otherwise modify core gameplay aspects", why it was necessary to hack the JA engine to (try) to use the JK2 game DLL? (Not to mention that I still can't get it to work, it won't even load a map.)

Wouldn't the code be cleaner and easier to maintain if the JA executable would contain only JA code, and the actual JK2 executable would be mainatined and used for JK2? Or is this the ultimate goal, and this state is just temporary?

eezstreet commented 11 years ago

You're not supposed to build the JK2 executable. You're supposed to use the JK2 .DLL with the JKA .exe

Sent from my Windows Phone


From: B-Keepermailto:notifications@github.com Sent: ‎4/‎30/‎2013 5:47 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Subject: [OpenJK] Building the Jedi Outcast executable? (#179)

Is it just me, or it's not possible to build the JK2 engine with the project files in codeJK2? There are at least 5 errors (and about 10-15 warnings) for each file the compiler starts to build.

And besides, if the aim of the project is to "not attempt to rebalance or otherwise modify core gameplay aspects", why it was necessary to hack the JA engine to (try) to use the JK2 game DLL? (Not to mention that I still can't get it to work, it won't even load a map.)

Wouldn't the code be cleaner and easier to maintain if the JA executable would contain only JA code, and the actual JK2 executable would be mainatined and used for JK2? Or is this the ultimate goal, and this state is just temporary?


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/179

eezstreet commented 11 years ago

Anyway, it doesn't "try" to use the DLL, it works perfectly fine aside from 1-2 missions which are bugged.

It would be ridiculous to maintain 2 engines which are nearly identical anyway.

Sent from my Windows Phone


From: B-Keepermailto:notifications@github.com Sent: ‎4/‎30/‎2013 5:47 AM To: Razish/OpenJKmailto:OpenJK@noreply.github.com Subject: [OpenJK] Building the Jedi Outcast executable? (#179)

Is it just me, or it's not possible to build the JK2 engine with the project files in codeJK2? There are at least 5 errors (and about 10-15 warnings) for each file the compiler starts to build.

And besides, if the aim of the project is to "not attempt to rebalance or otherwise modify core gameplay aspects", why it was necessary to hack the JA engine to (try) to use the JK2 game DLL? (Not to mention that I still can't get it to work, it won't even load a map.)

Wouldn't the code be cleaner and easier to maintain if the JA executable would contain only JA code, and the actual JK2 executable would be mainatined and used for JK2? Or is this the ultimate goal, and this state is just temporary?


Reply to this email directly or view it on GitHub: https://github.com/Razish/OpenJK/issues/179

B-Keeper commented 11 years ago

Okay then, I'm not sure why I can't play JK2.

-First, the engine needs both the JA and the JK2 game DLL to start in JK2 mode for some reason.

-Then there's no interface text at all (this has been reported to happen on Linux, had been apparently fixed, but still happens on Windows).

-Then if I try to start playing by using Force Sense to find where the new game label is, all I get is an error message (I can't really remember it, but I'll try to play again soon). If I try to load a map from the console, the engine just crashes.

And just another question, kind of related, but a bit off-topic: how difficult would it be to remove the JK2 references from the OpenJK engine? I'd like to build a game from scratch, using the OpenJK engine and its JA game code, and I'd like to get rid of all the unnecessary stuff. I haven't looked through the engine code yet as I was more busy with the game code, but by taking a quick look at some sources, I see that most JK2 related code is "separated" with #ifndef __NO_JK2. Is this the case with all JK2 parts?

xycaleth commented 11 years ago

Anyway, it doesn't "try" to use the DLL, it works perfectly fine aside from 1-2 missions which are bugged. It would be ridiculous to maintain 2 engines which are nearly identical anyway

You mean the same way we're maintaining an SP and an MP engine for JKA? :p

B-Keeper commented 11 years ago

The SP engine works quite differently than the MP one, isn't it? Raven made them separately for a reason, there would be no point of merging them, IMHO.

xycaleth commented 11 years ago

A lot of the main components of the SP and MP engine are likely to be similar. I don't see any reason why the common functionality can't be merged, and the places which do differ can be kept separate. I've already noticed a number of times where changes have had to be made twice, once in the SP engine and once in the MP engine.

ensiform commented 11 years ago

No but I think jasp.dll and jamp.dll should be in gamedata for stuff thats different still.

B-Keeper commented 11 years ago

I've found out that eezstreet has a standalone JK2 project which builds just fine, so I'm closing this. Sorry for the mess I've made, I should have taken a look around before posting...

HEXcube commented 9 years ago

Compiling OpenJK for Jedi Knight 2: Jedi Outcast does work. However unlike @B-Keeper 's case, it's the master branch that builds fine for me, not @eezstreet 's jk2hd branch. I've built and tested outcast on 64bit versions of both Ubuntu 14.04LTS "Trusty Tahr" and Ubuntu 12.04LTS "Precise Pangolin". This is how I did it:

  1. Downloaded the master branch https://github.com/JACoders/OpenJK/archive/master.tar.gz
  2. Combining instructions from the Compilation Guide, Issue #273 and Readme in the codeJK2 folder I did these:
    • Turned on BuildJK2SPEngine, BuildJK2SPGame and BuildJK2SPRdVanilla options in the main CMakeLists.txt file
    • Ran cmake with cmake -BuildJK2Support=ON ..
  3. make rdjosp-vanilla_x86_64 jospgamex86_64 openjo_sp.x86_64 and got binaries rdjosp-vanilla_x86_64.so, jospgamex86_64.so and openjo_sp.x86_64
  4. This outcast mode build uses ~/.local/share/openjo (as opposed to ~/.local/share/openjk for the regular build) as it's settings folder. So, I copied the pk3 file assets and jospgamex86_64.so to ~/.local/share/openjo/base. openjo_sp.x86_64 and rdjosp-vanilla_x86_64.so goes in ~/.local/share/openjo. I ran openjo_sp.x86_64 and the game seems to run well.

OpenJK team doesn't guarantee Jedi Outcast to run bug free, but for me it was worth the risk, coz I got:

In addition, I tried the other method: running official buildbot build's _openjk.x8664 binary and libraries with the outcast build libraries using +set com_jk2 1 option, but that reproduced this issue as well as #273 for me.

ensiform commented 9 years ago

You haven't been able to run it from the main SP binary for some time now. We split it to separate exes like last summer.

HEXcube commented 9 years ago

We split it to separate exes like last summer.

@ensiform Oh, I see. So, that's the reason I couldn't get Jedi Academy's binary (openjk_sp.x86_64) to run in Outcast mode. And the reason why it builds fine for Outcast now! :-) But, that doesn't explain why @eezstreet 's JK2 specialized branch doesn't build. :-( Will OpenJK merge this branch into master?

ensiform commented 9 years ago

Nope, its not related.

xycaleth commented 9 years ago

To expand on @ensiform's comment, eezstreet's jk2hd branch is something he went off to pursue on his own. It was meant to be a modernized version of JK2. As our goal is to not modify any of the gameplay in JK2 or JKA, it doesn't really have a place in our code.

Regarding not being able to run openjk_sp.x86_64 in SP mode, we chose to split the JK2 and JKA SP binaries because having them combined was making the code too messy.