Hard Light Productions Forums

General FreeSpace => FreeSpace Discussion => Topic started by: TelaCorp on March 20, 2013, 03:54:56 pm

Title: Free Space 2 Source Code
Post by: TelaCorp on March 20, 2013, 03:54:56 pm
Anyone know where I can find the actual source code for Free Space 2? I don't want the SCP, or gog.com. I just want the source code. thank you.
Title: Re: Free Space 2 Source Code
Post by: MatthTheGeek on March 20, 2013, 04:07:32 pm
Do you mean the original, retail source code released in 2002 ? Or the current trunk source code of FSO ? For the latter, I direct you here (http://www.hard-light.net/forums/index.php?topic=82688.msg1479352#msg1479352).
Title: Re: Free Space 2 Source Code
Post by: TelaCorp on March 20, 2013, 04:17:24 pm
I was planning on compiling Freespace 2 with the source code, and then messing around with the files and seeing if the game still runs. but I can't find the source code at all. so the original, I think.
Title: Re: Free Space 2 Source Code
Post by: TelaCorp on March 20, 2013, 04:39:53 pm
okay, to simplify this, I just wanted a compilable freespace 2 source code. I don't want scp because you need game files to get it to work. And one of my coder friends told me I could compile the game from the source code. Then I was going to practice messing things up and getting them to work messed up.
Title: Re: Free Space 2 Source Code
Post by: niffiwan on March 20, 2013, 04:55:25 pm
 :confused:  you need the game files for the original code to run as well  :confused:

Unless you're talking about a Total Conversion, in which case you need *some* sort of game files (assets / tables / etc) in order for it to work. The engine by itself, with nothing else, is rather useless ;)

Regardless, you can get the original Freespace2 source code (as released by Volition) from one of the original SVN commits.  (I think it might be commit #5).  See the link that MatthTheGeek posted, any maybe do some googling on getting svn to extract a specified commit number (i.e. not the latest)
Title: Re: Free Space 2 Source Code
Post by: MatthTheGeek on March 20, 2013, 04:59:04 pm
I don't want scp because you need game files to get it to work
Whether FSO or retail, you need game assets to run the game. The executable itself cannot run on its own.

If you want playable assets without buying the game, I suggest Diaspora, which is a free standalone.
Title: Re: Free Space 2 Source Code
Post by: General Battuta on March 20, 2013, 05:34:34 pm
I don't want scp because you need game files to get it to work
Whether FSO or retail, you need game assets to run the game. The executable itself cannot run on its own.

If you want playable assets without buying the game, I suggest Diaspora, which is a free standalone.

Precisely this.
Title: Re: Free Space 2 Source Code
Post by: headdie on March 20, 2013, 05:35:39 pm
there are two aspects to Freespace due to the legal situation created when Volition (the developer) was purchased by THQ, while the game was published by THQ's rival Interplay who owns certain rights to the Freespace IP.

the game engine, which is the code that ties all other components together including audio visuals and user inputs is free and has been ever since Volition released the source code to the game engine to the public for free.

The game assets which is everything you see, hear, missions and anything story related is privately owned by Interplay who still require payment for their use which is what you buy when you purchase from GoG and the likes.

So no matter what you do, if you want to play Freespace 2 you need to purchase the game as always.

If you want to use the game engine for something such as making your own game then it is free no matter if you use the original source code or FSO.

In short the game assets have never been released for free, only the code behind the engine.

edit:

I forgot to mention that due to the terms of the Source Code being released it is against the terms of the licence behind it to profit from the engine.
Title: Re: Free Space 2 Source Code
Post by: karajorma on March 20, 2013, 08:18:34 pm
I'd also strongly suggest checking out the SCP version rather than the original code regardless of whatever you want to do. The SCP have fixed several bugs which you'll have to re-fix on the original code to make the game work.

For instance I suspect you probably have 4GB or more of RAM. In which case you'll get an error about not having enough memory.
Title: Re: Free Space 2 Source Code
Post by: Crybertrance on March 23, 2013, 05:34:02 am
For instance I suspect you probably have 4GB or more of RAM. In which case you'll get an error about not having enough memory.

Lol... This was also the issue on the old GoldSource engine if I recall correctly. Is this a persistent issue on old game engines?
Title: Re: Free Space 2 Source Code
Post by: Luis Dias on March 23, 2013, 06:10:37 am
For instance I suspect you probably have 4GB or more of RAM. In which case you'll get an error about not having enough memory.

Lol... This was also the issue on the old GoldSource engine if I recall correctly. Is this a persistent issue on old game engines?

Is this true still today? I mean, if you donwload from GOG, will you get this error? That would be somewhat terribad.
Title: Re: Free Space 2 Source Code
Post by: The E on March 23, 2013, 06:52:11 am
Lol... This was also the issue on the old GoldSource engine if I recall correctly. Is this a persistent issue on old game engines?

Unless the programmers in question were really futureproofing their code, yes, it is something of a common issue. The problem here is that the code polls the OS for the amount of memory available, and stores the result in a signed 32-bit integer. If you have more than 4GB of memory, this variable will overflow and the code will interpret the result as a negative number. It's an easy fix (just use an unsigned int instead of the signed one), but at the time the code was written, noone thought of user machines with that much RAM, or that the code would still be in use when they arrived.

Is this true still today? I mean, if you donwload from GOG, will you get this error? That would be somewhat terribad.

I _think_ the retail executable that GOG ships still has that issue.
Title: Re: Free Space 2 Source Code
Post by: TelaCorp on March 23, 2013, 10:35:59 am
good thing I only have 4GB! and I keep hearing that freespace is like $6 on gog.com, but on the site it says that it is $10. why the confusion? or did gog jack up the price?
Title: Re: Free Space 2 Source Code
Post by: Jeff Vader on March 23, 2013, 12:05:24 pm
good thing I only have 4GB! and I keep hearing that freespace is like $6 on gog.com, but on the site it says that it is $10. why the confusion? or did gog jack up the price?
I think they did. It used to be $5.99.
Title: Re: Free Space 2 Source Code
Post by: SpardaSon21 on March 23, 2013, 12:05:47 pm
Yeah, they increased the price.
Title: Re: Free Space 2 Source Code
Post by: MatthTheGeek on March 23, 2013, 01:13:26 pm
I blame Diaspora ! They got us too much success.
Title: Re: Free Space 2 Source Code
Post by: headdie on March 23, 2013, 01:17:46 pm
ooohhhhh kay
Title: Re: Free Space 2 Source Code
Post by: Klaustrophobia on March 24, 2013, 01:22:19 pm
$10 is still pretty much a steal.  i paid $80 for my copy.
Title: Re: Free Space 2 Source Code
Post by: Luis Dias on April 04, 2013, 09:05:16 am
Is this true still today? I mean, if you donwload from GOG, will you get this error? That would be somewhat terribad.

I _think_ the retail executable that GOG ships still has that issue.

That wouldn't be sustainable. Lots of people buying a game from your store and you can't play it because you have too much memory? What?
Title: Re: Free Space 2 Source Code
Post by: The E on April 04, 2013, 09:10:32 am
Again, I _think_ that the gog exe has that issue, I do not _know_ for certain, since I don't have the gog version.
Title: Re: Free Space 2 Source Code
Post by: Luis Dias on April 04, 2013, 09:16:09 am
That's why I used the conjugation that I did from the verb "is" to "would".
Title: Re: Free Space 2 Source Code
Post by: The E on April 04, 2013, 09:18:14 am
It's entirely likely that gog have patched their executable to disable that mem size check; it's trivial if you know what to look for (and I assume that the gog people do have a bit of experience in that regard).
Title: Re: Free Space 2 Source Code
Post by: Luis Dias on April 04, 2013, 10:34:23 am
Do they have access to the code of the games and a policy to keep the games updated to the current OSes and so on?

Wait why am I asking these questions here? Why should you answer me? Might as well check their FAQs :). Sorry!
Title: Re: Free Space 2 Source Code
Post by: The E on April 04, 2013, 11:10:36 am
They have the same access we do, at least for FS2 :P

The thing is though, the kind of memory capacity check :v: was using is a common pattern that shows up quite clearly in assembly, patching that out is not that hard.
Title: Re: Free Space 2 Source Code
Post by: wistler on April 04, 2013, 11:39:45 am
I have the gog copy and it works fine. I would imagine as a rule gog make old games runnable on newer systems, otherwise you'd just have pi**ed off customers all the time.