Home  >  Article  >  Backend Development  >  Can Python be used to make mobile games?

Can Python be used to make mobile games?

藏色散人
藏色散人Original
2019-06-24 13:41:466259browse

Can Python be used to make mobile games?

Can python make mobile games?

The answer is Yes.

From the perspective of pure python development, the key point is that you need to clearly know which ones you should hand over to libraries written in c/c and which ones should be handled by python.

For example, the Oriental Futou Festival developed by pyglet is a fan game and is not commercialized, so there is no big problem in using python, and the actual effect is not bad.

However, the Android and ios versions cannot be sure whether it is python, because pyglet does not support opengles, but pygame and kivy support sdl2 and can be used on Android and ios. In terms of scripts, Unity can be embedded into C# through ironpython to indirectly write Unity's code through Python, and ue also has its own plug-in to support python to write ue's code directly.

It’s just that neither of them seem to be sure whether they can be compiled and packaged into mobile terminals.

To sum up, if you just write a simple 2D standalone, considering the mobile platform, pygame can do it, collision has pybox2d, and map has pytmx. If you need tutorials, you have to build a ladder and search on YouTube. It is no longer news that domestic tutorials are copied from each other. It is basically impossible to find detailed tutorials on pygame.

If you do not consider the mobile platform, pyglet cocos2d-python will be a better choice. pygame is a little more low-level than this combination.

Related recommendations: "Python Tutorial"

The above is the detailed content of Can Python be used to make mobile games?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn