Jump to content
  • Advertisement
Sign in to follow this  
Eamonn Dev Rea

Is Python underestimated with what it can do?

This topic is 1804 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I've read various articles, blog posts, etc on Python: All of which list it's pros and cons, though they tend to either say it's slow or good. It's said to be a good beginners language: And I whole heartily agree. Any programmer can admit Python is a great beginner language. It sets a good example for OOP and encourages people not to use D&D Programs. But, alas, it is said to be bad as well.

 

Python not for game development? Panda3D, Unity of Command, Frets on Fire, Toontown, EVE Online

 

But, a lot of people argue that you should not use Python because of speed. Some say it's too slow for anything, others say it's good at some things.

 

So, my question is: Is Python underestimated? From what I can tell, it seems to be a fairly good language, and it being so simple to pick up makes it a great language. Google Chrome is partially written in Python. Some of Linux is written in Python.

 

Obviously Python would not be capable of a high-end Call of Duty clone, but really, the only language suited for that is C/C++ simply due to it's speed.

 

So, what is Python's limits? Is it as good/bad as people make it out to be? I recently finished a programming tutorial series on Python 2.7.2, and it's really got me into Python.

 

A lot of programmers start with Python now-adays, but they tend to only start with Python.

 

I'm not sure if it's true, but I've heard of some viruses being written in Python as well. I've heard you can do a man-in-the-middle attack with Python, using a certain library. I wouldn't like to do this; not only because it's illegal, but because I believe there are other languages better suited toward this. Also, I'm not so sure it'd be easy to cover your tracks in Python.

 

Python is also meant to be quite good at making the GUI's, and letting another language like C or C++ do some of the heavy work.

 

All in all, this is just to satisfy my own curiosity. In my opinion: Python is a great language! I often use it to test some ideas for game development quickly. It's fast at prototyping ideas, I'll give it that.

 

Also, I'd like to point out that Gimp was written in C/C++, and it's quite slow at responding a lot of times. I find that writing GUI's in Python is actually quite fast(for the coding of it and for the response time). So I guess some of it depends on how efficient your program is.

Share this post


Link to post
Share on other sites
Advertisement

You described it well: Python is good at making tools. Integrating it with Java could mean making GUI's in Python(since it's so simple to do so), and have Java do the heavy stuff. I believe Minecraft uses Jython.

Share this post


Link to post
Share on other sites




Obviously Python would not be capable of a high-end Call of Duty clone, but really, the only language suited for that is C/C++ simply due to it's speed.

 

When people say python is "slow", this is what they mean.  Lots of people go into gamedev thinking they're going to make the next CoD, or that learning anything that won't go towards eventually making the next CoD is a waste of time.

 

It's great for certain classes of tools (e.g. the ones that don't involve heavy GUI development, like a map editor or something -- I'd use C# for that), for scripting and for embedding into other games to write code more productively.

 

It's not very fast.  However, that's not something that should be examined in a vacuum.  The only important question is whether a language is "fast enough" for your needs.  for 99% of the people working in gamedev in any way, shape, or form, python is "fast enough".

 

There are certainly gripes I have with the language.  I think it's hard to work with on projects of scale.  I think it's slow for certain classes of projects, and it's very hard to actually optimize it for speed when you have to due to the heavy abstractions in the language (though you can always convert stuff to C).  However, I think most people recognize python as a vital tool, and really, along with Lua, C#, C++, and Java, it's one of the most popular languages for gamedev, so I don't realy think it's "underestimated" at large.

Share this post


Link to post
Share on other sites

Obviously Python would not be capable of a high-end Call of Duty clone

Some parts of call of duty ARE written in a slow, interpreted language... So actually, python definitely could be used to replace those particular parts of the COD code base.
AAA games are made using many languages, exploiting the strengths and mitigating the weaknesses of each of them.

Share this post


Link to post
Share on other sites

Some very interesting replies. Python will never replace C or C++, but it doesn't need to. You can write C in Python, and C is pretty much as fast as Python. I think you can also write C++ in Python, though you might need a library or something. I've never looked into it(mostly because I'm not too fond of C++, and just really don't want to look into C Python until I've learned a lot more of Python(e.g. How to parse XML and JSON and such)).

 

It's fast prototyping makes it a valuable language, as a few people mentioned.

 

It's good to know there are efforts to make it faster. I saw a benchmark somewhere, and it said that Java 7 was slightly faster then Python, but Python's catching up. Java is a good language for game development(at least IMO), so does this mean if Python gets "much, much" faster, it would get as fast(if not faster) than Java? Either way, if it's almost as fast as Java, that's proof enough for me that Python is underestimated and under-ranked.

 

I'd also like to say that Python might not be good for writing games entirely, but maybe as a scripting language for games. For example, World of Warcraft was written in C/C++, but uses Lua for scripting.

 

Another thing: Python is faster than Lua, I think. I saw a benchmark somewhere comparing Lua, Python, Java and C#(C# won, By the way). This is strange, because Garry's mod is mostly(if not entirely) written in Lua. I've briefly played Garry's Mod, and I didn't see any performance issues. At the very least you can write add-ons in Lua, but even then they are very responsive. I'm not sure about this, and haven't seen anything to back this up, but apparently the guy that wrote Garry's Mod made a language based on Lua to code it. What leads me to believe this is false is that when the game is loading, I see it says "loading *.lua". If it was written in Lua, and Python is faster then Lua, then could you not write a game like Garry's Mod in Python? AFAIK Lua is interpreted too. I did get a little side-tracked, but it's still got to do with Python.

 

If Python got faster then Java, it'd be the ultimate beginners language because:

 

1) Easy to learn

2) It'd be fast -- Assuming we're in the future when it's "much, much faster"

3) You could write basic 3D games in it(Panda3D)

4) You could write an awesome 2D game(PyGame, PyGlet, Cocos2d)

5) It can be used as a scripting language in games

6) Kids can learn it easily, helping young people get into code the right way(not using GameMaker or anything)

 

Also, CoD games are usually not written in a language at all from the developer, from what I've heard. If they are, it's usually C/C++, but not often. They usually use Game Makers like Unreal Engine or UDK or something. Maybe this is false, but I thought'd I'd put that out there.

 

Don't get me wrong: I love Python, I really do, but I just wish it could be used for more uses and people saw how much of a good language it is - For beginners and Experts alike.

Share this post


Link to post
Share on other sites

This topic is 1804 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!