Advertisement

Python 2 or Python 3

Started by April 21, 2015 01:19 PM
5 comments, last by Shrak 9 years, 9 months ago

Hi guys,

I've done a little bit of research but am not sure whether it would be wise to start learning how to program with python 2 or python 3 with the eventual hopes of using pygame to make games. Now I've read some things advising against the use of pygame and to be honest, I'm just interested in the python language more than making games with it. I know that C# would also be another good starting point but it shouldn't matter where I start as long as I do something right? I'm going to look into game dev tools like unity, ue4 and gamemaker soon when I get time and try to also learn those but I'd like to dive into programming and learning how things work and starting from there. I don't mind not seeing results for a very long time. If you have any advice that you can give me from your experience of getting started, please let me know. I've gotten into this bad habit over the last 6 months of just researching game dev instead of actually making a game and I think now I'm ready to just dive in and start.

Thanks,

Boomlaz

Python 3 is definitely better than Python 2 :)

Unfortunately, I think the Python community did shoot themselves in the foot by allowing Python 2 to linger on for what seems forever..

I do realize that there are tons - or rather: were tons - of Py2 projects for which porting would be difficult and too time-consuming, but it is a royal pain in certain parts of the anatomy for people like you and me.

I usually use Python3 but I can switch over to Python2 for things that haven't been ported over yet.

It is much better now, so I would recommend that you aim for 3.

Gamewise, maybe Panda3D ?

I find that to be the most full featured game engine. It is written in C++ but you generally use Python to drive the whole thing.

Check it out.

If it can use Python3 then go for that. If not, then go for Python2.

The difference between 2 and 3 is not really that big (from a user perspective).

Too many projects; too much time

Advertisement

I use Python 3 with Pygame.

I've also tried compiling a Python/Pygame demo game into an executable (.exe) with cx_Freeze and it worked fine for me. The only thing about Python is, if it's not installed on the user's computer and you don't compile it somehow, then others won't be able to run your program. I heard that Python is already installed on Macs, but I don't know if that's a sure thing or not because I don't own a Mac. Not sure if it's an issue for you, but it's good to be aware of that before starting.

That said, I use either Python3/Pygame or C++/SDL2 to make games. The syntax of the former is a lot easier to understand and a good place to start, in my opinion. In any case, the two combinations I mentioned here are basically the same thing at the lower level.

Please use Python3 because we would all be better off if Python2 finally bit the dust.

I have read somewhere that the main reason Python2 still exists at all is because certain popular Linux distros still ship Python2 and/or bind the 'python' command to the Python2 runtime. So it's not been so easy just to drop support for Python2.

I always reach for Python3 and only really bother with Python2 from time to time if I really must for compatibility reasons.

Choosing Python2 for a new project is like choosing to write your new novel in Latin. Just use Python3.

Stephen M. Webb
Professional Free Software Developer

Alright thanks for the feedback guys, will be going for python 3!

Advertisement

Damn, I started learning Python 2 because I heard people still use it. Haha Though I learned Python 2 and moving on to Python 3 and there are minimal differences, still somewhat the same so just go Python 3 to lessen the hassle of learning two different versions of 1 language. :D

This topic is closed to new replies.

Advertisement