Skip to main content
GameDev.net gamedev.net
🔒 Locked

Is Python Worth Learning?

Started by ryancfcsas Aug 18, 2010 at 4:44 PM 13 replies 5.2k views
Original Post
ryancfcsas
ryancfcsas
Now this isn't really a newbie thread.
Basically I am very well learnt into C++ and have done various projects with SDL, Win32 API, Qt4 and also the basics to Java.

Now I have heard that scripting should be used in computer games where possible, e.g. so that it doesn't have to be compiled everytime something has changed.

I have looked at Python and done a couple of tutorials on it. But now I need to come to a decision as to if Python is worth learning as a scripting language, all I really know is that it is used in a fair few Open Source projects such as Blender.

Thanks in advance!
[size="5"]My Twitter

[size="2"]I do not care for reputation, merely to help fellow users.
dmatter
dmatter
Put it this way: You're asking if a popular modern language is worth learning... when is the answer ever 'no' [wink]

On a serious note, Python suits your purpose perfectly (not exclusively though, Lua is another alternative, for example), it's a highly employable skill and a fun language to program with.
smr
smr
This depends on your purpose.

If you want to learn a scripting language to develop applications and write tools, then totally YES.

If you want to script applications that already use python, then YES.

If you want to embed a scripting language within your existing C/C++ application and you have no real desire to learn a new language that can be useful outside of your app, then I'd say "not really." There are other scripting languages that will probably integrate with an existing application more seamlessly and have a smaller learning curve. Angelscript comes to mind.
ryancfcsas
ryancfcsas
Quote:
Original post by dmatter
Put it this way: You're asking if a popular modern language is worth learning... when is the answer ever 'no' [wink]

On a serious note, Python suits your purpose perfectly (not exclusively though, Lua is another alternative, for example), it's a highly employable skill and a fun language to program with.


Yeah, that's true, thanks mate. 8-)
[size="5"]My Twitter

[size="2"]I do not care for reputation, merely to help fellow users.
ryancfcsas
ryancfcsas
Quote:
Original post by smr
This depends on your purpose.

If you want to learn a scripting language to develop applications and write tools, then totally YES.

If you want to script applications that already use python, then YES.

If you want to embed a scripting language within your existing C/C++ application and you have no real desire to learn a new language that can be useful outside of your app, then I'd say "not really." There are other scripting languages that will probably integrate with an existing application more seamlessly and have a smaller learning curve. Angelscript comes to mind.


This looks interesting as well. Although I will probably end up doing a few tutorials on all 3 (Python, Lua and Angelscript), just to try and get a feel of them.
[size="5"]My Twitter

[size="2"]I do not care for reputation, merely to help fellow users.
Stani R
Stani R
Python has a clean syntax. It's also immediately familiar to C++/Java/C# programmers (unlike, say, Scheme, a variant of which is used by Naughty Dog in Uncharted among others, for instance). Oh and you can write your own Blender exporters (as you already know). And you can pick it up in a manner of minutes/hours. What's there not to like?

On the other hand, you don't _have_ to use scripting in your game just because everyone and their dog does. Consider if you really need it. There are many areas where you can use it, but you have to consider what these are first, and how scripting will integrate with the rest of your game.
wqking
wqking
YES.

It's good any useful to learn a kind of script.
Python is the first class to recommend.

I myself didn't learn any Python because Perl can fit my needs most time, and when Perl can't, I can use Java. So I myself don't bother to learn Python yet.

But if you haven't mastered any script language, go learn Python.
Kasya
Kasya
And actually if you know c++ pretty good (as you said in your 1st post) python will take you 3 hours to learn. Its very easy, very fun, and best suits for scripting language IMO. :)
Erevis
Erevis
Quote:
Original post by Kasya
And actually if you know c++ pretty good (as you said in your 1st post) python will take you 3 hours to learn. Its very easy, very fun, and best suits for scripting language IMO. :)


Learning/understanding a language's syntax and semantics doesn't mean that you know the language. I would be surprised if he produced the same software as he would (quality-wise) in C++, in just 3 hours.

Also C++ and Python have very few things -if not nothing- in common, totally different coding experiences.
my game development site:http://sites.google.com/site/billgamedevelopment/
cignox1
cignox1
I've always stayed away from Python due to the syntax (and specifically the use of indentation to identify scopes instead than parenthesis) which I did not like very much. Bus as everyone out there says that python is an amazing language to work with, I gave it a second try and I must admit that it is nice and easy indeed.
Too bad I have no needs to use it right now, but I hope I will in the future, and having a scripting language at hand is always useful.
ryancfcsas
ryancfcsas
Thanks guys, I'm really surprised how helpful everyone is on this forum.
[size="5"]My Twitter

[size="2"]I do not care for reputation, merely to help fellow users.
Tayron
Tayron
simply put, YES! :)
Luckless
Luckless
Quote:
Original post by cignox1
I've always stayed away from Python due to the syntax (and specifically the use of indentation to identify scopes instead than parenthesis) which I did not like very much. Bus as everyone out there says that python is an amazing language to work with, I gave it a second try and I must admit that it is nice and easy indeed.
Too bad I have no needs to use it right now, but I hope I will in the future, and having a scripting language at hand is always useful.


I will admit that the indentation over { } annoyed me at first, but not any more. Now I tend to go for python first and it has become my primary language to develop in. I do have some projects that eventually had more lines of C in it, they were first written in python and only rewritten in C for parts that were running slowly.
Old Username: Talroth
If your signature on a web forum takes up more space than your average post, then you are doing things wrong.
Joviex
Joviex
Quote:
Original post by Talroth
Quote:
Original post by cignox1
I've always stayed away from Python due to the syntax (and specifically the use of indentation to identify scopes instead than parenthesis) which I did not like very much. Bus as everyone out there says that python is an amazing language to work with, I gave it a second try and I must admit that it is nice and easy indeed.
Too bad I have no needs to use it right now, but I hope I will in the future, and having a scripting language at hand is always useful.


I will admit that the indentation over { } annoyed me at first, but not any more. Now I tend to go for python first and it has become my primary language to develop in. I do have some projects that eventually had more lines of C in it, they were first written in python and only rewritten in C for parts that were running slowly.


QFT.

I currently scan resumes for python experience and consider it a major plus.

Working inside of Maya, Houdini, Nuke and our custom RAD toolset, python is a must.

It is highly usable, especially for the programmer who has been exposed to any C-ish syntax, highly portable, extremely easy to prototype something in a few minutes, extensible, embeddable, and just plain fun (I love list/generator comprehensions).

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.