Programing

General discussion about the game.
cooltrain7
Posts: 1
Joined: Tue Sep 18, 2012 4:41 pm

Programing

Postby cooltrain7 » Tue Sep 18, 2012 4:44 pm

Ive been wanting to make space games like this for ages and im just learing new stuff everyday so i was just wanting to ask was this done in java, C, C#,flash ?
chris_p
Posts: 1
Joined: Tue Sep 18, 2012 5:34 pm

Re: Programing

Postby chris_p » Tue Sep 18, 2012 5:43 pm

It doesn't matter. FTL could've been programmed in any of those languages, but that doesn't mean it was the only or even the best choice. Minecraft was written in Java. Notch said he chose Java because he felt most comfortable writing in it, that doesn't mean you can't write a similar game in C++/C# or even javascript (using HTML5's webGL).

Sure, each language has its advantages and is better suited for certain applications, but don't worry about that yet, just learn programming. Learning new programming languages is surprisingly easy if you know one language well.
Last edited by chris_p on Tue Sep 18, 2012 7:38 pm, edited 1 time in total.
Ancurio
Posts: 1
Joined: Tue Sep 18, 2012 6:08 pm

Re: Programing

Postby Ancurio » Tue Sep 18, 2012 6:24 pm

Just to be complete: The game was done in C++ (judging from the fact that libstdc++ is shipped with it).
It might use some internal scripting language as well, but I'm not sure.

In general I would agree with chris_p. However, there are some small caveats to every language,
like Java and C# being interpreted bytecode, and C# sometimes troublesome for cross-compatibility.
I'm just a high school graduate though (no formal education or practical knowledge),
so take this with a grain of salt.

C++ is favored by game devs because it has many good things from both worlds: fast, native compiled
code + easy access to C libraries, and a (at times somewhat complex) system for modern object-oriented programming.
Also it is very well supported on all major platforms. FTL uses many open source C/C++ libraries,
which certainly made easier to support three platforms.

But, as chris said, if you're just starting out, don't bother being selective about languages yet.
Once you become proficient enough that you could take on a real project, you should have
enough knowledge to choose the right tools and languages anyway,
and learning them will probably be your smallest hurdle.
I literally learned Lua in a couple days, just to use Löve2D (btw. you should check it out, it's awesome!!).
Minky
Posts: 3
Joined: Thu Sep 20, 2012 4:56 pm

Re: Programing

Postby Minky » Thu Sep 20, 2012 5:46 pm

I would like to add that because it uses a C++ library does not mean it was made in C++. If you take something like Unity3D you can use C# to "script" but I am fairly certain they compile to native code. You also see a lot of scripting languages and other game engines that will use SDL which is a C, which I link Love2D uses. With that being said I have no idea what it's written in, but I felt the need to point that out.

As for C++ being the favoured language, I mainly think that's the case due to the number of libraries that exist for C/C++. You will find that there are many commercial engines that were written and still being developed in C++. Other languages are starting to catch up though, even Java is getting close to be comparable in terms of speed/efficiency of C++ without the need to worry about the memory management and pointers; but you do pay the price with the JIT's. You really can use any language, and you should pick the language that you know best.
swixel
Posts: 80
Joined: Mon Sep 17, 2012 6:08 am

Re: Programing

Postby swixel » Thu Sep 20, 2012 6:12 pm

Minky wrote:I would like to add that because it uses a C++ library does not mean it was made in C++. If you take something like Unity3D you can use C# to "script" but I am fairly certain they compile to native code. You also see a lot of scripting languages and other game engines that will use SDL which is a C, which I link Love2D uses. With that being said I have no idea what it's written in, but I felt the need to point that out.


It's in C++ ... I already posted this in another thread. Aside from certain compiler styles and signatures, it uses classes. Why would it ship libc++ as a dynamic if it weren't at least partially written in C++? o.O

Anyway, if you were just starting out you'd probably want to look at C#, Java, or something similar, which is a little less of a nightmare (managed code is seriously nice).
Minky
Posts: 3
Joined: Thu Sep 20, 2012 4:56 pm

Re: Programing

Postby Minky » Thu Sep 20, 2012 6:50 pm

Well I was just making the statement that an engine could use it, while the programming they did may have been in a different language (that the engine uses).
ice
Posts: 99
Joined: Tue Sep 11, 2012 7:22 pm
Location: Schweden
Contact:

Re: Programing

Postby ice » Thu Sep 20, 2012 7:08 pm

Yeah, most likely they made the game code itself, and then built up the game structure from there, with all ships and weapons and events and whatnot.
I always have this great idea to post about when reading a thread, but I always seem to loose the subject while writing a reply, and end up not saying anything at all. I should sleep more. Is that a cookie?

Who is online

Users browsing this forum: No registered users and 33 guests