Official Soldat Forums

Misc => The Lounge => Topic started by: ~Niko~ on July 28, 2009, 07:59:30 pm

Title: What programming language should I learn?
Post by: ~Niko~ on July 28, 2009, 07:59:30 pm
I want to learn a programming language, especially designed to make games. I'm making games with Gamemaker, but well, that sucks.

What one should I take?
Title: Re: What programming language should I learn?
Post by: jrgp on July 28, 2009, 08:00:59 pm
Try C++ with SDL/OpenGL. That let's you make cross platform games. Or maybe Java. Or something easy  for small games like Python or Ruby.
Title: Re: What programming language should I learn?
Post by: iDante on July 28, 2009, 11:56:44 pm
Learning to program so you can make games usually turns sour, but whatever.

I always suggest java as a starting language, and it's gaming capabilities are underrated.
Most languages use similar techniques to do stuff, so learning Java then deciding to do C++ isn't bad and doesn't take too long.
Title: Re: What programming language should I learn?
Post by: VijchtiDoodah on July 29, 2009, 12:07:46 am
Try C++ with SDL/OpenGL.

C++ is a multipurpose language; it is not dedicated to gaming.

Niko, you could start with C++, but it's a complicated language and you'll be spending a long time learning. And if learning C++ wasn't enough, you'll also have to spend time learning how to use the APIs (such as SDL or OpenGL, as jrgp mentioned, or Allegro) that allow your game to function effectively.

There are two widely used game programming languages that come to mind: DarkBASIC (http://darkbasic.thegamecreators.com/) and Blitz BASIC (http://www.blitzbasic.com/Products/_index_.php). I've never used either, but I've heard that they're easy to learn and coding is fast. The trade-off is that you don't have to spend nearly as much time learning the language or coding in it, especially since there are no new APIs to learn to use (you can use them if you want, though), but you're limited with what you can do and the platforms your game may run on. On the other hand, the compilers for both languages cost money to use (I think) whereas there are many free compilers for C++ (which is still the best language to program games in, it just wasn't made for beginners).
Title: Re: What programming language should I learn?
Post by: MyiEye on July 29, 2009, 12:27:41 am
I think Java was a pretty good starting point for me...although I did struggle to push through...but everything clicks eventually
Title: Re: What programming language should I learn?
Post by: Wraithlike on July 29, 2009, 06:51:44 am
Fortran (http://en.wikipedia.org/wiki/Fortran). Programming with punchcards is how the cool kids do it.
Title: Re: What programming language should I learn?
Post by: 8th_account on July 29, 2009, 08:18:58 am
Python 2.6 with pygame (and/or pyOpenGL) is very easy to work with. C++ like jrgp said is also doable, considering the overwhelming amount of tutorials and codes, such as the NeHe lessons.
Title: Re: What programming language should I learn?
Post by: MetsuriTossavainen on July 29, 2009, 10:01:42 am
C++ or Java.
Title: Re: What programming language should I learn?
Post by: Mangled* on July 29, 2009, 10:28:04 am
C++
Title: Re: What programming language should I learn?
Post by: ds dude on July 29, 2009, 09:46:15 pm
Get into Java and we can be Java buddies.
Title: Re: What programming language should I learn?
Post by: iDante on July 30, 2009, 02:17:38 am
Get into Java and we can be Java buddies.
Make it a threesome!

But yes, do Java, it is awesome.
Title: Re: What programming language should I learn?
Post by: a-4-year-old on July 30, 2009, 09:00:56 am
You're going to learn more than one eventually. Start easy.
Title: Re: What programming language should I learn?
Post by: ~Niko~ on July 30, 2009, 01:56:51 pm
Yes, plus I want to study programming, so yeah, I should learn a few programming languages...
Title: Re: What programming language should I learn?
Post by: Furai on July 30, 2009, 03:43:50 pm
Asembler. :D haha ;]
Title: Re: What programming language should I learn?
Post by: jrgp on July 30, 2009, 03:53:36 pm
Asembler. :D haha ;]
@Niko: Useless unless you're programming for embedded devices, or in some other rare special cases.
Title: Re: What programming language should I learn?
Post by: ~Niko~ on July 30, 2009, 04:03:48 pm
I want something easy. Pascal looks easy, per example, but I'll hardly ever use it, so it's a waste of time to keep learning it, I guess. I want some programming language that's gonna hold on for a few years so if I learn it, it'd be worth its waste.
Title: Re: What programming language should I learn?
Post by: VinceBros on July 30, 2009, 04:13:34 pm
* Worth its waste *
Well learn Spanish ? D:

No seriously... You can try with Java or C++. If you're not interested in making games and if you want to get used to scripts and understand how they work, just learn a bit of Visual Basic ( Really easy, and you can find alot of great tutorials on internet. Eg.: I just made a Calculator with it )
Title: Re: What programming language should I learn?
Post by: Snow on July 30, 2009, 05:23:20 pm
I'm learning Python at the moment. I can make a game, create an executable file and presto a game running in windows. It's also cross platform and not too difficult to port into other languages or onto other platforms such as mobile. I love it. Python will also have a long life span. I too scoured the interwebz to find out what was the best language to learn on. Many expert and long time game programmers suggested that Python may be the best to start learning. From that point on you can advance to higher languages like C++. If you want to start making games, you have to start small anyways - like very small. Get a sprite moving in a window. Get the sprite to collide with something. Etc, etc.

With programming, you have a lot of things to learn, such as to begin with, proper syntax, how a function works, starting and ending functions, classes, arrays... then on to code efficiency, how to make complex functions no longer than so many lines, being able to find (potential) memory leaks, keeping your code clean and highlighted for bugtesting purposes (optional).

My biggest disappointment was finally realizing that learning to program and being able to do it properly can take years. I just want to design a game dammit. I also learned though that you can cut down the time required, since if you only want to make games... you don't need to know say everything that is possible with C++. In fact in some languages you use a certain fraction. There are seasoned C++ programmers who still learn something new. However, even though you can cut down some of the time, that doesn't mean you can take the lazy way of learning a language and poof make a game. This is where a simple language and very small projects come in play and over time deliver much awesomeness. By starting out small in say Python, not only do you create simple things, but you can learn how to make individual components of games.

Best of all, and this gets it's own new paragraph - due to the limitations of small - sometimes the best and most funnest concepts come from the most minimal. One of the creaters of N and N+ told me once that rather than being in a room filled with all kinds of goodies and distractions and then designing a game based on what you see around you, it's funner and much more amazing to make something in an empty room with just a pencil and a piece of paper. So as you learn and start with very small and ultra simple projects - you can stretch that simplicity and minimalism to it's max and see what you can make out of those limitations. Later on when you are a good programmer, you'll have all kinds of cool design skills at your disposal as well.

Happy programming and learning to program.
Title: Re: What programming language should I learn?
Post by: Furai on July 30, 2009, 05:54:06 pm
How about flash actionscript?
Title: Re: What programming language should I learn?
Post by: ~Niko~ on July 30, 2009, 07:58:16 pm
No seriously... You can try with Java or C++. If you're not interested in making games and if you want to get used to scripts and understand how they work, just learn a bit of Visual Basic ( Really easy, and you can find alot of great tutorials on internet. Eg.: I just made a Calculator with it )
I took a look at that and I could do a few stuff, but never got really inside of vb anyways.

I bet I'll take Java...
Title: Re: What programming language should I learn?
Post by: 8th_account on July 31, 2009, 03:26:20 pm
Asembler. :D haha ;]
@Niko: Useless unless you're programming for embedded devices, or in some other rare special cases.

I've found Assembler surprisingly useful to know, especially when working in C/C++. It teaches you how to squeeze some extra performance out of your code, mainly by writing code that can be better compiled, and to always be friendly with the CPU registry and cache. Also nifty to know what operations are calculated in one instruction, and how many processor ticks are wasted when reading from memory.

How about flash actionscript?

Flash will probably start fading out in 5 years or so as HTML5 becomes more widely adopted. So it's not a great investment.