Author Topic: How does one get started?  (Read 3723 times)

0 Members and 1 Guest are viewing this topic.

How does one get started?
Hi guys,

if I was interested in trying to do code something for FS2 myself, how would I start? Would I have to join the staff somehow and is there any help around on how to get an overview of the code and the different classes? Are asignments given or does everyone simply try to code a feature and release the suggested code for approvement and for being included into a build?

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: How does one get started?
Basically it's a big free for all in terms of what features get added. Each coder has certain things that interest them and if they can add them without getting in anyone else's way then it goes in to HEAD. The 3.6.9 branch is bug fixes only so we're a bit stricter about what goes in there.

Here's a guide on how to install Tortoise CVS and get the code using anonymous access. If you have a different CVS client you should still be able to figure out what you need to do from that

We have a list of bugs here. If you're interested in helping the WCS team pay special attention to anything reported by Starman or Tolwyn as those are probably things that are directly affecting WCS.

At the moment we don't let just anyone commit to CVS. Write some code with a feature or bug fix that works and we'll give you proper access (You'll have to talk to Goober or Taylor about that though). That would entail joining the SCP staff but it's not like we make heavy demands on you. It's mostly just a case of telling you to clean up any mess you make. :)


As for where to start I followed this guide and started in the SEXP code. But then I had 5 years experience of working with SEXPs in mission design so although I didn't know much about how they worked under the hood I had a very good idea what the end result was.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: How does one get started?
What IDE are you guys usually using? I use MSVC 2005 myself and at the moment I try to import the VC6.0 project files and get them to compile.
I get more warnings than I'd like to and I get several errors...

One of which I can't make any sense:

Fehler   90   error PRJ0019: Ein Tool hat einen Fehlercode aus folgender Quelle zurückgegeben: "Copying build..."   Freespace2

Error        90      error PRJ0019: A tool has returned an error code from this source: "Copying build..."   Freespace2

any ideas?

 
Re: How does one get started?
Jesus.. and now both 6.0 and 2003 versions show me 83 linker errors...

how the heck do you get anything compiled with this? :P

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: How does one get started?
One of which I can't make any sense:

Fehler   90   error PRJ0019: Ein Tool hat einen Fehlercode aus folgender Quelle zurückgegeben: "Copying build..."   Freespace2

Error        90      error PRJ0019: A tool has returned an error code from this source: "Copying build..."   Freespace2

I suspect I know the cause of this error and it's pretty minor. The project settings include a custom step to move the exe to your Freespace 2 folder. It does this by looking at the value of an environmental variable called FS2PATH. If you don't have this defined the last step will fail. It will also fail if you have the FS2_open or FRED2_Open exe you're trying to copy over open already.

If you're getting this error FS2 has actually compiled. It will be sitting where ever 2005 compiles to. The point of moving the newly compile file is so that you can run whatever you just compiled. Trying to run it from the place it is before you move it won't do much because it doesn't have access to the data from there.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: How does one get started?
Edit: sorry, had to check again. Made a mistake.

This is the real situation:

_____________________________________

Alright, then the next problems:

How and where do I define that variable?

And most importantly, after copying the exe to my freespace directory I got this error:

Debug assertion failed!

Program: ...\fs2_open_3_6_9_debug.exe
File: c:\programme\microsoft visual studio 8\vc\include\vector
Line: 756

Expression: vector subscript out of range

As already mentioned by somebody else in this thread:

http://www.hard-light.net/forums/index.php/topic,39908.msg815430.html#msg815430

So what now?

The 3.6.9 release crashes as well.

The downloadable versions of 3.6.9 (both debug und release) are running smoothly for me and have very different file sizes compared to the ones I get compiling this stuff.

So something is compiling wrong here.
« Last Edit: February 04, 2007, 01:39:57 pm by KeldorKatarn »

 
Re: How does one get started?
Over 50 compiler warnings.. a fatal runtime error in the debug version... wrong filesize of the exe ... and that problem with copying the file because of the missing environment variable.

That's the situation right now

Edit:

Has ANYONE ever got this to run after compiling with MSVC 2005?

I found a few very very strange things in the code that is not up to MSVC 2005 C++ standard. VC6.0 accepted code that was anything but standard C++ and several stuff in the standard header files were changed to be more up to standard in 2005. So if nobody has every been able to compile this under 2005, I think it might simply not compile at all under 2005 because of too many stuff in the code that is not up to 2005 C++ specs.
I don't know.

I don't see how a vector out of range situation can show up and compile for one person and not for the other if both people are using the same compiler.
So again.. has anyone ever successfully compiled this under 2005?
« Last Edit: February 04, 2007, 01:45:51 pm by KeldorKatarn »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: How does one get started?
Try running in OpenGL mode for a start if you aren't already.

I believe that Phreak has been working on a set of 2005 project files earlier this week though.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 
Re: How does one get started?
I am running on OpenGL. That doesn't make a difference.

And as I said, this must be about the way this compiles.

The downloadable Freespace Open Runtimes work perfect. I have no problems at all running FS2_open.

I only get this error with my compiled version, which doesn't have the same file size as the downloadable ones,
so something doesn't compile as it should.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: How does one get started?
MSVC 2003 should build and compile fine outside of the box. I remember recommending to someone that they import the file into 2005 rather than VC6 and, IIRC, it worked.

What linker errors are you getting with the 2003 project files?
-C

 
Re: How does one get started?
I did import the 2003 version.. And I don't get linker errors, the application simply crashes.

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Re: How does one get started?
i updated the 2005 project files on saturday the 3rd and committed the changes to cvs.

you need to let us know where the linker errors are occuring so we can help you fix them
« Last Edit: February 06, 2007, 12:26:14 pm by phreak »
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline neoterran

  • 210
Re: How does one get started?
I did import the 2003 version.. And I don't get linker errors, the application simply crashes.

I've had the same problem in the past.
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 
Re: How does one get started?
Does nobody have any ideas left? This kinda prevents me from doing anything with this code. I can't even begin trying to implement something, as long as the code doesn't compile into a working exe as it is.

What compilers does the SCP team use? I mean obviously you guys get it to work. So what are you using? Please don't tell me VC6.0.

 

Offline neoterran

  • 210
Re: How does one get started?
I'm pretty sure most of them use visual interdev and vc6.0, except taylor, who works on linux, so he must have a different method of compiling (command line based ?)
Official Taylor Fan Club Member.
Chief Grognard.
"How much code could a coder code if a coder could code code?"

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Re: How does one get started?
i updated the 2005 project files on saturday the 3rd and committed the changes to cvs.

you need to let us know where the linker errors are occuring so we can help you fix them
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 
Re: How does one get started?
I see, well ok, lemme try that new version.

Edit:
Ok I get several compiler errors to begin with, since most include directories aren't set in the project files:

Fehler   1   fatal error C1083: Datei (Include) kann nicht geöffnet werden: "theora/theora.h": No such file or directory   g:\eigene dateien\visual studio 2005\projects\fs2_open\code\cutscene\oggplayer.h   23

and alike.
Then there's several files in the project that don't exist anymore:

Fehler   7   fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\..\code\graphics\GrZbuffer.cpp": No such file or directory   c1xx
Fehler   9   fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\..\code\graphics\grd3dbatch.cpp": No such file or directory   c1xx
Fehler   12   fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\..\code\graphics\GrD3DParticle.cpp": No such file or directory   c1xx
Fehler   9   fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\..\code\ship\ai.cpp": No such file or directory   c1xx
Fehler   10   fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\..\code\ship\AiBig.cpp": No such file or directory   c1xx
Fehler   11   fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\..\code\ship\AiCode.cpp": No such file or directory   c1xx
Fehler   12   fatal error C1083: Datei (Quelle) kann nicht geöffnet werden: "..\..\code\ship\AiGoals.cpp": No such file or directory   c1xx


After setting the necessary paths (..\..\dx8sdk\include; ..\..\openal\include; ..\..\oggvorbis\include; ..\..\lua)
and removing the nonexistant files:

Fehler   8   error C4430: Fehlender Typspezifizierer - int wird angenommen. Hinweis: "default-int" wird von C++ nicht unterstützt.   g:\eigene dateien\visual studio 2005\projects\fs2_open\code\osapi\outwnd.cpp   1348

This is an incredibly obvious error:

static debug_window_inited = false;

Must be:

static bool debug_window_inited = false;

more to come...



« Last Edit: February 06, 2007, 01:26:08 pm by KeldorKatarn »

 
Re: How does one get started?
Standard VS6.0 error (and incredibly annoying. I've encountered those in every single VC6.0 project I've ever looked at):

Fehler   37   error C2065: 'i': nichtdeklarierter Bezeichner   g:\eigene dateien\visual studio 2005\projects\fs2_open\code\freespace2\freespace.cpp   4165

      for(int i = 0; i < 30; i++)
      { ... }
      sprintf(mem_buffer,"Total RAM:\t%d K", TotalRam / 1024);
      gr_string( 20, 230 + (i*10), mem_buffer);

Must be:

      int i = 0;
      for(i = 0; i < 30; i++)
      { ... }
      sprintf(mem_buffer,"Total RAM:\t%d K", TotalRam / 1024);
      gr_string( 20, 230 + (i*10), mem_buffer); // since i is again used in this line!!



Also over 30 compiler warnings about type conversion and outdated c-functions and a few linker warnings.

Fehler   42   error RC2135 : file not found: ..\..\code\sound\phrases.cfg   g:\Eigene Dateien\Visual Studio 2005\Projects\fs2_open\code\freespace2\freespace.rc   412
Fehler   44   error BK1513 : Nicht inkrementelle Aktualisierung erfordert alle .SBR-Dateien   BSCMAKE


Edit: And just so we don't have a missunderstanding here: I am using (as recommended) the 3.6.9 branch
« Last Edit: February 06, 2007, 01:56:26 pm by KeldorKatarn »

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: How does one get started?
That little error is due to MS being bloody idiots and thinking that

for (int i=0, i<whatever, i++)
{
some code
}
somevariable = i;


is perfectly legal code. It isn't and someone should explain exactly why using a baseball bat for punctuation. I'm surprised that you're finding any broken code like the above before though. Usually it gets the coders who aren't on VC6 rather upset and shouty and gets fixed very quickly.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

  
Re: How does one get started?
Well, that was a particular 6.0 error. MS fixed it since 2003.

That is one of the reasons why I will never ever use MSVC6.0 by the way. It simply had way to many strange C++ standard interpretations in it.

Edit: Anyone with any further ideas? The 2005 project file I got is obvisouly far from being compilable. So if someone updated that it is not the 3.6.9 one.
Any other suggestions on how to get a compilable version of this?
« Last Edit: February 07, 2007, 10:45:20 am by KeldorKatarn »