下载没有pygame的pygame游戏? [英] Downloading pygame games without pygame?

查看:85
本文介绍了下载没有pygame的pygame游戏?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是一个简单的问题.我一直在制作游戏,我希望我的一些朋友能够在线下载它.他们是否必须在那里的计算机上安装 pygame 和 python 才能下载它.我问的原因是因为我也在考虑将它发布给普通观众,如果他们因为没有 pygame 而无法下载,那么我可能不会得到太多反馈或成功.谢谢.

This is a simple question. I have been making a game, and I wanted some of my friends to be able to download it online. Do they have to have pygame and python installed on there computer to download it. The reason I ask is because Im also thinking about releasing it to the general audience and if they can't download because they don't have pygame, well I probably won't get much feedback or success. Thank you.

推荐答案

是的,用户需要 Python 解释器和对 Pygame 的引用来执行您的程序——因为您的游戏是用 Python 编写的并使用第三方库 Pygame.

Yes users need a Python interpreter and a reference to Pygame to execute your program – since your game is written in Python and uses the third party library Pygame.

也就是说,你可以考虑使用

That said, you could consider to use

  • cx_Freeze,
  • pyInstaller or for example
  • py2app (for Mac users)

将您的 Python 脚本冻结为可执行文件,并制作一个独立的应用程序,您的朋友无需在他们的计算机上安装 Python 和/或 Pygame,即可下载和执行该应用程序.

to freeze your Python scripts into an executable and to make a standalone application which your friends could download and execute without having Python and / or Pygame installed on their computers.

Pygame wiki 为您提供了如何编译 Pygame 应用程序的示例使用 py2exe 的独立 Windows 应用程序.

The Pygame wiki gives you an example how to compile a Pygame app to a standalone windows application using py2exe.

这篇关于下载没有pygame的pygame游戏?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆