Coding Langauge

Post all other topics which do not belong to any other category.
Pinkishu
Inserter
Inserter
Posts: 42
Joined: Tue Feb 26, 2013 12:09 am
Contact:

Coding Langauge

Post by Pinkishu »

Hey there,

was just wondering what language factorio is being coded in and what engine you use (or is that a selfmade one?)~

edit: so one of the .lua files mentions a C++ backend so i'll go and assume C++ for now ^^
User avatar
Kadaban
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Sun Feb 24, 2013 9:30 pm
Contact:

Re: Coding Langauge

Post by Kadaban »

The indiegogo campaign states "The game is written in C++..."
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Coding Langauge

Post by kovarex »

C++, we have our own engine, we just use:
  • Allegro library for graphics and input manipulations
  • Agui (gui library platform independent with allegro backend)
  • Boost for C++ and platform dependent stuff.
The agui was very risky step, as the library was used by only the creator at that time, and we had to solve lot of bugs in that library, but I feel that it has the exact ratio of configurability, simplicity and extendability we need.

When I was starting the developement a year ago, one of my ex co-workers that is also making computer games gave me some advices.
One of these advices was to never do my own engine and use existing one instead, or I will actually do the engine most of the time, not the game.
I did some small research, and I had this feeling, that none engine could actually meet my requirements, I was also afraid, that I will work half a year in an engine and find out it is not powerful enough in some way and I would have very complicated situation.
So I made my engine anyway.
Hard to tell if it was good choice, but now I have something I understand back and forth. I have something I know exactly how to tune and optimise, something that has been written with multiplayer/modding support and multithreading plans in mind and there are not going to be any "nasty surprises".
Hanse00
Fast Inserter
Fast Inserter
Posts: 101
Joined: Mon Feb 25, 2013 6:07 pm
Contact:

Re: Coding Langauge

Post by Hanse00 »

I can see where your coworker got the idea to not do it yourself, it's a lot of work I imagine.
But at the same time I share your though that it's a great advantage to have everything (or as much possible), made by yourself, that way you can optimize everything for your needs, and you know every functionality it has.
Algent
Burner Inserter
Burner Inserter
Posts: 11
Joined: Sun Feb 24, 2013 1:36 pm
Contact:

Re: Coding Langauge

Post by Algent »

While I also figured it was C++ I wonder more about what libs they are using.
Also how do they handle cross-platform ?
And how did they end-up with json files, it's the first time I see this outside a web related project.


By the way I'm very curious about why with amazing things like MonoGame(XNA open source implementation and cross-platform even for mobiles) around that are supposed to help a lot game developers the Factorio Team choose a more classical approach :mrgreen: .

EDIT: It seem like you actually answered almost all of my questions while I was writing them. :lol: So you even went as far as making your engine huh, hardcore mode :mrgreen: .
kovarex
Factorio Staff
Factorio Staff
Posts: 8207
Joined: Wed Feb 06, 2013 12:00 am
Contact:

Re: Coding Langauge

Post by kovarex »

Algent wrote:Also how do they handle cross-platform ?
Those libraries are multiplatform, so all we have to do is some small differences concerning directory structure.
Apart that, we need to have build system different for win/osx/linux (although linux and osx share the same Makefile)
Algent wrote: And how did they end-up with json files, it's the first time I see this outside a web related project.
We knew we need some user readable and open data format, and xml is too heavy, so we ended up with json.
Post Reply

Return to “General discussion”