Progamming for beginners
#1 Members - Reputation: 109
Posted 07 October 2012 - 12:48 AM
First let me say I have ZERO programming experience. However, I love playing video games. I am not good at math but enjoy the challenge. I like the order and definitve set of rules that programing seems to have. I will learn C++ but that is not what I want to start with. I was looking for a language that would go well with C++, but is easy to learn and works well with it. After I pick the langugae and learn then I will worry about 2D vs 3D games and the engines for it... On to the questions..!
1. What would be a good language that fits the above critirea?
2. Which would be easier for beginners 2d or 3d games?
3. Is it wise to go the "easy route" first?
4. Im attracted to python because I like snakes, weird I know... Would this be a good choice, why (or) why not?
#2 Staff - Reputation: 8926
Posted 07 October 2012 - 01:42 AM
Python would be an excellent choice. It is generally considered to be easier to learn than C++, but is a very capable and expressive language that sees a extensive professional use both in and out of games development. It can also be extended with C or C++ (for performance reasons or to gain access to an existing library) relatively easily, or can be embedded in a C++ program as a scripting language. There are plenty of resources for learning the language and a selection of libraries for games development. Python has been used in Eve Online and Civilization 4 amongst others.1. What would be a good language that fits the above critirea?
You might also consider Lua, which is also a popular and performant scripting language in the games industry but can also be used stand-alone to create games. You could use LOVE to create 2d games in Lua. The advantages are very similar to those offered by Python.
C# is also a popular choice.
In depends on your selection of language, libraries and engines. A beginner using Unity might find 3d more approachable than 2d thanks to the functionality provided. Generally however, 2d is usually considered to be more approachable and achievable unless you're using a tool-set that makes 3d the better option.2. Which would be easier for beginners 2d or 3d games?
2d would be more approachable with either Python or Lua.
I think it's a great idea to learn a language like Python before -- or simply instead of -- C++. By choosing a language with less complications and a shorter learning curve you can focus more on the basics of programming itself rather than getting caught up with the many exceptions and corner cases a language like C++ presents. Depending on your goals you may even discover you don't actually need C++ at all, but you'll find it much easier to pick up if you're just learning the specifics of the language rather than programming as well.3. Is it wise to go the "easy route" first?
Not everyone agrees with this opinion, but I expect you'll be hard pressed to find anyone who would suggest that learning a language such as Python would set you back or make learning C++ any more difficult -- it's certainly not wasted time to learn a different language; especially a popular one like Python or Lua. Skilled professional developers know a range of different languages, and there's no reason you shouldn't start off with one that will allow you to see some faster results.
Hope that helps!
- Jason Astle-Adams.
From my blog: 20 ways to advertise your game | What next? Intermediate to advanced C++
How to make games WITHOUT programming | 4 reasons you aren't a successful indie developer
#3 Members - Reputation: 109
Posted 07 October 2012 - 06:19 AM
Im new and know I want to get into game programming. I have no Idea where to start. Everyone says C++ Is the way to go... for games. I would was thinking of doing 2d games for now just to get a good understanding of how to develop them. Then later move on to something more advanced. I will be reading in depth on python and lua now. Thanks!
#4 Members - Reputation: 181
Posted 07 October 2012 - 12:49 PM
Thanks!
Im new and know I want to get into game programming. I have no Idea where to start. Everyone says C++ Is the way to go... for games. I would was thinking of doing 2d games for now just to get a good understanding of how to develop them. Then later move on to something more advanced. I will be reading in depth on python and lua now. Thanks!
C++ is the industry standard for games so a lot of people suggest it, but it's a horrible starting point for a beginner looking to make their own games.
I back the python recommendation.
#5 Members - Reputation: 878
Posted 07 October 2012 - 07:27 PM
Small and simple Python 3.x media library: pslab
#6 Members - Reputation: 113
Posted 09 October 2012 - 07:17 AM
So my actual question is: Why is C++ considered hard?
#7 Staff - Reputation: 8926
Posted 09 October 2012 - 07:45 AM
Firstly, C++ is difficult because it assumes the programmer is an expert who knows what they are doing. This provides great freedom and flexibility when the assumption is true, but means there are many mistakes that are more easily avoided or simply aren't possible in other languages. Making it worse, there are plenty of mistakes where the code will often appear to work perfectly but cause subtle problems elsewhere or fail at some later stage.
Secondly, "undefined behavior": this term appears more often than might be desirable in the standard, and the language is therefore rife with situations where it's possible for all sorts of difficult to diagnose problems can occur, and again these situations are often hidden from beginners when faulty code seems to work just fine.
Third, there are a lot of bad or mediocre learning materials available teaching "c with classes" or making recomendations against standard library and other common code for reasons that have no business being applied to beginners.
- Jason Astle-Adams.
From my blog: 20 ways to advertise your game | What next? Intermediate to advanced C++
How to make games WITHOUT programming | 4 reasons you aren't a successful indie developer
#8 Members - Reputation: 878
Posted 09 October 2012 - 09:44 AM
So my actual question is: Why is C++ considered hard?
Difficulty is subjective, as jbadams pointed out, but I personally don't consider C++ "hard".
It's tedious, because manual memory management is tedious, and that's why I usually recommend a higher-level language as a starting point.
Small and simple Python 3.x media library: pslab
#9 Members - Reputation: 1052
Posted 09 October 2012 - 09:58 AM
If you're learning to drive, the mechanics of actually driving the car is but a minor point, the rest is about learning road awareness, the highway code, learning how to read and anticipate situations and generally learning to be a safe, competent driver. Learning to drive in, say, a Porsche 911 adds an unnecessary layer of complexity and potential for danger so instead people learn to drive in cars that are far more forgiving. Same goes for programming. Any unnecessary layers of complexity and potential for danger only hinder the learning process, beginners have enough on their plate as it is.
#10 Members - Reputation: 3284
Posted 09 October 2012 - 10:51 AM
Difficulty is to a certain degree subjective, but I personally think there are a couple of reasons C++ is (or can be) hard:
Difficulty is, complexity isn't.
C++ is a complex language. Needlessly complex in many ways. Complexity is a direct contributor to difficulty.
To the OP, I would recommend reading this, it's my standard and incredibly long answer to this question. But it should get you much further along then you are now if you read it.
Since I wrote that guide, I have been working more and more with Lua, and I am quickly coming to the conclusion that Lua is actually the perfect starting point for any new developer. It is just a wonderfully concise but remarkably expressive programming language. An experienced developer can learn the basics in a weekend, but then write 95% of a complete game in it, perhaps even 100%.
My only real beef with Lua are
a- defaulting to global
b- indexing arrays from 1
Those flaws aside, it really might be the perfect starting language. It is faster and easier then Python, far easier than C++ or C#/Java, etc... Is commonly used as a embedded scripting language, and has a few wonderful libraries to get started with.
#11 Members - Reputation: 3284
Posted 09 October 2012 - 10:54 AM
If you're learning to drive, the mechanics of actually driving the car is but a minor point, the rest is about learning road awareness, the highway code, learning how to read and anticipate situations and generally learning to be a safe, competent driver. Learning to drive in, say, a Porsche 911 adds an unnecessary layer of complexity and potential for danger so instead people learn to drive in cars that are far more forgiving. Same goes for programming. Any unnecessary layers of complexity and potential for danger only hinder the learning process, beginners have enough on their plate as it is.
This analogy doesn't quite go far enough. At the end of the day, driving a Porsche 911 in the city is really not that different from driving a Ford Focus. Also, the performance difference between languages isn't so deep either.
I would think a more apt comparison would be a Bugatti Veyron to a Formula One car. Both have comparable performance characteristic, but in a certain niche, in the right properly trained hands, the Formula One car will be superior. In other regards, and in ease of use, the Veyron will be superior. But at the end of the day, the Formula One car requires a hell of a lot more knowledge, special treatment and is just generally more of a pain in the ass to operate. On the flipside, you throw a formula one driver ( or C++ programmer ) at any other car ( language) they will do a pretty passable job with it.
Except LISP.
Edited by Serapth, 09 October 2012 - 10:55 AM.
#12 Staff - Reputation: 8926
Posted 09 October 2012 - 08:17 PM
- Jason Astle-Adams.
From my blog: 20 ways to advertise your game | What next? Intermediate to advanced C++
How to make games WITHOUT programming | 4 reasons you aren't a successful indie developer
#14 Members - Reputation: 751
Posted 09 October 2012 - 10:01 PM
Both languages have a C style syntax so you will feel rather comfortable going from either to c++. Python has a rather nasty syntax in my opinion. It makes a decent scripting language though.
I would say choose c# if you plan on only programming microsoft oses. Choose java if you're doing cross platform or working on linux.
The microsoft Visual studio IDE for c# is very good. This is why I suggest c# over java on microsoft oses. Also msdn is a really good place for documentation which you should get used to reading in a hurry.
Move up to c++ when you have made some fully functional and usable applications in your beginning language.
If your serious about programming. I suggest visiting 3dbuzz.com and checking out their videos for the live C# classes they did, for 35$ a month you get access to all of them via streaming of the recorded video, it's a college level education for 35 freaking dollars. I was there and participated live, they are really good. They also did c++ classes. They're building a new website and then they are going to come out with all kinds of new stuff, like iOS and andriod programming classes, more c# and c++ classes too.
Edited by EddieV223, 09 October 2012 - 10:06 PM.
If this post was helpful and/or constructive please give rep.
SFML2.0 Nightly Download Link http://en.sfml-dev.org/forums/index.php?topic=9513.0
SFML2.0 Tutorials http://www.sfml-dev.org/tutorials/2.0/
#15 Staff - Reputation: 8926
Posted 09 October 2012 - 11:10 PM
What bad habits do you think you learned from Python? Obviously it's not going to teach you the curly-braces style syntax found in languages such as C/C++/C#/Java and you'll need to learn the syntax and adjust to the particular idioms if later changing to any of those languages, but I don't see any reason Python should impart bad habits.I did python as a first programming language. I do not recommend it. It will teach you many bad habits.
In addition, beginners (and even more experienced programmers) can benefit from the interactive shell which allows you to try out and see the results of single lines of code without having to go through a laborious compilation process. This becomes less beneficial when writing larger pieces of code, but is an absolute god-send when a beginner is trying to learn the basics and can easily try out code for themselves.
To each their own -- and this really is just personal preference on both our parts -- but just to represent an opposing point of view I personally find the syntax of Python very pleasing. In particular, because indentation has meaning, poor or inconsistent formatting of code seems to be far less commonplace, and with only a small amount of experience Python code listings can often be read just as clearly as pseudo-code.Python has a rather nasty syntax in my opinion.
- Jason Astle-Adams.
From my blog: 20 ways to advertise your game | What next? Intermediate to advanced C++
How to make games WITHOUT programming | 4 reasons you aren't a successful indie developer






