Author Topic: Developmentally Challenged Questions # 2-6 : Where to begin?  (Read 3015 times)

0 Members and 1 Guest are viewing this topic.

Developmentally Challenged Questions # 2-6 : Where to begin?
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,

  • 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?
  • Where would you consider the easiest entry point to the code to be?
  • For OpenGL, I see that many writers see it as C, others C++, and others still as both. Is that mix confusing to people here?
  • Which (numbered) version (of OpenGL) does FS2 use?
  • About how many are there of you? How many people worked on the original retail release?

Well, just my musing aloud.

Thanks for listening,
Mass

 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Developmentally Challenged Questions # 2-6 : Where to begin?
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.

 
Re: Developmentally Challenged Questions # 2-6 : Where to begin?
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


 
Re: Developmentally Challenged Questions # 2-6 : Where to begin?
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 ???





 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Developmentally Challenged Questions # 2-6 : W
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.


 
Re: Developmentally Challenged Questions # 2-6 : Where to begin?
You're right.

Sorry!  :eek:

 

Offline Goober5000

  • HLP Loremaster
  • Moderator
  • 214
    • Goober5000 Productions
Re: Developmentally Challenged Questions # 2-6 : W
Did that work, then?

 
Re: Developmentally Challenged Questions # 2-6 : Where to begin?
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

 
Re: Developmentally Challenged Questions # 2-6 : Where to begin?
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


 

Offline taylor

  • Super SCP/Linux Guru
  • Moderator
  • 212
    • http://www.icculus.org/~taylor
Re: Developmentally Challenged Questions # 2-6 : Where to begin?
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

 
Re: Developmentally Challenged Questions # 2-6 : Where to begin?
Thank you!
M


 
Re: Developmentally Challenged Questions # 2-6 : Where to begin?
  • 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

  
Re: Developmentally Challenged Questions # 2-6 : Where to begin?
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