开发者

2D RTS in Python?

I am a great python fan. Recently I got an idea to write RTS engine and/or maybe a simple RTS game based upon this engine. There are a couple of things I need to think about and maybe you can give me some advice on these:

  1. Performance. Most games are written in C++. Isn't python too slow for game engine? I am aiming only at 2D, but still开发者_如何学编程 it may be too demnading.
  2. Graphics. Are there any good graphics libraries for python? SDL/OpenGL bindings or maybe something more suitable for python?
  3. Game engines. Do you know of any existing RTS engine written in python?
  4. Any tools/libraries for python that maybe helpful in developing RTS

Thanks in advance!


  1. Performance may be an issue with heavy graphics/math processing. If so, see Panda3D, NumPy, Cython, and PyPy.
  2. Use Pyglet, PyOpenGL with Pyglet, Panda3D (although you are writing in 2D, you can still use a 3D engine), or perhaps some other library.
  3. There don't seem to be existing RTS libraries, but there are definitely pre-existing generalized engines.
  4. Try searching for RTS-related libraries in general: you'll need AI, pathfinding, networking, and so on. Therefore, you may be interested in Twisted, for instance, since it helps with networking.


I can answer your first two.

  1. Python isn't too slow for games. That all games must be written in C++ is a myth. Sure C++ (or C) might give you the best performance, but it doesn't mean you're unable to write a game in another language.
  2. Try PyGame: SDL bindings for Python.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜