Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Cross-Platform Development => Topic started by: northtwilight on January 17, 2006, 07:00:18 pm

Title: Developmentally Challenged Questions # 2-6 : Where to begin?
Post by: northtwilight on January 17, 2006, 07:00:18 pm
Hello all,


I wanted to thank everyone with their comments and suggestions in getting my bearings around the code. I've spent a few days researching resources (C/C++, OpenGL, game dev books a bit more difficult than a connect-the-dots primer: NB: this does not mean, 'I've read them inside out'). Got out I Horton's Beginning C & Prata's C++ Primer Plus 5e from the library, and I've managed to locate copies of a bunch of OpenGL and game dev texts. Haven't managed to locate here in TO any books on Lua, though I think the online refs from Wikipedia and its homesite should be good enough for now.

My skills are low, though that should change soon, once I get going (tonight, it's a preliminary flip through Horton). I don't want to disappoint people, so I am being quite deliberate in saying that I am just not 1337.

OK. That said,


Well, just my musing aloud.

Thanks for listening,
Mass
Title: Re: Developmentally Challenged Questions # 2-6 : Where to begin?
Post by: taylor on January 18, 2006, 05:15:50 am
1) Not sure.  I figured it out just by going through all of the code.  That took a good long while of course.

2) I think that depends entirely on you.  I, for instance, just decided that I wanted to do something specific and then concentrated on that code in particular.  I would say that you may just want to pick something you want, be it a bug or a small feature to add, and focus only on that.  Work out from there until you are more familiar with the code.

3) I prefer C.  C++ has some good things that I like but I make use of very few of them.  You will find that most of the code is written as if it was C so it's not all that strange.  I use a mix of C and C++ style: C++ style comments and one particular layout (choice of braces), but write in a general C way.  I find that easily readable, it doesn't waste much white space, and it works descently well with OpenGL itself.  I think it's only confusing when you mix the different styles in the same code.  Having one function that is obviously C and the next being obviously C++ is confusing.  If starting something new do it however you prefer, otherwise code it like it is, even if you don't necessarily code like that yourself.  That's the way I approach it anyway, but I also appear to be the only one.

4) OpenGL minimum version is 1.2.  Between extensions and what not it's easy to get 1.3/1.4 functionality out of it if you use the extensions properly.  I'm generally coding for 1.4/1.5, but with backwards compatibility to 1.2 as much as possible.

5) Varies (5-6 on average probably).  I worked on the icculus.org version for a couple of years before messing with FS2_Open so I'm used to the code release of the retail version.  I don't think anyone here actually works/worked for :v: though.
Title: Re: Developmentally Challenged Questions # 2-6 : Where to begin?
Post by: northtwilight on January 18, 2006, 08:53:21 am
Taylor,

I can't thank you enough for this. It's a good set of guidelines to follow and that's all I could ask for. More DCQs soon.

Cheers
M

Title: Re: Developmentally Challenged Questions # 2-6 : Where to begin?
Post by: northtwilight on January 19, 2006, 11:06:15 pm
Sorry I'm doing this here, but I can't seem to post over at SCP.

hey Googer5000,

That type mismatch error continues..

oh well.



if g++ -DPACKAGE_NAME=\"fs2_open\" -DPACKAGE_TARNAME=\"fs2_open\" -DPACKAGE_VERS ION=\"3.6.7\" -DPACKAGE_STRING=\"fs2_open\ 3.6.7\" -DPACKAGE_BUGREPORT=\"\" -DNO _CD_CHECK=1 -DNDEBUG=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1  -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE _INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_LIBGL=1 -DSCP_UNIX=1 -D NO_DIRECT3D=1 -DUSE_OPENAL=1  -I. -I.    -g -O2 -Wall -I/usr/include/SDL -D_REEN TRANT -fsigned-char -Wno-unknown-pragmas  -I/usr/lib/wx/include/gtk2-unicode-rel ease-2.6 -I/usr/include/wx-2.6 -DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_B ITS=64 -D_LARGE_FILES -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -Wno-deprecated -Wno -char-subscripts  -MT fredframe.o -MD -MP -MF ".deps/fredframe.Tpo" -c -o fredfr ame.o `test -f 'wxfred2/fredframe.cpp' || echo './'`wxfred2/fredframe.cpp; \
        then mv -f ".deps/fredframe.Tpo" ".deps/fredframe.Po"; else rm -f ".deps /fredframe.Tpo"; exit 1; fi
wxfred2/fredframe.cpp:94:42: error: macro "_T" passed 2 arguments, but takes jus t 1
wxfred2/fredframe.cpp: In constructor 'FREDFrame::FREDFrame(const wxChar*, int, int, int, int)':
wxfred2/fredframe.cpp:94: error: '_T' was not declared in this scope
wxfred2/fredframe.cpp: In member function 'void FREDFrame::OnFileOpen(wxCommandE vent&)':
wxfred2/fredframe.cpp:109: error: conversion from 'const char [5]' to 'const wxS tring' is ambiguous


I guess it didn't work:

FREDFrame::FREDFrame(const wxChar *title, int xpos, int ypos, int width, int height)
: wxFrame(NULL, -1, title, wxPoint(xpos, ypos), wxSize(width, height))
{
myMenuBar = wxXmlResource::Get()->LoadMenuBar(_T("FREDMenu"));
SetMenuBar(myMenuBar);

CreateStatusBar(5);
SetStatusText(_T("For Help, press F1", 0); <-- here ???



Title: Re: Developmentally Challenged Questions # 2-6 : W
Post by: Goober5000 on January 20, 2006, 01:39:20 am
That's not what I posted...
Code: [Select]
SetStatusText(_T("For Help, press F1"), 0);
Notice the position of the parentheses.  That error message should have given away immediately.

Title: Re: Developmentally Challenged Questions # 2-6 : Where to begin?
Post by: northtwilight on January 20, 2006, 07:04:35 am
You're right.

Sorry!  :eek:
Title: Re: Developmentally Challenged Questions # 2-6 : W
Post by: Goober5000 on January 20, 2006, 01:25:15 pm
Did that work, then?
Title: Re: Developmentally Challenged Questions # 2-6 : Where to begin?
Post by: northtwilight on January 22, 2006, 06:25:25 pm
Hi Goober!

Sorry about the delay. That error cleared up, but now it is missing some includes, I think:

wxfred2/fredframe.cpp:52:33: error: asteroidfieldeditor.h: No such file or directory
wxfred2/fredframe.cpp:53:32: error: missionspecseditor.h: No such file or directory
wxfred2/fredframe.cpp:54:30: error: debriefingeditor.h: No such file or directory
wxfred2/fredframe.cpp:55:32: error: shieldsystemeditor.h: No such file or directory
wxfred2/fredframe.cpp:56:35: error: commandbriefingeditor.h: No such file or directory
wxfred2/fredframe.cpp:57:38: error: setglobalshipflagseditor.h: No such file or directory
wxfred2/fredframe.cpp:58:38: error: voiceactingmanagereditor.h: No such file or directory
wxfred2/fredframe.cpp:59:28: error: campaigneditor.h: No such file or directory
wxfred2/fredframe.cpp:60:22: error: aboutbox.h: No such file or directory


thank you for the help so far!
M
Title: Re: Developmentally Challenged Questions # 2-6 : Where to begin?
Post by: northtwilight on January 27, 2006, 09:11:26 am
I managed to find the files from an old build from May 2005 (CVS??)

Am I missing something? Is there a CVS browser I can use to look at the source code directly from warpcore.org? I suspect I'm not getting all the files for some reason...


Cheers
Mass

Title: Re: Developmentally Challenged Questions # 2-6 : Where to begin?
Post by: taylor on January 27, 2006, 10:05:09 am
Is there a CVS browser I can use to look at the source code directly from warpcore.org?
http://fs2source.warpcore.org/cgi-bin/cvsweb/cvsweb.cgi/?f=h#dirlist
Title: Re: Developmentally Challenged Questions # 2-6 : Where to begin?
Post by: northtwilight on January 28, 2006, 06:43:46 pm
Thank you!
M

Title: Re: Developmentally Challenged Questions # 2-6 : Where to begin?
Post by: Ace Pace on June 22, 2006, 07:14:01 am
  • What would be the best reference for an overview of the whole game in its mechanics? By this, I mean a schematic of the various parts, and more importantly, those parts' functions and methods. If this doesn't exist for FS2, is there a similar one for another game online?

Someone actully sitting down and doing that would be awesome. As I can't exactly code for ****, I'll look at sitting down and getting something together on that front. 

If you want something rough, I can whip together what a general game engine looks like from a very top down view and PM it to you. I make no allowences for anything resembling code. :P
Title: Re: Developmentally Challenged Questions # 2-6 : Where to begin?
Post by: northtwilight on July 12, 2006, 10:58:56 pm
Reviving the dead...!

Hi AcePace -- could you PM that over to me? Have been away with health concerns but I should be back online more regularly in about three weeks or so, so no rush. Anything you could provide would be very much appreciated, when you have time of course.

Cheers!
Mass