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
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 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 5 years ago.
Improve this question
I never went too far into NetLogo, and being a novice in Python I started looking into the turtle module, aiming towards ABM. I have seen some simple implementations of the turtle module (turtledemo and YouTube) but none were comparable to NetLogo library's examples. I went over (once) the mesa tutorials and it seemed interesting but, as it says, more advanced stuff require Javascript. I've also read that NetLogo is fast to pick up.
Considering the above, and adding your own experience, could NetLogo be a better choice than Python? Could you estimate how hard each path would be? Do you have any other suggestions?
I teach ABM. I used to use Python for my course,
using a module that provides some NetLogo-like functionality:
https://raw.githubusercontent.com/alan-isaac/econpy/master/abm/gridworld/gridworld.py
I gave that up. Although Python is a great language for
teaching programming, NetLogo is a much better language for
teaching ABM. (Both started out as teaching languages,
very roughly speaking, and became much more.) It is very
easy to get started with NetLogo. It's builtin facilities
also support very sophisticated model building. These facilities
can be extended when needed.
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).
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 9 years ago.
Improve this question
I have been looking around but haven't found an example of this. I'd like to write out a few long/tedious python scripts using Clojure. Just because I happen to enjoy Clojure a bit more and they are not full on programs.
This site makes me think it is possible:
http://jkkramer.com/sudoku.html
For example if I have script.clj, I'd like to be able to convert it to script.py - not by hand of course.
Is it possible to do this? If so, what tool/library/script should I use? If its not possible not, why not?
[Edit] I edited this because the wording mistakenly gave the impression I was looking for a detailed lesson on writing my own solution. I was just curious if the tools were out there to answer my question and if not then why not.
Yes. Write a compiler that takes Clojure syntax and outputs valid Python syntax.
How to do that is well outside of the ability/scope of a StackOverflow answer.
Also note that if you do this for the general case of compiling any piece of Clojure code to Python you will have implemented quite a bit of Clojure in Python (especially when you implement defmacro and generic methods).
You actually don't have to do a source to source translation in order to write Clojure that will interact with python libraries. Just see clojure-py which allows you to write regular Clojure syntax and run it under the Python interpreter and call Python libraries.
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 :)