is python good for making games? [closed]
i hear people say python is just as good as c++ and java but i cant find many good games made in python. a few in pygames but not many
just trying to choose the right language
edit: sorry, many games really, i would love to make a roguelike, basically my dream. also an overhead rpg. nothing to complex, i dont want to reinvent the wheel but i would like to make a fun game. i have minor java experience, but like the looks of python. i dont plan on making a 3d game really.
You should also note that Python's integration with other languages makes it extremely valuable. For instance, the Panda3D engine (http://www.panda3d.org/) allows you to write games (in 3D) in Python, and then port parts to C++ as needed. Of course, that would be overkill for your purposes, but it shows that Python is quite powerful. Also, one game that was made with that engine was a commercial Disney game, so there are large games written partially with Python. If performance is really an issue, you can also use OpenGL in Python via Pyglet (as well as PyGame too, I believe), which can alleviate the rendering overhead somewhat. And performance can be improved with libraries such as Cython that can compile a Python-esque language into a C Python extension module, and PyPy, which can JIT-compile some Python code (with restrictions). Therefore, you could easily prototype your game in Python and then improve parts later as needed.
Also, note that PyWeek is a competition for Python games, which are generally 2D, written with Pygame or Pyglet, and that can provide some sample code/examples. Finally, Frets on Fire is written in Python, and seems reasonably well-known for such a small game.
Edit: See https://gamedev.stackexchange.com/questions/5035/famous-games-written-in-python
For your purposes pygame seems like a perfect solution, I would recommend digging through other peoples python games. You can do some really amazing stuff in python.
It should also be known that python plays nice with c++ for performance critical ares. See this post link
I'd say Python is okay for scripting in a game engine (See: EVE Online, Civ IV), but I wouldn't write a game engine in it. The performance just isn't there for serious real-time games. If you just want to do simple 2d stuff that's fine, but your're not going to write the next Crysis, or even the next Minecraft, in pure Python.
For the kind of games you want to make, Python is a perfectly suitable language. The only reason there are few games made in Python is because the professional game development industry nearly exclusively uses C++, which in turn due to a combination of performance concerns and reliance on legacy code. These aren't significant for your situation so don't worry about it.
Python is great for game development (especially roguelikes). You can find a complete Python roguelike guide here.
Depends upon your choice. If you want to make a 2D game then you can use pygame. Check the pygame website (I think you already have), you will find many interesting games there. If you want to make 3D games then Python might not be the good choice. But still, if you want to use Python for your 3D games than you can use cTypes Python binding for some C++ libs. Like pyrrlicht or pyogre.
Regards
精彩评论