Yes, I switch from language to language, but I want to learn a lot of languages. This isn't a bad thing, is it? I think it keeps me interested in programming(and has done for the past 3 and a half years!). Not that programming is boring, but I think you know what I mean :)
Anyway, the reason I've made this thread is because I want to know what Python library to use, explain to you what my issues are with them all and hopefully you can help me make the right choice.
Actually, before I say what my problems are, don't just get angry and say "LOL N00B! Use C++! Python is for N00BZ!", because that isn't true(first of all), and a few awesome programs that I've seen have been made in Python. And there's PyWeek, and I know there's a pure Python 3D MMO that's like $20 or something. That says something! I believe Python is a great language, simplistic and really good to use for game programming. I know CoderDojo, and I go there. They teach GameMaker, AppInventor and HTML/CSS/JavaScript. I already know how to use these(and I am against stuff like GameMaker, Scratch, AppInventor etc because I don't think it's right to use it. You should code a game, not have software do 80% if the work. This is just my opinion though and maybe you feel the same) and know Python. They are planning on teaching C/C++/Ruby soon, but that's beside the point. They have Raspberry Pi's to teach Python, and the Pi's come built in with PyGame. So they teach kids to code in Python. Point: Python is great for kids, and PyGame seems good. Now that that's out of the way, on to the point!
PyGame
PyGame is probably the most popular 2D game development for Python. If you google Python Game Development, PyGame is the first result(as of my posting this). It's one of my favourite game libraries for any language, but it's not my favourite Python game library. Here are the pro's and con's:
Pros:
• Simple to use
• Powerful
• Support for PyOpenGL
• Based on the very powerful SDL library for C/C++
• Designed for game development
Cons:
• Based on SDL, which is a C/C++ library so it doesn't feel as "Python"-e as Pyglet
• Not many guides
• The docs are alright
• Doesn't have support for loading TMX(Tiled) maps
• Designed for 2D games(but does offer support for 3D if needed)
My problems:
• Can't figure out how to have smooth player movement(1)
• Can't figure out how to have delta time(2)
• Can't figure out how to check if a key is held down(3)
Problem 1:
I cant figure out how to have smooth player movement and how to tell if a key is held down! Maybe I've been spoiled with LÖVE, but when I check for a key press and add 10 to the players X position, it jumps 10 pixels and doesn't transition there.
Problem 2:
I can't figure out how to have delta time in my game! Does PyGame handle this? Can I store it in a variable called DT or does PyGame do this for me?
Problem 3:
I can't find out how to check if a key is being held down. Event name or something?
Cocos2d
Cocos2d is one of the few Python Game libraries, other then for PyGame. It's based on PyGlet, which is my personal favourite Python Library in general. It's designed for games, but there are a few problems and a few upsides:
Pros:
• Supports TMX maps
• More "Python"ish
• Designed for game development
• Powerful
• Based on PyGlet
• Active(Updated less then a year ago)
• Has support for smooth player movement( Cocos.Sprite.Transition method )
Cons:
• The docs are SO BAD.
• Lack of guides
• Confusing(Uses Nodes, which make no sense to me!!!), probably due to lack of tutorials or guides in general
• Locked to 2D games(unlike PyGlet and PyGame)
My Problems:
• Cannot find an understandable guide(1)
• Cannot find Delta Time(2)
Questions:
• Can I use PyGlet alongside it?
Problem 1:
Cocos2d is a fabulous framework... from examples I've looked at and from what I've heard people say. The fact that it has smooth player movement overjoys me. The problem I'm having is finding a good tutorial. Even a book would be awesome at this point(and I hate reading books to learn programming, but when I have to I have to :P )! I think I saw a paid tutorial for like $35 somewhere, but I wouldn't pay to learn it, I'd rather learn C++ and use that with SDL or something!
Problem 2:
Delta time is something I can't seem to find in any of these libraries!
Question 1:
Knowing that Cocos2d is built on PyGlet, that made me question whether or not it's possible to use Cocos2d along with it.
PyGlet
PyGlet is by far my favourite library for Python... even if it wasn't designed for games, I saw someone make a simple Minecraft clone is PygGlet. It was pretty inspiring in my opinion! Despite it being my favourite, I still have a few things to say about it:
Pros:
• Simple to use
• Powerful
• Has support for 3D(Possibly using PyOpenGL, but I'm not sure. I know it uses OpenGL either way)
• Very good tutorials & Reference guides -- In fact it's the best that I've seen!
• Good for any type of application
• Very "Python"ish
Cons:
• Not designed for game development
My Problems
• Cannot figure out how to use Delta Time(1)
• Cannot figure out how to use smooth player movement(2)
Problem 1:
I assume since I'm having this problem will every library I've mentioned that the libraries handle it for me.
Problem 2:
Smooth player movement still remains a mystery! I can check if a key is held down, but (as like in PyGame) the player jumps there and doesn't transition there.
I know, a long topic, but hopefully I provided all the information needed for you to give me an informative answer. I've been told I don't give enough information, so maybe this is enough!
So yeah! Thanks! Any help is appreciated!!