Page 1 of 2

Searching for more code reviews

Posted: Mon Oct 15, 2012 1:55 pm UTC
by Viech
kharnov wrote:

Due to our descent from Quake 3, any review of the Quake 3 engine code applies. A particularly good one can be found here, but others can be found easily through a quick Google search.

I've been reading a lot of unvanquished code lately but I think in order to get a decent overview I need either a lot more time or more documentation (and since I'm rather busy and supposed to map, I'd prefer the latter). I read Fabien Sanglard's review a while ago but didn't find anything comparable when asking the oracle.
I'd like to ask the people hwo are currently working on the code if they could share some of the resources they found particularily helpful for understanding it. It doesn't need to be directly related to quake 3 or any derived engine, I'd also be thankful for any article or book that would give me a more general overview over the technology used in our engine.


Re: Searching for more code reviews

Posted: Mon Oct 15, 2012 3:37 pm UTC
by Ishq

Specifically what parts of the code?


Re: Searching for more code reviews

Posted: Tue Oct 16, 2012 4:24 am UTC
by velociostrich

Viech, it has been my intention to document as much of the engine as I am capable of documenting (i.e., that I am capable of wrapping my head around) on the wiki for some time, but I haven't done much of anything in that regard due to time constraints. I entreat anyone at all to assist in this process, however. For the time being, there are a few links that may be of interest on the technical documentation page of the wiki.


Re: Searching for more code reviews

Posted: Tue Oct 16, 2012 7:06 am UTC
by Qrntz

A major help is something that can follow identifiers to the place of their declaration and/or initialization. (pretty much any IDE has this)
This way, you can easily analyze seemingly mysterious code by quickly jumping to the definitions of functions that comprise its sequence.


Re: Searching for more code reviews

Posted: Tue Oct 16, 2012 10:48 am UTC
by trinitrotoluene

cd src/engine
grep "int main" -r *
make popcorn

:rolleyes: :p


Re: Searching for more code reviews

Posted: Wed Oct 17, 2012 12:30 pm UTC
by Viech
Ishq wrote:

Specifically what parts of the code?

We spoke on IRC about this, I'm mainly looking for a rough general overview over the complete project as well as lecture that explains/reviews the methods and algorithms used.

velociostrich wrote:

Viech, it has been my intention to document as much of the engine as I am capable of documenting (i.e., that I am capable of wrapping my head around) on the wiki for some time, but I haven't done much of anything in that regard due to time constraints. I entreat anyone at all to assist in this process, however. For the time being, there are a few links that may be of interest on the technical documentation page of the wiki.

Thank you, these resources seem useful!

Qrntz wrote:

A major help is something that can follow identifiers to the place of their declaration and/or initialization. (pretty much any IDE has this)
This way, you can easily analyze seemingly mysterious code by quickly jumping to the definitions of functions that comprise its sequence.

I did load the code in Eclipse once, thought "this feels so wrong" and closed it. I never worked on a big enough C project to try out any IDE. Can you recommend one that 1) works with the layout of the git repo (or even knows git) and 2) doesn't mess it up with hundreds of meta files?

trinitrotoluene wrote:

make popcorn

Code: Select all

~/unv/git/src/engine (git)-[master] % grep -R "int main"
sys/sys_main.c:int main( int argc, char **argv )
sys/SDLMain.m:int main ( int argc, char **argv )

I expected something more creepy to happen (such as ~/unv/git (git)-[master] % grep -R "int main"|wc -l answering 506 ... wtf).


Re: Searching for more code reviews

Posted: Thu Oct 18, 2012 1:03 am UTC
by Ishq

Ah, okay.


Re: Searching for more code reviews

Posted: Fri Oct 19, 2012 4:45 pm UTC
by gavlig

@Viech: QtCreator works fine as IDE for unv. Just load it from CMakeLists.txt and you have a ready-to-go project ;)


Re: Searching for more code reviews

Posted: Sat Oct 20, 2012 8:13 am UTC
by Qrntz
Viech wrote:

I did load the code in Eclipse once, thought "this feels so wrong"

It sure does.

Viech wrote:

I never worked on a big enough C project to try out any IDE. Can you recommend one that 1) works with the layout of the git repo (or even knows git) and 2) doesn't mess it up with hundreds of meta files?

Qt Creator to both or Vim with extensions if you're feeling hardcore.
KDevelop might be applicable but I have not tried using it for that.


Re: Searching for more code reviews

Posted: Sat Oct 20, 2012 2:27 pm UTC
by Viech

I used grep and vim before but tracking function calls between files was rather tedious (is there a plugin that makes this easier?). Qt Creater looks very promising and works like a charm when pointing it to the CMakeLists.txt, I will give it a try!