Author Topic: Coder startup day  (Read 3569 times)

0 Members and 1 Guest are viewing this topic.

Offline WMCoolmon

  • Purveyor of space crack
  • 213
If I can, I'm going to park myself in room #fs2source of irc.sorcery.net this Sunday (April 23), from 3-5 PM PST. The goal of this will be to help people get a working build environment for fs2_open set up.

Unfortunately, I haven't used Linux in awhile, and haven't ever compiled Fs2_open on OS X, so I won't be able to give much specific help for those systems. (I can still try, thought)

I'll answer other general technical issues, but mostly I'd like to concentrate on getting people set up so that they can code for fs2_open, or at least play around with the code a little.
« Last Edit: April 21, 2006, 06:25:58 pm by Goober5000 »
-C

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Cool. :) I linked your post to the calendar.

 

Offline Wedge

  • 23
That'd be really helpful, I was about to try and set things up on my own :)

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
How did it go?

 

Offline Wedge

  • 23
Don't know about everyone else, but it certainly helped me to get things working properly. Now to start trying to understand the code!  :eek2:

 

Offline ni1s

  • 26
It sure was nice to talk to people within the commuinty realtime.

 
Seconded -- you guys are the best!

Cheers
Mass

 

Offline Shade

  • 211
Quote
Now to start trying to understand the code!
I wish you luck :) Took me about three months from I started seriously looking at it until I actually got something done that worked (and wasn't a SEXP). Not exactly three months of concentrated work (I work 6 days a week, so not that much free time), but still.

I found looking through sexp.cpp to be a good entrypoint to the code, as one already tends to already understand the SEXPs from using them in FRED, and by tracing how they draw on the rest of the program you can learn a lot. Also, there's a nice article on creating new SEXPs over on VolitionWatch (now more or less defunct, but the articles are up still), which is very helpful if you want to try your hand with that.

[Edit] Hell, it was actually 3 months, not 2. How time flies when you're having fun...
« Last Edit: April 25, 2006, 09:29:09 am by Shade »
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
I also recommend starting in sexp.cpp too.
Karajorma's Freespace FAQ. It's almost like asking me yourself.

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

 

Offline Wedge

  • 23
Quote from: Shade
I found looking through sexp.cpp to be a good entrypoint to the code, as one already tends to already understand the SEXPs from using them in FRED
I think I've used FRED about 4 times total, so I'm not that lucky :) It does look like a good place to start though, thanks.

  

Offline Alpha0

  • 24
Although sexp.cpp is a good possible starting point, as it is very straight forward, I think that the best way to try to understand the code would be to start from WinMain and try to see how the program unfolds from there, how things are getting set up, what functions are called and how etc. Granted, it is not the easiest way, it takes lots of time and, at the beginning at least, you will be lost really quickly, but after the first tricky "initiation" period, you will see that it is in fact a very logical sequence and you will be able to see how changing little things can affect the results.

If you can, have handy a text editor with grep/SearchInFiles feature. When you are tracking a function, you can use that to examine quickly from which exact part of the code tree it is called, under what conditions and  where the functions/macros called within are defined. The MSVC IDE has this capability, I believe, and it is really really helpful. Also keep notes, plenty of them. You can't possibly remember everything by heart.

Sounds like a lot of work and it is, but it is also quite rewarding, especially the first time that you will see your own changes working in your favorite game. Good luck.

 

Offline CP5670

  • Dr. Evil
  • Global Moderator
  • 212
I didn't have too much trouble getting the code to compile, but it was good to have someone to answer the few questions I had. :) I mainly just wanted to be able to compile any updated CVS code, so I wouldn't need to wait for the publicly posted builds, but I'm going to try looking around in the code and see if I can understand any of it. There are a few simple things that I want to see if I can do.

 

Offline Shade

  • 211
If you do try starting by tracking the game sequence start to end, it's best to just skip the platform specific main functions and start with game_main. Easier since you don't need to sort through windows, mac and linux specific 'rubbish', and those all point to it anyway.
Report FS_Open bugs with Mantis  |  Find the latest FS_Open builds Here  |  Interested in FRED? Check out the Wiki's FRED Portal | Diaspora: Website / Forums
"Oooooooooooooooooooooooooooooooooooooooh ****ing great. 2200 references to entry->index and no idea which is the one that ****ed up" - Karajorma
"We are all agreed that your theory is crazy. The question that divides us is whether it is crazy enough to have a chance of being correct." - Niels Bohr
<Cobra|> You play this mission too intelligently.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Another good place to start is the parsing code. (With MSVC, do a whole-word case-sensitive search for "parse_ship", which is the function that parses an individual ship entry) You can do quite a bit with flags and values.

One part of code that could use work is the objecttypes stuff, there've been a couple requests, but that's a step up from the normal parsing stuff.
-C

 

Offline Inquisitor

Out of curiousity, why sorcery?

Glad it went well, cool stuff.
No signature.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
I've been having troubles connecting to Maxgaming, but not to SorceryNet, in the last few weeks. Dunno what it is/was exactly - it might just be that I don't have an ident port open - but I didn't want to risk the hassle.
-C

 

Offline Inquisitor

What address are you using? Not heard of anything server side that could be causing something new to prevent people from connecting.

Ping me on IM or something, don't want to derail your thread. If we're not going to use it, that's fine, but I should change the links to point to whatever we are using. If we can make it work, great, it's there for people to use.
No signature.