aim-practice:使用pygame python库创建的瞄准游戏

  • j3_933462
    了解作者
  • 21.9KB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-05-26 12:13
    上传日期
目标练习 使用pygame python库创建的瞄准游戏 游戏规则 运行游戏时,您会被加载到开始屏幕上,在该屏幕上您需要单击按钮来开始游戏。 目的是单击目标。 单击目标时,您将获得一个分数,并且目标应在其他位置重新生成。 如果在目标消失之前没有单击目标,它将消失并在新位置重新生成。 您应该能够通过叮叮提示来判断游戏是否收到了点击。 同样,如果时间已经过去,您会听到嘶哑的声音。 一旦所有目标都显示出来并被点击或错过,游戏就结束了。 游戏结束时将生成一个小的统计板,有机会重播。 游戏设置 对于您要更改的任何设置,请更新aim_practice.py并重新运行游戏。 我已经指出了您要更改文件的哪些部分。 我计划很快将其纳入游戏本身,但现在,您需要触摸源代码 每场比赛的目标 每个游戏最多可以有5个目标 TARGETS_PER_GAME = 5 每个目标的最长时间 每个目标最多停留2秒,然后将其标
aim-practice-master.zip
  • aim-practice-master
  • sounds
  • whoosh.ogg
    3.3KB
  • ding.ogg
    14.5KB
  • requirements.txt
    47B
  • LICENSE
    1KB
  • README.md
    2.1KB
  • Makefile
    152B
  • .gitignore
    1.8KB
  • aim_practice.py
    6.8KB
内容介绍
# aim-practice An aiming game created with the pygame python library ## Game Rules When the game is run, you are loaded at a start screen where you need to start the game with clicking a button. The goal is to click on the targets. When you click on a target, you will be awarded a point and the target should re-generate somewhere else. If you do not click on the target before the target disappears on its own, it will disappear and re-generate in a new location. You should be able to tell if the game received the click via a ding sound cue. Similarly, if time has passed for a target, you will hear a whoosh sound. A game has concluded once all the targets have shown up and been clicked or missed. The end of the game will generate a small statistics board with a chance to replay. ## Game Settings For any settings that you would like to change, please update `aim_practice.py` and re-run the game. I have noted which parts of the file you will want to change. I have plans to incorporate this within the game itself soon but for now, you will need to touch the source code ### Targets Per Game Each game has a max of 5 targets that you can hit ```python TARGETS_PER_GAME = 5 ``` ### Max Time Per Target Each target stays up for a max of 2 seconds before it marks it as a miss ```python TIME_BETWEEN_TARGETS = 2000 # milliseconds ``` ## How To Run I have included a Makefile to make it easy to install dependencies and run the game ### Install Dependencies ```bash make install ``` ### Run Game ```bash make run ``` ## To Do * Start the game at a settings screen instead of directly in the game * User should have the option to select targets per game * User should have the option to select time between targets * When the game ends, user should be able to update settings as well as see stats * Infinite Mode * User should be able to continuously play the game without it ending unless the user manually quits * If game is quit (without exiting), stats are shown * Allow user to disable sound * Fix Stats Bug * If you don't hit a target on time but don't click (and hit all other targets), accuracy shows as 100%
评论
    相关推荐
    • python pygame 飞船资源图片
      飞机大战 图片资源下载
    • pygame python
      python游戏开发工具,需要配合32位python使用,64位的不要下载
    • python pygame 贪吃蛇
      自己写的贪吃蛇,解压后直接运行贪吃.py即可(q退出,p暂停)(没有安装pygame可以运行exe文件)
    • python-pygame-snake
      python-pygame-snake
    • pygame python
      安装media的时候其中的一个工具包
    • python_pygame
      Repositorio destinado ao curso decriaçãode jogos em 2d ultilizado modulo pygame
    • hxpyg:pygame Python库的Haxe externs
      ## HxPyg ###用于Python目标###的Pygame库的Haxe Externs和与Tannus库接口的有用类 目前已实施: pygame.Pygamepygame全局变量的外部 pygame.Display:主要pygame.display模块的外部 pygame.Color:pygame.Color...
    • python3.4可用pygame
      python3.4可用pygame
    • PythonPygame、pyinstaller
      python环境搭建三个配套软件,python-3.7.2中自带pip,不用单独安装pip。安装顺序: 1、安装python(按向导),配置环境变量(此电脑右键属性-高级系统设置-环境变量-“系统变量”中添加python的安装地址,cmd中输入...
    • SIM800C_MQTT.rar
      使用SIM800C模块,使用MQTT协议,连接中国移动onenet平台,能实现数据的订阅、发布、存储等