Skip to main content

free python games written by pygame

Project description

mxgames 是一个由 python 写的小游戏集合,基于 pygame。

安装

$ pip install mxgames

运行

以下命令可以获得一个游戏列表:

$ python -m mxgames

以下命令开始一个游戏:

$ python -m mxgames.[gamename]

[gamename] 是游戏名。

游戏介绍

  • life

    经典的生命游戏,理论上不需要玩家操作,但是我增加了点击操作,增加更多的可能性和趣味性。

    $ python -m mxgames.life
    

    life

  • 2048

    移动方块,相同的方块会融合,一步步凑出 2048。大家应该也很熟悉。

    $ python -m mxgames.2048
    

    2048

  • snake

    贪吃蛇,地球人都知道的游戏。

    $ python -m mxgames.snake
    

    snake

  • AI snake

    自动寻路的贪吃蛇,基于近似的哈密顿环,加入了一些优化,游戏无需操作,但是可以按空格键暂停,正常情况下都会吃满屏幕,但是效率不高,正在寻找更好的优化方法。

    $ python -m mxgames.ai_snake
    

    ai_snake

  • tetris

    俄罗斯方块,也不用多说了.......因为偷懒就没有做一个小界面显示下一个方块,分数打印在命令行。

    python -m mxgames.tetris
    

    tetris

  • to_hell

    完整名字是 To Hell with Johnny,国内一般翻译为 是男人就下一百层,左右两个方向键就能控制,挺有趣...

    python -m mxgames.to_hell
    

    to_hell

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mxgames-1.2.0.tar.gz (12.3 kB view hashes)

Uploaded Source

Built Distribution

mxgames-1.2.0-py3-none-any.whl (16.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page