Questa discussione è stata chiusa
What languages Should I learn C, C++, C#, Java, or Python.
I've been wanting to create a game for quite a while now, and I was wondering wht kind of code I need to learn in order to make a game, right now I'm learning basic stuff like XHTML and CSS, but I want to be able to make games and other stuff, I hopefully plan to learn all of these, but I need to know which ones will jump start me into my project.
< >
Visualizzazione di 1-15 commenti su 44
For an easy start, go with Java.
For more powerful games, mods, etc. go with C++.
C and C# are rarely used now.
Python, not sure what that's used for.
The C, C# and C++ are most like CSS.
Taking this into account, i'd recommend C++.
If I were you and just getting started, I'd learn C#. It's a great language, you can get VIsual Studio Express for free from Microsoft to use as compiler and IDE, and there are toolsets like XNA available for games.

Other than that I'd say C++, which is fast, but has a tendency to get low-level and messy. It's not a great language to dive into as a beginner, especially for making games.

Honestly though, there are pluses and minuses to all of those languages, and partly I'm only recommending those two because they're what I know.

Bear in mind that neither of HTML or CSS are programming languages, so don't expect any of the skills to transfer over.
So could you recommend anything that I should learn before c++ that could help me understand it more
Ultima modifica da The Michael; 15 gen 2013, ore 18:39
Messaggio originale di Thunderhund:
C and C# are rarely used now.
Er, what? That's not even a little bit true.
Python, not sure what that's used for.
It's pretty big in the bioinformatics community, and general data wrangling. The first version of Bittorrent was written in it. They're teaching it to the first year Physics undergrads at my university.
The C, C# and C++ are most like CSS.
None of them are anything like CSS. Unless C-like means "has curly braces and semicolons". Which Java does too, FYI.
Python is a great beginner language to learn the basics of procedural and structured programming without getting bogged down in forced complicated abstraction paradigms like OOP the way you would with Java or C#. To print "hello world" to the screen in python you do just what i said "print "hello world" To do it in Java you have to declare an un instantiated class and declare a static method to be executed in that class. If that doesn't make any sense to you, then learning Java first shouldn't make any sense. IMO. You will be juggling object code while just working with procedures, you wont really understand any of the scoping rules, and you're just obfuscating your learning process needlessly.
Messaggio originale di MikeJ:
Python is a great beginner language to learn the basics of procedural and structured programming without getting bogged down in forced complicated abstraction paradigms like OOP the way you would with Java or C#. To print "hello world" to the screen in python you do just what i said "print "hello world" To do it in Java you have to declare an un instantiated class and declare a static method to be executed in that class. If that doesn't make any sense to you, then learning Java first shouldn't make any sense. IMO. You will be juggling object code while just working with procedures, you wont really understand any of the scoping rules, and you're just obfuscating your learning process needlessly.
If you aren't doing OOP, then you're not a real programmer. Best to learn OOP as you learn to program.
Messaggio originale di 2Real:
If you aren't doing OOP, then you're not a real programmer. Best to learn OOP as you learn to program.

you gotta crawl before you can walk dawg. besides, OOP is depcrated. The future is functional programming!*

*says this every 10 years eternally
Ultima modifica da MikeJ; 15 gen 2013, ore 21:55
If you want to be serious about writing games, especially fps games, C++ is essential. I would not even consider anything else.
Eve online is written in python. As is Civ4...

en.m.wikipedia.org/wiki/List_of_Python_software
Ultima modifica da Evo; 16 gen 2013, ore 1:09
Messaggio originale di 2Real:
If you aren't doing OOP, then you're not a real programmer. Best to learn OOP as you learn to program.

This is nonsense. I won't rob you off the opportunity to become a better programmer by explaining this. Go and figure it out, and you'll have improved as a coder when you work out the answer for yourself.

As for the question, I think Python is the best choice to learn programming today (Ruby's nice too, but Python has more material for beginners and the community is larger). It's not so much about the language you learn, but about concepts and the fundamentals. Once you "get" the basics, you can pick up other languages with relative ease (this isn't so different from human languages, actually -- once you have learned two, the third and fourth are far less challenging).

Python also has PyGame, if you want to learn by writing a game. Having a specific project in mind makes it more fun (and also easier) to learn, though you should first work through a beginner book. I'd recommend the Python book from the "Head First" series by O'Reilly. It is really good and not as dry as most text books on programming.

Once you are decent with Python (understand the basics, etc.), I'd look into C. Not C++ yet, just plain C. Then C++, if you actually feel you need anything other than Python. C# is Windows-centric (Mono aside), and Java is ... well, I guess they teach that at universities these days. I'm not a fan. I actually quite like PureBasic for very quick results, but it isn't free and people tend to wrinkle their nose at anything that's Basic. I grew up with Basic dialects in the 1980s, before peeking into C, so perhaps that explains my fondness of the language family.

If you want a well-rounded programming background, you can toy some with Smalltalk and Haskell, but save that for later. ;)
Pick one. Learn it. Then look at the others and see if you think they are better.

Every single person who learns coding has a preference for one or the other (or else there would only be "one true language"), based on what they learned first, how their brain works, or what they have been told is best for the job (and, sometimes, just because they like a particular language more).

The trick with learning programming is to NOT FUSS OVER DETAILS, until you get to the point that you know WHY those details matter. Don't fuss over which compiler, which language, which version of the language (C99? C++0x?), or any other details until you're in a position to judge for yourself.

Learning to program is a strange thing - like learning another language so you can talk to computers. Imagine wanting to learn a real-life language. You could learn Chinese and talk to the most people on the planet (more Chinese-speakers than any other). Or you could learn English and talk to the most countries on the planet. Or you could learn French because it's close to your native language. Or you could learn German because it has a grammar that you understand easily and find it DIFFERENT to your native language. There is no one right answer in ANY of these things, it all depends on YOU.

And you won't find out until you learn one and see how it differs from the others for yourself.

P.S. I'm a games programmer, programming on everything from the GP2X (a Linux handheld console once popular in Korean schools) up to Windows 8, since DOS assembler and through to .NET languages on modern desktops, and Java on Android. My preference is to program in C - specifically C99 - despite being able to program in a myriad of languages since I was about 8 (I taught my own teachers PASCAL and FORTRAN, after they tried to teach me BASIC that I already knew, and was tinkering with C and x86 assembly back before Windows even existed as a mainstream platform).

To suggest a language like C is dead is to parrot-repeat things you've heard ("goto is bad, you know!") without actually looking into things yourself. C++ incorporates all of the C standard. So C++ is "learning C and some more on top". (And the Linux kernel contains other 100,000 instances of "goto label" in some fashion). And today I can still easily get a modern C compiler, to compile against modern Windows API (which still use C calling conventions!), and every library you point at (DirectX, OpenGL, etc.) I can interact with it in C (and almost all libraries use C just because it's easier to integrate with a binary library using C conventions than it is anything else) without any hassle. In fact, I'm writing a game now, in C99, that has everything from network communication, to SDL and OpenGL graphics options, to controller input, to online activation, to you-name-it, and it's all in C and interfaces with libraries through C.

So please, don't become ignorant like some parrot-fashion people - just find what you can, get it set up so you can work with it (I like Eclipse and MinGW but the setup is tricky and you might find an all-in-one compiler/linker/IDE for your language is easier to start you off), and start programming on it. If you get to the point where you try another language, I'll be amazed (honestly, programming isn't "fun" for the first few years unless you're very dedicated). And at THAT point, you're in a position to judge what's best for you.
C++ actually isn't a proper superset of C. For instance, C++ doesn't have the restrict keyword, for some baffling reason (C++ programmers want to write fast code too!) despite the fact it's supported by most compilers as an extension anyway. I also wouldn't say that learning C++ is like learning C with extra bits because if you learn C++ you tend to do things in an idiomatically C++ way (e.g. using cout rather than printf() for instance) Oh well. Pointless academic detail.
You will never get a solid answer. Programmers that already found their way will tell you to go their path while saying path Z is wrong or stupid. Programmers in general are very picky and opinionated. "I think Java is sh*t!" "C++ sucks compared to C!" "WTF C# it's a dieing breed!" "Python is for kiddies!" "Lua?!? WTF is Lua!" They will go on and on but at the end of the day it doesn't matter wtf the game is programmed with if it functions and plays well.

I personally started my dip with Pascal so long ago. You need to learn how to procedurally write code to understand programming before diving into Object Oriented Programming (OOP), anyone who says otherwise is full of sh*t. You can't design objects if you don't know how code works in the first place. There is tons of free old programming programs to just screw around with and learn the basics of programming. Once you learn the basics and do a few projects procedurally you can jump into OOP. If you want a solid game you need to learn OOP not only for saving time but for stability, if you write the same code over and over in different places when you change one piece you need to change all of them. In OOP you only need to change the class function/method, one change used in many places, the absolute benefit of OOP.

Really what it comes down to is try different programming languages until you find the one that fits you, there is no right or wrong. In the industry C/C++ is the standard, but there is many branches of Java and Python programmers. Check out XNA if you are interested in programming for xbox live. Flash and ActionScript is becoming obsolete with HTML5 but it is also another choice to go with althought not a free one but it will help you understand more than just programming as it will teach you how to animate and program animations.

In the end find what works for you then stick with it.
Ultima modifica da ManiacMal; 16 gen 2013, ore 7:47
I have heard that python is easy to learn just like visual basic easy
If you are interested in creating games then look at DarkBASIC. BASIC is great language for a beginner and they have some great books and tutorials to help you get started.
< >
Visualizzazione di 1-15 commenti su 44
Per pagina: 1530 50

Data di pubblicazione: 15 gen 2013, ore 18:12
Messaggi: 44