New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building the Jedi Outcast executable? #179

Closed
B-Keeper opened this Issue Apr 30, 2013 · 13 comments

Comments

Projects
None yet
5 participants
@B-Keeper

B-Keeper commented Apr 30, 2013

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

This comment has been minimized.

Contributor

eezstreet commented Apr 30, 2013

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:
#179

@eezstreet

This comment has been minimized.

Contributor

eezstreet commented Apr 30, 2013

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:
#179

@B-Keeper

This comment has been minimized.

B-Keeper commented Apr 30, 2013

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

This comment has been minimized.

Member

xycaleth commented Apr 30, 2013

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

This comment has been minimized.

B-Keeper commented Apr 30, 2013

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

This comment has been minimized.

Member

xycaleth commented Apr 30, 2013

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

This comment has been minimized.

Member

ensiform commented Apr 30, 2013

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

@B-Keeper

This comment has been minimized.

B-Keeper commented Apr 30, 2013

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...

@B-Keeper B-Keeper closed this Apr 30, 2013

@HEXcube

This comment has been minimized.

HEXcube commented Feb 5, 2015

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:

  • Native 64bit binary (I've been using the @xLAva 's 32bit only Linux build until now.
  • Better engine than Outcast's stock one. (I don't know for sure, but this maybe placebo effect, :-D )
  • I know it's not the only way to run Outcast on OpenJK: Jedi Outcast Academy mod can be used to run Outcast on OpenJK's Jedi Academy build, but it's got glitches and issues and is not a "clean" solution as a JK2 targeted build.
  • And nothing beats running Outcast on a bleeding edge OpenJK build :-)

In addition, I tried the other method: running official buildbot build's openjk.x86_64 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

This comment has been minimized.

Member

ensiform commented Feb 5, 2015

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

This comment has been minimized.

HEXcube commented Feb 5, 2015

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

This comment has been minimized.

Member

ensiform commented Feb 5, 2015

Nope, its not related.

@xycaleth

This comment has been minimized.

Member

xycaleth commented Feb 5, 2015

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment