Contribution?

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
codekiddy
Space Floater
Posts: 41
Joined: Wed Nov 12, 2014 10:58 am

Contribution?

#1 Post by codekiddy »

Hi there,

I would like to join your project and probably contribute within limits of my knowledge and time available..

I've read the "How to help" page and currently setting up environment, and have some questions as well.

What configuration you use to compile FO? for example I compiled all dependencies and FO for debug x64 builds with msvc-140, however in cloned repo I found VS projects with release 32 configurations only, so I wonder if there is a specific reason of using release 32 bit builds? and are there any known problems with x64 platforms/builds?

There is a lot of new stuff to learn, ex: the GiGi library seems to be way out of date but from what I gathered (and compiled) you use your own modified version? so what's the best way to get fresh documentation?

on which branch are you working and how do you manage branches (locally and remotely)?

I didn't look much into the code yet, so one more quick question:
Is openGL and SDL used a lot (directly) in project?

I hope questions are not dumb, I like 4x games from time immemorial but I'm very new to games development :|, so if you have any recommendations from your own experience that would be great too.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Contribution?

#2 Post by Geoff the Medio »

codekiddy wrote:What configuration you use to compile FO?
Could you be more specific? You've found the MSVC projects, so what else do you want to know that isn't indicated in them?
[Is there] a specific reason of using release 32 bit builds? and are there any known problems with x64 platforms/builds?
I don't think anyone's tried on Windows to make 64-bit builds. Possibly some of the dependencies have or have had issues with 64 bit building. It's not been an issue, as the game doesn't generally run into any limits with 32 bit builds, such as 4 GB RAM for a process, that I'm aware of.
[Gigi stuff]
Ignore the sourceforge GiGi project. FreeOrion is built using the fork of GiGi in the FreeOrion repository. There is no extra documentation about it, but the headers are reasonably well documented.
Is openGL and SDL used a lot (directly) in project?
For all the rendering, OpenGL calls are used. SDL calls are mostly contained within the GiGiSDL library.

User avatar
codekiddy
Space Floater
Posts: 41
Joined: Wed Nov 12, 2014 10:58 am

Re: Contribution?

#3 Post by codekiddy »

Geoff the Medio wrote:
codekiddy wrote:What configuration you use to compile FO?
Could you be more specific?
Geoff the Medio wrote:I don't think anyone's tried on Windows to make 64-bit builds.
Hi Geoff, actually you answered all my questions, I was asking about VS build configuration but I see now...
it looks like I'm first one who tried to build in x64 bit debug mode because compiler has some issues compiling templates from "Parsers" project:

Code: Select all

fatal error C1060: compiler is out of heap space
fatal error C1001: An internal error has occurred in the compiler.
I'm sure release configuration should compile just fine.

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Contribution?

#4 Post by Geoff the Medio »

codekiddy wrote:it looks like I'm first one who tried to build in x64 bit debug mode because compiler has some issues compiling templates from "Parsers" project:

Code: Select all

fatal error C1060: compiler is out of heap space
fatal error C1001: An internal error has occurred in the compiler.
I'm sure release configuration should compile just fine.
The problem there is that you're using the default debug configuration, not that you're using 64-bit mode. The same heap space problem occurs in 32-bit debug mode with the template code in the parsers project if you leave the configuration set so the C++/General/Debug Information Format is not empty.

I think the larger issue is that to link all the FreeOrion projects, you'll need to have all the dependencies built in 64 bit mode first.

User avatar
codekiddy
Space Floater
Posts: 41
Joined: Wed Nov 12, 2014 10:58 am

Re: Contribution?

#5 Post by codekiddy »

Geoff the Medio wrote:The same heap space problem occurs in 32-bit debug mode with the template code in the parsers project if you leave the configuration set so the C++/General/Debug Information Format is not empty.
Yes, you're correct, I compiled parsers without debugging info and now everything works.
from what I gathered parsers code is not modified too often, so having no debug info should probably be fine for now, however I found this MSDN blog with few tips to reduce PDB files, so I'll try this out too! and see how that goes... if it won't work then probably adding /PDBSTRIPPED to linker should also help
Geoff the Medio wrote: I think the larger issue is that to link all the FreeOrion projects, you'll need to have all the dependencies built in 64 bit mode first.
I had problems making latest SDL work and link issues with boost, but that's solved now.

Geoff I have another question however, do you think making a precompiler header and using /FI (force include) in project settings, should cause any troubles (ex: existing macro re/definitions) ?
For example I'm considering to make a precompiled header for dependent libs (boost, SDL, and possibly FO too) and then force include pch into each source file to reduce compile time.

Thanks a lot!

edit:
Oh, one more thing, I have my own directory in local repo containing build settings and project files, so I want to add this directory to gitignore, or is there any better idea about this?

User avatar
Vezzra
Release Manager, Design
Posts: 6095
Joined: Wed Nov 16, 2011 12:56 pm
Location: Sol III

Re: Contribution?

#6 Post by Vezzra »

codekiddy wrote:I have my own directory in local repo containing build settings and project files, so I want to add this directory to gitignore, or is there any better idea about this?
AFAIK you can specify a global ignore list for your local git installation, I think that would be the best place to define ignores specific only to your dev environment.

The git documentation should have the info on that feature somewhere, you'll probably have to dig through it...

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: Contribution?

#7 Post by Geoff the Medio »

codekiddy wrote:...do you think making a precompiler header and using /FI (force include) in project settings, should cause any troubles (ex: existing macro re/definitions) ?
I don't know; I've never used precompiled headers or looked much into issues involving them.

User avatar
codekiddy
Space Floater
Posts: 41
Joined: Wed Nov 12, 2014 10:58 am

Re: Contribution?

#8 Post by codekiddy »

Vezzra wrote:AFAIK you can specify a global ignore list for your local git installation

The git documentation should have the info on that feature somewhere, you'll probably have to dig through it...
Thanks, adding exclude folder to .git\info\exclude did the trick :D
Geoff the Medio wrote:I don't know; I've never used precompiled headers or looked much into issues involving them.
Oh, OK then. anyway, I /FI'd pch and it seems to be OK for now :D

Thank a lot for info guys, now that build is done, it's time to study code...

User avatar
MatGB
Creative Contributor
Posts: 3310
Joined: Fri Jun 28, 2013 11:45 pm

Re: Contribution?

#9 Post by MatGB »

codekiddy wrote: Oh, OK then. anyway, I /FI'd pch and it seems to be OK for now :D

Thank a lot for info guys, now that build is done, it's time to study code...
*cough*
Write up how you did it so we can store it somewhere for future reference ;-)

(also, welcome, are you hoping to do backend C++/Python work or frontend scripting?)
Mat Bowles

Any code or patches in anything posted here is released under the CC and GPL licences in use for the FO project.

User avatar
codekiddy
Space Floater
Posts: 41
Joined: Wed Nov 12, 2014 10:58 am

Re: Contribution?

#10 Post by codekiddy »

MatGB wrote:(also, welcome, are you hoping to do backend C++/Python work or frontend scripting?)
Hi Mat, thanks, yes I'm *hoping* to do C++ work (don't know python), but for now I just need some time learning since there is stuff which is completely new to me.
MatGB wrote:Write up how you did it so we can store it somewhere for future reference ;-)
Sure why not, Are you asking about precompiled headers or custom SDK build? anyway here is what works for me:

Making compile run clean and fast is supposed to be hard but It was not in my case because I'm saving build configurations and project files for every library I built into separate GitHub repo for future usage, to avoid doing set up again every time and make it easy to rebuild all for new releases of Visual Studio.

You can look for project files here
I even made a wiki so that other people can make use of my build.
This stuff will work however for latest Visual Studio/Windows only, unless there is someone willing to put effort for GCC configurations.

As for precompiled headers here is an PCH example: LINK
From my experience so far, build/recompile FO now takes much less time.
Not only that, but Intellisense is much faster too since most symbols are now stored into pch/ipch.
In addition there are some pragmas included into pch too to make it possible to for compiler to show warnings for your code only.

It's possible to reduce compile time even more by sharing one pch between projects but it's not officially supported and doesn't work in all cases. for now this means having 5 different headers (one for each project).

Mat I don't know what else to say, if anyone wants to make use of my build, go ahead and grab my projects. :D

Post Reply