Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
I'm not very good in Python and just used several times before. I used PYQT and python to make an interface for controlling out-side devises.
I'm wondering whether Python can make an interactive animation something like Flash produces. I searched and found some suggestions: HTML5, Pygame and Tkinter. I have no idea about how those things work with Python.
Does someone can give some advises? Thank you!
In my opinion Pygame the best library in Python3. You can do all things that you want, but you need to work in the hard-way, control main_loop, work with messed up classes and perhaps needs some OpenGL basic functions.
Tkinter is a good lib to make softwares, but to work with graphics is badly. Is easy, have a lot of tutorials in net, you don't need to work directly to main_loop... But is limited, in some step you will stuck and take the double of time to figure out.
You should be use Pygame or Pyglet (Similar to pygame, but still updated and more organizated -- doens't have much tutorials on net, so if you are begginer don't try this before pygame).
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
So I made some games in Python, but they are all text-based because I can never find out how to do graphics. I have done a bit of searching, and the answers that I have found either don't work or don't answer my question. I am wondering how to use graphics and implement them in code, such as if a red dot touched a blue one the red one will turn green, or if I press the up arrow key the red dot will move up. I know that is a lot to ask, so I am wondering if there is a website or something that can tell me where and how to start.
As #Axe319 mentioned you can use, pygame, Tkinter, or turtle although there are more. You can find information on pygame here https://www.pygame.org/news, but if you have a Mac it can be tricky to use. Pygame is probably more of the more popular ones to use, however more recently people have been using other modules. tkninter is usually used for GUI, but you can use it to make some games. Turtle graphics as he said again are minimal and I have only used them to make pictures, but I know people have made games. Based on what you wrote Pygame, or Tkinter would work best, and if it is simple enough use tkinter. They both have plenty of tutorials on the internet if you need help.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this question
First off please do not mark this topic as a duplicate. All the relevant threads are years old. I would like updated information.
What are the pros and cons of the following libraries?
I am aware of:
PyGame, seems to be the most popular but the website is full of
broken links and no news in awhile.
Cocos2D Python, Seems good as cocos2D is all the rage right now.
Almost no support though and the stack overflow pages only seem to
get a post every couple weeks.
Pyglet, This is the only one I never tried as Cocos2D seems to use
Pyglet. Seems to update more then the cocos2D python stack overflow
but less then the pygame.
Other? Rate a better library!
I am looking for information on ease of use, preferably pythonic and up to date. But perhaps most importantly active.
Pygame and Pyglet are definitely on the radar.
Pygame
Great, popular game engine. No support for a variety of file types. But it's no longer maintained.
Pyglet
Very powerful, high support for many files. Thorough documentation. OpenGL support, intuitive.
Cocos2D
I really feel that Coco2D is just an unnecessary medium to use the underlying Pyglet engine.
After working with Pygame, Cocos2d, and Pyglet to create a series of games, I would have to recommend Pyglet.
Cocos2d and Pygame were very unwieldy. On the other hand, pyglet has a very neat API, enjoyable to work with, and very 'clean'.
It also has no external dependencies, and is wrapped on top of OpenGL, allowing you to do some pretty advanced special effects.
You can view a game (along with the source code) I created with Pyglet here.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I want to ask if it is possible to import 3d-models made by Blender into pygame application-> yes, it is! I found an .obj file laoder: link
But now my Question is, i want to make a game like Diablo 3 or WoW with a large map. Should i make a map at Blender? I did it so far, but i don't know if I can import it and use it easy then as landscape/map? Or is there any other possibilities at pygame to make landscapes/maps? Or should i use another framework and not pygame?
Thank you for the information/help about this!
Firstly: Your link doesn't work ;)
Now then, personally I wouldn't use pygame and python for something like that - I dont think it would be powerfull enough as an interpretted language for something that big - your 3D object loader is probably more for basic models and simple displays (I dont know, as I said your links broken :P )
Asking if there is a better framework is quite broad and everyone will say something different but personally I'm a fan of Unity. It's actually designed for C# programming but you can use Boo, which is pretty similar to python, and it will make your life so much easier in terms of rendering, physics particles... etc :)
Plus there's a terrain sculpting tool for you :)
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this question
Im new to Python and I am getting to grips with it.
I have a question: why is Python it self not used to develop games? I can see why Pygame games is used, due to ease of loading images on to the screen for example. If I was to develop a game in Python, would it mean I would have to manually display images to the screen? Or do Python also provide these set of libraries?
For example in Pygame you would have:
pygame.image.load("image.jpg").convert()
to load an image to the screen.
If I was to do this in python, would I have to manually load images? Read from a file then display? Is this all done in the underlining code for Pygame?
Well as you are progressing more into game development you'll find out that you need more and more things in order to do what you have in mind. What pygame and all these dev kits do, is that they've already done the work for you.
If you are going to create a serious game,you'll need collision modules, animation modules, sprite loading modules, maybe music and video, controls and more.
Without pygame you'll have to create all of them from scratch :P.
I don't know about the inners of Pygame and to be honest i haven't used it, but i can assure you from my experience in game development that its a real PAIN to make anything from scratch so eventually you'll need something as a base for your game. Thats why there are so many game engines around ;)
Unless you are a python prodigy or something :P
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 8 years ago.
Improve this question
So, I only know how to use Python, but I also know how to model in 3d. I've heard of OpenGL and I really want to learn how to use, because it seems very useful (I want to create simple games with it...). I found PyOpenGL, Python bindings for OpenGL, but I couldn't find any "real" documentation, so the only option is to study code examples and tutorials written in C++ or something. But, as I said, I only know how to use Python. What can I do about that?
You should go on and read a OpenGL tutorial.
Here's a pyopengl demo; other samples are over here.
Also, you can use pygame together with pyopengl; an example is here.
You can try with something higher level, if you want do to simple games, Panda3D has a reputation of being very simple (compared to straight opengl) to learn.
If your goal is to make games in Python, then you should look at PyGame. Its better documented and supported.
http://www.pygame.org/
If you use Cython there is a possibility to optimise part of your code with OpenCL:
https://github.com/cython/cython/wiki/enhancements-opencl