GPWiki.org
GPWiki.org
It is currently Wed Jun 19, 2013 10:38 pm

All times are UTC




Post new topic Reply to topic  [ 18 posts ] 
Author Message
PostPosted: Sat Jun 27, 2009 4:22 am 
Prolific Poster

Joined: Mon Mar 17, 2008 7:39 am
Posts: 18
I've been using C++/SDL for a couple years now, and it's pretty good for game making. Free, cross-platform, fast, etc. Recently I decided it was time to finally learn Python and Pygame, and so far it's actually been a bit better. Mostly it just offers weaker typing and is interpreted. But making games has been a bit faster, and would probably be easier for newer people to get into making games.

On the GP forums though, you barely see it, let alone Python. The wiki has a couple entires on getting into it, but not much. So why is this?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 27, 2009 4:45 am 
Dexterous Droid
User avatar

Joined: Fri Dec 24, 2004 8:13 pm
Posts: 3769
Location: Michigan, 'US' of 'A'. Below Canada.
I was the person that took Ra's article from the gamedev wiki and placed it on ours over our old one since it better explains things and shows two good choices.

Picking a Language

Actually I learned the basics of python 2 weeks ago. It's an awesome language for beginners.

Why is it unpopular? Not many of our users use it I guess. :yeah If you want to tout Python and make it popular go ahead. I recommend it to people on IRC all the time.

_________________
/\/////////// \\\\\\\\\\\/\S
/\/////////\\ //\\\\\\\\\/\I - Assault Wars
/\///////\\//|\\//\\\\\\\/\R - - Work in Progress
/\/////\\////|\\\\//\\\\\/\I
/\///\\/////\|/\\\\\//\\\/\S


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 27, 2009 5:19 am 
Technomaniac

Joined: Sun Dec 05, 2004 11:27 am
Posts: 3249
Location: Sydney, Australia
I don't think anyone here actively dislikes it... just no one uses it.

Personally, I find python suboptimal, but not enough that I won't use it for certain things (there are other non-technical things about it that make it good).

_________________
Trying is the first step towards failure
b


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jul 10, 2009 2:13 pm 
Rookie

Joined: Fri Jul 10, 2009 2:07 pm
Posts: 2
Location: Quebec, Canada
Suboptimal ? What do you mean ?

Has anyone here used Python-Ogre ?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Jul 16, 2009 7:50 am 
Technomaniac

Joined: Sun Dec 05, 2004 11:27 am
Posts: 3249
Location: Sydney, Australia
There are lots of things I don't like about python. Memory management is one of them. Lack of type information is another (this is more of a dynamic language thing than a python thing, but automatic documentation for python libraries sucks because of this). I could go on, but a lot of the things are quite minor and to actually make the point, you have to give bucket loads of examples, where each particular example is fairly weak... but it all adds up to make me sad.

But, I do use python as it has some nice properties that other languages don't have.

_________________
Trying is the first step towards failure
b


Top
 Profile  
 
PostPosted: Mon Aug 22, 2011 7:44 am 
Octogenarian

Joined: Thu Aug 04, 2011 12:00 am
Posts: 87
Location: Arizona
I have to agree with Andy regarding Python, and I also have a love/hate relationship with it. I'm not such a critic of the language itself, but of the documentation... When you need to look up information, if you don't know exactly where to go to find it (python.org), and resort to Google? Oh brother, there's a million articles and tutorials out there for Python 2.7 that are absolutely USELESS with Python 3.2, the current version. That really drives me crazy sometimes when I'm trying to get quick help on some specific issue. IMO, that causes Python to become more difficult to use, where if the Python developers had done a better job of supporting 2.x (at least WORKING but with complaints?) then it would have been a lot better language today. Googling for "python 3.2" with any topic does help, but this problem is one of my biggest gripes about XNA as well... It's hard to find good relevant information that works NOW, with current versions, with all the useless info on the web from older versions.

Regarding just games, Python + Pygame is probably the best choice for beginners among all the tools I've used/tried. Very easy to install, easy to program, quick results... But a complete beginner needs a teacher/mentor to explain how to get started. Python is a truly bizarre language, but once understood, it produces quick results fairly easily.

But, then, there's QB64... which for a "complete beginner" is so much easier and there isn't any of those version woes to deal with.

_________________
Amazon Author Page
Game Dev Forum
Facebook Page


Top
 Profile  
 
PostPosted: Mon Aug 22, 2011 5:25 pm 
King Code Monkey
User avatar

Joined: Wed Sep 01, 2004 3:05 pm
Posts: 11199
Location: Abingdon, MD
twobitcoder wrote:
this problem is one of my biggest gripes about XNA as well... It's hard to find good relevant information that works NOW, with current versions, with all the useless info on the web from older versions.

The AppHub Education Catalog is the best place to go for this IMO, although The Windows Phone 7 stuff is kinda overshadowing everything ATM. :(

_________________
Bored? Head on over to my blog and see what I'm up to.

Microsoft XNA MVP


Top
 Profile  
 
PostPosted: Tue Aug 23, 2011 2:35 am 
Octogenarian

Joined: Thu Aug 04, 2011 12:00 am
Posts: 87
Location: Arizona
You're right, there are some good new resources online, but it's just frustrating with so much obsolete info out there! Python is worse..

_________________
Amazon Author Page
Game Dev Forum
Facebook Page


Top
 Profile  
 
PostPosted: Fri Aug 26, 2011 11:01 pm 
Rookie

Joined: Fri Aug 26, 2011 10:46 pm
Posts: 4
Don't use python 3, use 2.6 or 2.7. Then the documentation you find will be valid. The reason you have trouble finding info about python 3 is most python developers aren't using 3 yet. If you are stuck on 3, well, I feel for you. Still, 2 and 3 aren't that different. The main differences are 'print("x")' instead of 'print "x"', and that strings are unicode by default. Most higher level game code shouldn't run into too much trouble. I don't use python 3 though, so I don't know what that experience is like.

Also the python docs themselves are pretty good. docs.python.org and pygame.org documentation should be able to get you far.

I've used python-ogre, it's pretty cool but VERY big and a bit bloated. I stopped using it when I couldn't get it running on linux. Also I got sick of dealing with 3d. If you are only targeting windows I think its a viable engine, although it takes about as much time to learn as ogre itself.


Top
 Profile  
 
PostPosted: Fri Aug 26, 2011 11:34 pm 
Octogenarian

Joined: Thu Aug 04, 2011 12:00 am
Posts: 87
Location: Arizona
saluk wrote:
Don't use python 3, use 2.6 or 2.7. Then the documentation you find will be valid. The reason you have trouble finding info about python 3 is most python developers aren't using 3 yet. If you are stuck on 3, well, I feel for you. Still, 2 and 3 aren't that different. The main differences are 'print("x")' instead of 'print "x"', and that strings are unicode by default. Most higher level game code shouldn't run into too much trouble. I don't use python 3 though, so I don't know what that experience is like.

Also the python docs themselves are pretty good. docs.python.org and pygame.org documentation should be able to get you far.

I've used python-ogre, it's pretty cool but VERY big and a bit bloated. I stopped using it when I couldn't get it running on linux. Also I got sick of dealing with 3d. If you are only targeting windows I think its a viable engine, although it takes about as much time to learn as ogre itself.




LOL... there's a lot more that has changed between Python 2.7 and 3.2 than just the print() function. I'm not suck on 3, but that's the latest version, and it's been out for a few years now, so that is the version everyone should be using at this point. The docs are really helpful as long as you don't need examples. But, my gripe is with the huge amount of stuff online for 2.7 which does not compile at all under 3.2. As far as just learning the language, etc, not a problem, but there's a lot of stuff out there that's deprecated and it's hard to sort through the junk to find real, usable code. Same deal with older versions of XNA. I wish people would disclaim the version they're using.

_________________
Amazon Author Page
Game Dev Forum
Facebook Page


Top
 Profile  
 
PostPosted: Sun Dec 11, 2011 3:05 am 
Novice

Joined: Sat Dec 10, 2011 5:37 am
Posts: 6
Well, here is my take on the discussion. I have used a variety of languages, such as C++, VB, Javascript, and a multitude of scripting languages, which shall remain unnamed. I finally landed on Python and shortly thereafter, Pygame.
Firstly I would like to say from my experience Python is a simple, intuitive language at face value, and is very easy to learn. However what a lot of people overlook is the power potential it does possess. It's built in functions execute very quickly, and for advanced Python programmers these shortcuts are what really make the language powerful. For example simple functions like min() and max(), which derive minimum and maximum values from a list, it may not seem like much but it could exempt 3 or 4 lines of code in other languages.
In any event, the topic at hand would be Pygame, and I have huge respect for it. My game I am working on now is a sprite based game. At any given time I can run a 1024x768 window, with 40 NPCS being displayed, checking collisions (rectangle and SAT) and still pulling 60-70fps on my 800mhz Netbook (Respectable computers run 100fps, which is my current cap). Not to mention how blissfully easy it is to work with, the documentation is super informative and everything is very straight forward.
I suppose the last thing I have to say is programming in an interpreted language does have it's fall backs when you get into large number iterations, such as checking pixels for collision or displaying multiple high resolution layers, or even complex NPC scripts which are constantly checking for collisions, or what have you. But this is a good training method to get your code as optimized as possible, I mean it is VERY apparent when you have made something that could be done in a different way (Again, with 40+ NPCS). And if all else fails, familiarize yourself with Cython and make any CPU hogging function in C!
I do not intend to flame those who program in 'real' languages, but I think some guys shut Python down because it is after all 'Not a real language'.
Terry


Top
 Profile  
 
PostPosted: Sun Dec 11, 2011 3:12 am 
Harmlessness does no harm
User avatar

Joined: Tue Sep 14, 2004 8:37 pm
Posts: 3855
Location: Ferriday, LA, US
Armageddous wrote:
It's built in functions execute very quickly, and for advanced Python programmers these shortcuts are what really make the language powerful. For example simple functions like min() and max(), which derive minimum and maximum values from a list, it may not seem like much but it could exempt 3 or 4 lines of code in other languages.

What? Every language I've ever come across has built-in functions, including min() and max()...

Armageddus wrote:
I do not intend to flame those who program in 'real' languages, but I think some guys shut Python down because it is after all 'Not a real language'.

Who said that Python "is not a real language"? Anyone who says that is either joking, or just don't know what they're talking about. Either way, I wouldn't put much merit toward it. :)

_________________
What most people don't understand about "enlightenment" is that it is not an end-goal; but where you find yourself just before taking a new "first step."


Top
 Profile  
 
PostPosted: Sun Dec 11, 2011 7:06 pm 
Octogenarian

Joined: Thu Aug 04, 2011 12:00 am
Posts: 87
Location: Arizona
"Real" as in compiled, just an imprecise word. Python is a real language, but the Python interpreter does not produce compiled code. Someone COULD technically write a Python compiler that produces an executable. But it was not intended to be a compiled language. Think of it from NASA's point of view... The code is text. You can send it to your dozens of spacecraft, robots, and not need to do a hard reboot (with possible startup failures), if you just send a new script file and reset the script process running without shutting anything down. A BIOS update of course does require a reboot but I suspect the BIOS is lightweight, little more than a bootstrap.

_________________
Amazon Author Page
Game Dev Forum
Facebook Page


Top
 Profile  
 
PostPosted: Sun Dec 11, 2011 7:37 pm 
Bytewise

Joined: Sun Oct 16, 2011 3:09 pm
Posts: 283
Location: Here (where else?)
twobitcoder wrote:
"Real" as in compiled, just an imprecise word. Python is a real language, but the Python interpreter does not produce compiled code.
And Python is in good company nowadays.
Python generates byte-code and even writes it to disk (the *.pyc files).

Many modern languages don't 'compile' like C/C++ do, Java has byte code and a JVM, .NET/C# has a similar thing afaik.


Top
 Profile  
 
PostPosted: Sun Dec 11, 2011 7:47 pm 
Dexterous Droid
User avatar

Joined: Wed Aug 18, 2004 7:40 pm
Posts: 3746
Location: South Africa
Interpreted versus compiled has nothing to do with whether a programming language is real or not. Saying Python isn't a real language is purely used in a disparaging sense.

http://xkcd.com/378/

What point are you trying to make about the BIOS and rebooting with regards to programming languages?

Quote:
Python generates byte-code and even writes it to disk (the *.pyc files).

Python byte-code doesn't run any faster than regular .py files. They only load faster. .NET on the other hand has slightly funky JIT compiling, which does create actual native machine code.

_________________
Whatever the mind can conceive and believe, it can achieve


Top
 Profile  
 
PostPosted: Sun Dec 11, 2011 7:54 pm 
Octogenarian

Joined: Thu Aug 04, 2011 12:00 am
Posts: 87
Location: Arizona
IGTHORN wrote:
Interpreted versus compiled has nothing to do with whether a programming language is real or not. Saying Python isn't a real language is purely used in a disparaging sense.

http://xkcd.com/378/

What point are you trying to make about the BIOS and rebooting with regards to programming languages?

Quote:
Python generates byte-code and even writes it to disk (the *.pyc files).

Python byte-code doesn't run any faster than regular .py files. They only load faster. .NET on the other hand has slightly funky JIT compiling, which does create actual native machine code.



I would reply but I don't like your tone and am not in the mood for an argument today.

_________________
Amazon Author Page
Game Dev Forum
Facebook Page


Top
 Profile  
 
PostPosted: Sun Dec 11, 2011 8:48 pm 
Dexterous Droid
User avatar

Joined: Wed Aug 18, 2004 7:40 pm
Posts: 3746
Location: South Africa
twobitcoder wrote:
I would reply but I don't like your tone and am not in the mood for an argument today.

It's not a moral high road anymore when you announce it :rolleyes

I had no intention of provoking you - I was just asking for clarity. I am a bit sleepy so maybe I should have proof-read and restructured the post. As WAR says, "Why can't we be friends?" ;)

_________________
Whatever the mind can conceive and believe, it can achieve


Top
 Profile  
 
PostPosted: Tue Dec 13, 2011 3:52 am 
Novice

Joined: Sat Dec 10, 2011 5:37 am
Posts: 6
I was referencing the difference between compiled and non compiled languages. The separation goes beyond that simple fact, ie, the complexity of the code it self.
I think a bad example was min() and max(), it was mostly to illustrate how they differ from, say the C++ version where min(10, 2) will return '2', but min(10, 12, 7) will simply error. In Python the functions are fed a list like: min([9, 8, 6]), where 6 would be returned. Rarely do I find myself wanting to know the min()/max() of only 2 numbers.
When I say 'complexity of the code' I mean things like declaring variable types, types of functions, object based vs non, etc. I view it from my perspective, where I could not physically dedicate the time to learn C++ well enough to produce anything, while Python I taught myself in less than 3 months, and already have something in production. The end product will be just as functional as it's 'potential C++' version, but will suffer a slight to moderate performance loss. To me, this is a good trade up, when I see how fast I can get things functioning.
Maybe it is simply the difference that I am a hobbyist in this, not a professional.
Terry


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group