• Coding
  • Python, is it a viable first language?

Hello,
i m very new to programming, and i chose to start with python, with the ebook http://inventwithpython.com but as i am looking around the sight, there are very little concern with python in the forums.


Is python really usable as a serious language? Any other languages that i could go for instead? i want to go with game programming, start text, move to 2d, and then hopefully 3d games are my goal. what do you suggest i do? i want something not to complicated, because i tried learning C++ once, and was going good until i hit pointers and crashed and burned. If you do rocommend something, please include a good learning resource, or ebook for it.

Thank you,
Axisflame
C/C++ for writing games.
Using python to write 3d games is a bit silly.
Try looking at SDL if you want to write games that can be compiled on more than one platform.
Python, if I understand well, is a rather general-purpose language. If you have never programmed anything before, it's a start. But if you want to go into game programming, I think you might find python too comfortable and easy as a language to want to move to C/C++ later on - so maybe starting with a "difficult" language is a good idea. I've put difficult between quotations because it's not really C or C++ that is difficult in itself, but rather the way in which it is used.

If you want to do 2d stuff, HTML, CSS and JavaScript sounds like a good path to me. But then once you'll try C++ again, you might "crash and burn" again, and having seen the simplicity and ease of other, higher-level languages, and being comfortable with them, might not help, as I said previously...

Maybe a realistic path would be to get a relevant degree from an university, some experience, then try to get hired by a game developer.

Good luck!
so i should quit python while i am not particularly attached or used to it?
AxisFlame wroteso i should quit python while i am not particularly attached or used to it?
No just saying, if you want to do 3d development, then go into that as soon as possible, and while you have time. Python might not help you that much.

In other words, it's like you're saying you want to be a rally pilot, but are learning to drive on a camping car equipped with an automatic transmission. Sure it might help a bit...
Not to mention the dependencies. Unless you are working on Linux, try getting windows users to install python + whatever other modules you need.
If you write your games in C or C++, you can simply ship (depending on the license of course) whatever libraries (dlls) you need with your binary and data.
... but that's just my opinion. Python is a valid language and if you feel that this is a good path for you, then I think you know best.
can you recommend one of them because you keep saying C or C++, which should i go for?? and do you have a good, easy to follow, eBook? preferably aimed for game design
AxisFlame wrotecan you recommend one of them because you keep saying C or C++, which should i go for?? and do you have a good, easy to follow, eBook? preferably aimed for game design
I'd recommend C++. It's like an improved version of C. As for books, I don't know any easy one. To be honest, I never went very far in C or C++.

AFAIK, this book is supposed to be like the "Bible" of C:

http://www.amazon.com/Programming-Language-2nd-Brian-Kernighan/dp/0131103628

(C Programming Language by Brian W. Kernighan and Dennis M. Ritchie)

I have a copy of this book:
http://www.deitel.com/books/cpphtp4/

(C++ by deitel & deitel) which they use in colleges sometimes, but I found it to be very annoying to read.
Let's get something straight.

If you're asking if Python is a good programming language to start with: yes.

The issue has been discussed a billion time on the forum. You want to use a language with low syntax noise so that you can focus on the concepts behind algorithms and data structure. C, C++, Java, C#, Javascript are perfect examples of what you should avoid when first learning.

I'm not the only one to think this. MIT teaches its "Introduction to Programming" class in Python.

If you're asking if Python is a serious language: yes.

Python is used intensively by Google, the NASA, reddit, Youtube, Yahoo! amongst other. Famous software using Python: Mercurial or Dropbox. Famous games using Python: Eve Online, Battlefield 2, Civilization IV.

source

Be assured than learning Python now is one of the best ways to start.
thank you rahmu, this really reassured me, would i move on from python to another language after i master it, or should i use it to make what ever projects i wish to?
Just to be clear Games that are using python are USING python as a scripting language.
The core engine is written in c/c++ and exposed as a scripting language to puthon, lua etc.
They use this model so gameplay developers dont have to compile the full source with each small modification they do.
@AxisFlame

A language is just a tool. Once you have learned, it'll be more or less easy to pick up other languages. Your point should be to focus on learning how to program. The rest will come naturally.
Well actually i like to use Python for scripting purposes on Linux. It's currently the best scripting languages for coding security tools, for example "Pyrit".

I guess if you're considering to start programming, Python is an easy and great language to start with. But don't count on it for advanced game programming.
AxisFlame, actually what I'm saying is - Python might definitely teach you a couple of things. But if you think that, after using python for 1 or even 2 years, you can try C++ again and will magically find pointers and that other stuff you had trouble with to be easy, you're wrong!

That's all I'm saying :)
Good luck! (again)
rahmu thanks again :D and rolf, i know it will not be easy, but at least i will know some background info before i enter C++
thanks Kassem, i appreciate it. I will look into that MIT course :D
AxisFlame wrotecan you recommend one of them because you keep saying C or C++, which should i go for?? and do you have a good, easy to follow, eBook? preferably aimed for game design
Regarding starting with C++, these are some resources I recently found online:

Quincy is a simple, small, easy to install editor and compiler for learning C++:
http://www.codecutter.net/tools/quincy/

Microsoft seem to have a complete C++ reference:
http://msdn.microsoft.com/en-us/library/3bstk3k5.aspx
rahmu pretty much covered it. I'd just like to add a couple of things.

Does it matter that you want to eventually build 3D games? No it doesn't matter because you have a long way to go before you can reach that point especially since you do not have any prior programming knowledge. Your CURRENT interest is building games and as you placed it so delicately: Text > 2D > 3D, two of which can be cleanly done in Python allowing you to focus more around the programming concepts rather than facing frustrating issues with C++.

You need not worry yourself with selling your first 500 or 1000 applications/games that you build, you need to worry about being in the "zone" and what happens later, no one knows. You might end up losing interest in building games and gaining interest in web development, where python pays off greatly.

Again, forget about "3D" games, download Python, get a book and dig in.

Learn to drive before you can fly.