Question:
Python or Java For New Game Developers?
Dengaku
2011-08-26 20:48:46 UTC
I am a 14 year boy and I am completely new to programming. Which program should I use?
First of all, I'm mostly interested in developing games so I want the one best at that. Which one has the most flexibility? Which one is easiest and fastest to learn?

I'm a VERY logical thinker so difficulty shouldn't be a factor, though I want to know which one is best for beginner.

I am REALLY interested in computer science and I want to learn programming and game development really really badly. Please help.
Five answers:
McFate
2011-08-26 21:33:43 UTC
If you want to do game development, C++ would probably be your best option.



Assuming that's not realistic (it's a pretty tough language to tackle first), a language with C-like syntax (Java, C, or C#) would be a step in the right direction.
green meklar
2011-08-27 05:23:25 UTC
Java is better than Python. Not only is it more useful by itself, it also has a C-style syntax which sets you up better to learn a number of other useful languages (C, C++, Actionscript, etc). It's harder to learn than Python, but the advantages are worth it (and because of the different syntaces, you'd have to learn almost all the same stuff when moving from Python anyway).



You can create games in Java, but it's not really a terribly good language for game programming- although neither is Python. For application games, C++ is the usual language to use; however, it's considerably harder to learn than Java, so I don't recommend it for beginners (trust me, Java will frustrate you quite enough as it is). You can also use Actionscript for Flash games, it's more forgiving than C++ and is specifically designed for creating 2D animations and games, but it doesn't have C++'s speed and power. That said, what's important at first is to get an understanding of program logic, no one dives straight into graphics and all that stuff immediately. Java is a pretty good language for learning the basics, and the concepts translate very well to C++, Actionscript and so on.
Terry
2011-08-27 04:59:24 UTC
C++ is the best and most flexible and will teach you the most - difficulty hard

Java and C# are well rounded and does a lot of work for you - difficulty easy



Python is a horrible choice for starting out, but is great once you understand programming a lot more. It is the easiest to use but is bad for learning good programming concepts.



Also keep in mind C# is a Microsoft language, meaning you can't play games created in this language on a Mac unless the Mac has a Windows emulator.



If I were you I would learn the most difficult first because it will allow you to pick up easier languages without a problem.



Learn C++ then Java. That will make your life much easier.
Donald Trump for President 2020
2011-08-27 04:41:44 UTC
You have to be specific about what type of Games.



Some games can be programmed with Python. Some with Java. Some need C/C++. Some can be done with C#.



Then you need to consider what operating system? A game console or a PC?



Learn straight up C and you can program in any language after that.



Once you understand that, move on to an object oriented language.



Then you have your work cut out for you figuring out how to use language and graphics libraries which have nothing to do much with the language you are using.
Jeremy W
2011-08-30 03:23:21 UTC
People are always suggesting C++ for game development, which I personally think is fairly ignorant. Be practical. I've written several game engines, all of which were in Java, C# and C++.



Working with C++ you're going to run into a lot of bugs you wouldn't know how to handle without an extensive understanding of computers ( I mean of the hardware, and not just the language syntax.) I enjoy working with C++ but you likely will be implementing a lot of other libraries, I.e you'll want to learn BOOST which introduces some very useful frameworks but also some essentials that come with a lot of other languages. I bet though that learning that along with game development will be some challenge. Further, take into consideration that you will not need all the flexibility offered by C++.



Further, most game development tutorials for C++ use complex graphics interfaces like DirectX, and you wont want to be dealing with that, especially with your first engine. The math can also prove quite a challenge, especially if you haven't touched more advanced geometry. You want to be working more in 2D (You can do this with DirectX, but DirectX is a totally overblown graphics interface for simple 2D game engines.) If you do 2D with C++, you'd go with GDI or GDI+ for starters, which IMHO is kind of an ugly interface when compared to that presented by Managed languages like .Net or Java.



For non-commercial hobbyist engines, usually C# or Java are more particle(and for commercial projects they usually are as well.). When you get more advanced, and manage to get into a team of programmers, you can look into C++; but for starters, beware. Also, a framework offered to the .Net languages, XNA, is an awesome graphics framework I've worked with for some time before; it gives you the opportunity to work at low-levels such as directly interfacing with the graphics device but also provides numerous high-level modules to work with.



If you think you can jump straight into game development with no programming experience though you're probably not going to be very successful. Game development these days require one of the most important programming concepts to be well understood, and that is Object-Orientated-Programming. Further, you need to understand some basic programming patterns and learn what your language is capable of doing. Even as a "logical thinker" you have A LOT to learn before you can write some of the more complex applications out there.



All in all, if I were you I would start with using a game engine in a managed language like C#.



Also, since your new, I'll tell you this; some of the more ignorant programmers will bash managed languages like C# and Java, but in reality these languages aren't much slower in regards to performance. Just-In-Time compilation makes the code very fast to compile, and execute and further provides a safe executing environment for the program to run. Also, because these languages are compiled with a lot of meta-data, you can use what is called "Reflection" to make more generic modules.



Though, when choosing a programming language for your project you have to consider that managed languages will usually slower and sometimes that small performance gain or loss can be significant. Managed languages for example must run the garbage collector in the background thread; where as objects in unmanaged C++ are deallocated by the programmer or by the compiler(if they're on the stack and leave their scope.)



In summary, start with a managed language, and don't start writing a game, they are much more complex then they might seem to write. Maybe after a while you can give it a try.



Also, C++ will not "teach you the most"; maybe about the hardware, but not about programming. A lot of the time I have to "hack in" OO designs in to C++; so start with managed languages like Java, which allows you to learn a lot about OOP.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...