Python

Posted by F1u on Feb. 6, 2008, 8:02 p.m.

Alright, I've made a couple of blogs on here about programming languages and about wanting to learn one. I recall posting about c#(+xna), and java. Now i'm thinking about learning python. The question's i have for everyone reading is-

1. Is it a good language for programming games?

2. How easy is it to learn compared to other languages, including gml?

3. Should I go for it?

Yah this is really short, so i better lengthen this up a little bit. OMGWTFLOLWAFFLES. ok. While 64digits was down, i was surfin teh internetz and i came across a website that i'm sure 98 percent of you know about. Tigsource.com is a good site covering independant games, and their development.

Yah i discovered python too. Good times. Oh and i looked into soldat and link-dead, and they really inspired me to make a platform shooter, but i'm not sure if i should make it in gm, or make it slowly while i'm learning python, if python is what i decide to learn.

Oh and the other day, my gym teacher made us do 150 pushups and 200 crunches, just because some kids in the class were messing around in the hallway before class. It was really hard, and it really pissed me off that the gym teacher was trying to be such a hardass. But oh well, he's actually a pretty cool guy too, which was what bothered me. Anyways, i'm gunna go do my hw now. Later, and isn't it great to have 64digits back?

Comments

RabeArcade 16 years, 10 months ago

My advice is to forget about Python. Python is a very high-level language (meaning you will eventually run into the same problems gml has). Go find a real language, and although it may be harder to learn it will pay off in the end.

You mentioned C# & XNA; personally, I think that's a very good combination to start out with. XNA offers the (near) simplicity of higher-level languages, and C# offers the (near) power of your low-level languages (ie C++ & the like). The fact that C# makes development very fast should also make it more fun to learn and work with for someone with little experience in real programming. -Hope all this helps with your decision.

Kaz 16 years, 10 months ago

It would probably be nice to know, but I don't know how much you can do with it. Never really looked it up too much or tried it.

I had XNA at one point, but I don't know what I did with it =/

F1u 16 years, 10 months ago

Thanks rabe arcade, i'll look into the matter a bit more before making a final decision. Your avatar is scary btw. And kaz…..uhm alright. lol

DesertFox 16 years, 10 months ago

I think Rabe needs to go away and actually learn something about Python first. You think GML and Python are anything like each other? Python is a real language, same as Perl, and PHP - it is nothing like GML. If you are going to say Python is not a real programming language, then you might as take out Java, PHP, Perl, Ruby, and a bunch of other interpreted programming languages.

First off, Python itself is a very high-level language - it is easy to learn, and programming in it is relatively easy compared to C++, Delphi, or other languages of that sort.

Secondly, Python is extremely portable and compact. This is a massive plus in its direction.

Thirdly, although slower due than other languages due to the fact that it is an interpreted language. It is run in a similar fashion as Java or PHP, and there are also items to actually compile Python bytecode to machine code, such Psyco. In fact, Python is faster than PHP (which this site is run off of), yet I don't hear Rade screaming about how PHP isn't a real language.

Python is also designed to act as a wrapper around other languages, in which you write CPU intensive bits in something like C and call them from Python, making it very powerful. It also has a massive code-base - libraries that you can install in a snap, or are already there, that make implementing things an absolute breeze. Python can also be used in web development, again like PHP or Perl. Because of this, Python is what is called a 'scripting language'. * Massively important paragraph

Python is an extremely valuable tool for many things. It may not be the fastest out there, but it is nothing like GML. Don't start comparisons unless you actually know what you are talking about. It is not interpreted in the same sense as GML is interpreted - thats like comparing a remote-control car with the Eliica - sure they both run on batteries, but one of them is a real car with a top speed of 230 mph. GML is a piece of crap when it comes down to it, Python is not.

If you follow Rade's idea of "Faster is better!!!", then by his opinion, absolutely everything should be written in Assembly. Or better yet, written in straight machine code, with a magnetized needle and a steady hand.

If you must know, Python can actually be pretty useful for game programming, because it is a scripting language. Python by itself may be slow, but wrapped around an engine written in C or another language (as it is designed to be) makes it very, very powerful. There exist libraries to wrap python around something like OGRE, Irrlicht, or Blender. For reference, reread the Extremely Important Paragraph.

In conclusion, Rade is being a complete and utter moron for a) dismissing Python because it is high-level and b) comparing it to GML. And before Rade explodes and flames me, yes I do know 'real programming languages other than GML'.

Eve-online is written in Stackless Python, by the way - see 7.4

F1u 16 years, 10 months ago

Wow, thanks df. The fact that you took the time to write all of that actually means a lot.

DesertFox 16 years, 10 months ago

Thank you.

Also, I am in fact in college for Game Design and Development, so I know what I'm talking about. Scripting languages are a powerful thing. Raw speed is necessary for CPU-intensive things such as FPS games, but in case you didn't know, casual games comprise a surprisingly large part of the gaming market - games that aren't that CPU intensive - games that can be written in higher-level languages.

Another thing is, there is nothing to stop you from learning Python AND C#/XNA - by all means learn more than one language. Knowing multiple languages means you can do more.

stampede 16 years, 10 months ago

Python! Python! Python!

RabeArcade 16 years, 10 months ago

To compare scripting to programming (in your PHP example) is to compare apples to oranges. He's not looking to build a dynamically-driven website; he's looking to build games. Although you certainly can use Python with relative ease, wouldn't you rather have the power of a low-level language where you have a more detailed control over everything? And no, I'm not saying that "faster is always better", if that was the case, I wouldn't have recomended C#. I'm simply saying that a new programmer will probably be better off knowing a true programming language, as opposed to a scripting language. I know what I'm talking about, I just happen to be biased against those very high-level languages. Influenza, I'm not trying to tell you to never learn Python, I'm simply suggesting you learn a more powerful (yet almost as easy) language first, it will help you in the long run.

DesertFox 16 years, 10 months ago

Of course he shouldn't avoid learning a low-level language. However, something like Python makes an excellent step from GML to a real programming language, especially something in the C family. Heading into the C family straight from GML is like going from bumper cars to Formula 1.racing. Formula 1 cars may be fast, but you wouldn't try and drive one the moment you got your license. You're going to screw up massively if you do, no ifs about it, because GML gives people such horrible coding practices. Python is once again perfect for an intermediate step because it has relatively forgiving syntax, but still forces a form of order.

Also, I just don't like you calling Python a false language - it is a real language, even if it is very high-level. Don't let your bias get in the way of truth.

s 16 years, 10 months ago

Ya, Python is teaching me to indent. GML scared me from that with the whole no taking out whitespaces on glue to runner process they call compilation