Author Topic: Where can we get the full source code for Paintball 2?  (Read 6086 times)

SoftCoder

  • PGP
  • Posts: 25
Where can we get the full source code for Paintball 2?
« on: August 13, 2008, 11:40:27 PM »
Does anyone know where I would be able to get the full source code for digital paintball 2? I tried a number of times over the past year but there is always a piece missing it seems? I was wanting to play around and get familiar with the codebase and have added a plugin system (allowing for 3rd party DLL's) on my box but noticed there are parts of the code that seem to be missing from the sourceforge downloads? I asked jitspoe where to get it all from, but he must be too busy to answer.

Thanks.

Mark Vejvoda

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Where can we get the full source code for Paintball 2?
« Reply #1 on: August 14, 2008, 12:25:01 AM »
The missing DLL is closed source.  It has cheat detection code in there.  Something we, obviously, don't want just floating around.  Sorry.

SoftCoder

  • PGP
  • Posts: 25
Re: Where can we get the full source code for Paintball 2?
« Reply #2 on: August 14, 2008, 12:42:05 AM »
Wouldn't that mean that Paintball 2 then violates the GPL under which its source code is released (and the Quake 2 source as well)? I am not wanting to wreck a great community here, you guys have all done a great job, but having dpb2 associated with open source is just a pretense. I was hoping this wasn't the case, that the anti-cheat was more of a "Server-side" issue handled similar to warcraft and other games out there).

The problem here is that no-body else can participate in your project as it is partially closed source. Perhaps mentioning that somewhere might save people time realizing that they might as well not waste time since they cannot participate in the project.

Great game, just sad to see its held in the hands of only a few and not shared with all. Thats not free software. At least not as the founder of the free software foundation defines it.

Thanks

Eiii

  • Autococker
  • Posts: 4595
Re: Where can we get the full source code for Paintball 2?
« Reply #3 on: August 14, 2008, 12:44:13 AM »
I love you.

sk89q

  • Global Moderator
  • Autococker
  • Posts: 1049
Re: Where can we get the full source code for Paintball 2?
« Reply #4 on: August 14, 2008, 12:52:00 AM »
The game code is in a dynamically linked library, and I don't believe those are in violation of the GPL. The original Quake 2 source that Paintball 2 is based upon, however, is available.

Some ideas were floating around suggesting that various parts of the core game engine become modularized.

IronFist

  • Autococker
  • Posts: 1304
Re: Where can we get the full source code for Paintball 2?
« Reply #5 on: August 14, 2008, 01:58:33 AM »
I assume Quake2's shared source files were never under the GPL until they were released along with all of Q2's source. All Jitspoe has to say is he's only been using the "old headers" and I believe you can then easily exempt the game library from the GPL. I think Mr. Stallman's blade of justice won't be bared any time soon ;)

I think the most straightforward way to allow others to contribute to the server code is to move the copyright-problematic/anticheat code into another closed-source library (at the very least, this sounds like less work than trying to modularize it).

Once this happens, others could do actual modularization (e.g. allow for plugins).

I'm personally interested in seeing this happen since I've been working on a plugin-related project over the summer. I have a large reliance on the closed-source code doing certain things (i.e. new server builds may break it -- most of my reliance is on EVENT_'s found in qshared), and I've also seen how scripting support (and a decent game-interfacing API) can trivialize the addition of new features. I will blather on about this at another time, but in any case, I'd be interested in contributing to the server code.

Private committee forum members: rest assured, this plugin system offers more than just a novel way to abuse server inhabitants. It addresses some of the feature requests and adds support for things I've wanted to see for a while. More on that later...

KnacK

  • Global Moderator
  • Autococker
  • Posts: 3039
Re: Where can we get the full source code for Paintball 2?
« Reply #6 on: August 14, 2008, 05:12:39 AM »
Wouldn't that mean that Paintball 2 then violates the GPL under which its source code is released (and the Quake 2 source as well)? I am not wanting to wreck a great community here, you guys have all done a great job, but having dpb2 associated with open source is just a pretense. I was hoping this wasn't the case, that the anti-cheat was more of a "Server-side" issue handled similar to warcraft and other games out there).

The problem here is that no-body else can participate in your project as it is partially closed source. Perhaps mentioning that somewhere might save people time realizing that they might as well not waste time since they cannot participate in the project.

Great game, just sad to see its held in the hands of only a few and not shared with all. Thats not free software. At least not as the founder of the free software foundation defines it.

Thanks

Mark,
DP has never been marketed as open source as there are too many issues that need to be resolved before that can happen ( can you say sounds?)

You should start looking at DP as glass half full rather than half empty.

SoftCoder

  • PGP
  • Posts: 25
Re: Where can we get the full source code for Paintball 2?
« Reply #7 on: August 14, 2008, 09:18:52 AM »
Ok, all I wanted to do was add some features to paintball for my family. I play it on  a local LAN at home with my children (we don't play on global servers). You also use voicechatter to talk between rooms and I added a plugin that would auto-use voicechatter for the whole family when we use paintball. In doing that I added a plugin framework to the code. Unfortunately that was when I discovered some missing code in the source code.. you cannot addbot's etc.. (I assume there is something sutbbing out server-code for recompiled versions of paintball).

We don't cheat and don't care about cheats and don't even play outside of the house. I was disappointed to see such an awesome game hosted on an opensource website (sourceforge.net) and yet itself not open source. The code based on the GPL quake engine and yet itself is not GPL.

I understand the need for anti-cheat etc.. I just think the layout of the source code will hinder the HUGE backlog of feature requests to a limited few who will likely never catch up to all the feature requests. If someone else wanted to help add code in a feature, they cannot! You cannot even properly test your changes because the server code disallows a lot of functionality in recompiled versions.

Anyways that is my last word on the issue. I won't argue this anymore. Great job on a n excellent game, poor job on openness.

KnacK

  • Global Moderator
  • Autococker
  • Posts: 3039
Re: Where can we get the full source code for Paintball 2?
« Reply #8 on: August 14, 2008, 09:22:46 AM »
You are unfairly grading this game and its developer.

Sorry that it's not open so you can add your plugins but short of a complete rewrite, it won't happen anytime soon.  again, this game isn't advertised as open source OR gpl'd.

Garrett

  • Autococker
  • Posts: 1372

XtremeBain

  • Developer
  • Autococker
  • Posts: 1470
Re: Where can we get the full source code for Paintball 2?
« Reply #10 on: August 14, 2008, 10:41:59 AM »
I'm not an expert on copywrite issues, GPL or "derivative work", but here's my explanation of the situation.

The engine is open source (client, server, graphics).  Some of the media is open source. The game or mod (gamex86.dll/.so) is closed source since it was not licensed at the time it was released (q2src320.exe -- 3yrs prior to engine code being open source).  jitspoe has taken advantage of this and uses the game code to hide his global login, cheat detection and whatever else he doesn't want us to see.  Good for keeping the game somewhat free of grievers, but bad for letting other people make their own improvements to things like game modes, chase camera, stats, global login integration or bot AI.

You can compile the engine code without having PB2's mod source.  You can not use these copies to play on Internet Public Servers (sv_public 1) without being detected for a modified client, if your server is on LAN/Internet with sv_public 0 then you should be able to play with modified clients without much worry.

As for developer participation, this hasn't been a "team effort" for over half a decade.  It's someone's personal project and a lot of people's pastime.  I would love to see this project take on more of the open-source culture and attract talented developers to improve the game, but that's a lot of change for one person to make on decently stable and mature project.

SoftCoder

  • PGP
  • Posts: 25
Re: Where can we get the full source code for Paintball 2?
« Reply #11 on: August 14, 2008, 01:51:34 PM »
I am no expert, but as soon as I start a local game on the same box, try to addbot bob, I get an error saying I need level 100. That doesn't seem like "unhindered' to me. I can't even make simple changes to the code that is open and then play locally on the same box cause I cannot even add a bot, and connected human players do not show up in the list. Basically it is crippled (try out for yourself)

Eiii

  • Autococker
  • Posts: 4595
Re: Where can we get the full source code for Paintball 2?
« Reply #12 on: August 14, 2008, 02:33:01 PM »
I am no expert, but as soon as I start a local game on the same box, try to addbot bob, I get an error saying I need level 100.
That's an issue of user-specific admin permissions, which you can easily modify on a server-by-server basis. Check the forums for info on 'server.cfg' and 'commands.txt'.

SoftCoder

  • PGP
  • Posts: 25
Re: Where can we get the full source code for Paintball 2?
« Reply #13 on: August 14, 2008, 02:56:35 PM »
Using the release build of paintball 2 with the same config files does not have this problem. I doubt this is related to config files. The only difference is I run paintball2_debug.exe from the same folder and get all kinds of issues. I can do addbot etc.. when not using the debug version no problem.

SoftCoder

  • PGP
  • Posts: 25
Re: Where can we get the full source code for Paintball 2?
« Reply #14 on: August 14, 2008, 04:30:39 PM »
Ok made a little progress. If i edit commands.txt and set everything to 0, now I can at least add bots etc.. thanks for the hint.

SoftCoder

  • PGP
  • Posts: 25
Re: Where can we get the full source code for Paintball 2?
« Reply #15 on: August 14, 2008, 05:00:34 PM »
Spoke too soon.. alas gamex86.dll keeps crashing the game at random intervals. :(

SoftCoder

  • PGP
  • Posts: 25
Re: Where can we get the full source code for Paintball 2?
« Reply #16 on: August 14, 2008, 09:12:33 PM »
More specifically, I am getting a floating point error crash on the line of code:

ge->RunFrame();

in the method:

void SV_RunGameFrame (void)

I only get these errors from compiled versions (Using Visual Studio 2008 Express) and not the shipped version of paintball2.exe

Any ideas what could be wrong? Unfortunately that method call goes into gamex86.dll so I cannot track further.

Zorchenhimer

  • Autococker
  • Posts: 2614
Re: Where can we get the full source code for Paintball 2?
« Reply #17 on: August 15, 2008, 06:20:44 PM »
You'll probably have to wait around for Jitspoe to fix your issue.  He is the developer/forum admin/etc.  Basically, he runs the show.  :P

SoftCoder

  • PGP
  • Posts: 25
Re: Where can we get the full source code for Paintball 2?
« Reply #18 on: August 15, 2008, 10:38:27 PM »
Just an FYI, I work a lot in the Borland C++ Builder Compiler. I wrote the actual plugins using Borland C++ and it looks like that Borland was causing the crash, not gamex86.dll

Strangely enough VC++ turns off floating point errors when doing graphics while Borland reports them by default. Even though I turned off floating point errors (which can be normal in graphics programming) still had crashes randomly. I thought as a test I would port the plugins to VC++ (since that was what I was compiling Paintball 2 with). After recompiling everything in vc++ no more crashing. So Borland was doing some crazy things to mess around with memory or the runtime environment.

Anyways, hopefully one day we will be able to work together with jitspoe as a team and crunch down on the feature requests together.

Thanks

jitspoe

  • Administrator
  • Autococker
  • Posts: 18801
Re: Where can we get the full source code for Paintball 2?
« Reply #19 on: September 17, 2008, 02:35:20 PM »
Sounds like a memory alignment issue:  The way the gamex86 API works is basically with a struct full of function pointers.  Those pointers get assigned on each end, but if they aren't in the same spot on each end, then who knows what you'll be pointing to.

As for the open source issues - the game code was written way back in the day when Quake 2 was closed source.  It's under a different license.  The only way to make it GPL compatible would be to re-write it completely using the GPL'd game library source as a base and get permission from all the contributors (or rewrite their code as well).  Not really feasible given my limited time.  There's also the aspect of cheaters mentioned above.  If everything were completely open sourced, it would be trivial to create server-side cheats, disable cheat detection, evade global bans, etc.